Menu

#604 UAC module fails to refresh registrations

ver 1.0.x
open
nobody
uac (1)
5
2015-02-17
2013-10-11
No

Per Daniel I'm opening a ticket on the UAC module not refreshing SIP registrations. The following are the two related posts from the mailing list:


Hello,

I'm using the UAC module to register to remote sip proxies. When
starting Kamailio, the UAC module successfully registers with the remote
sip proxies as expected. Upon expiration of the registration (refresh
interval) the UAC module fails to re-register.

I've done some sip traces and found the following:

During Kamailio startup the registration process is typical of what
you'd expect:

  1. UAC module sends registration request without authentication
    information to remote registrar

  2. Remote sip proxy sends a 401 back to Kamailio saying unauthorized

  3. UAC module sends another registration request with credentials and
    registration is complete.

After the refresh interval expires, the UAC module performs step 1 from
above, and the remote sip proxy sends back a 401 (step 2). At this
point, the UAC module doesn't resend the registration request with
credentials thus failing to register.

I've got the following modparam's set on the UAC module.

~~~~~~modparam("uac", "reg_contact_addr", "10.0.0.31:5060")
modparam("uac", "reg_timer_interval", 60)
modparam("uac", "reg_retry_interval", 300)

Anyone have any idea's as to why registrations are failing after the 
refresh interval?

Thanks,

Isaac

***
Hi list

i'm testing uac module with a did provider, apparently it works the first register, when it's going to refresh the session the register packed don't send the proxy-authorization header.

My kamailio is 4.0, the debian wheezy repository

**this is my parameter config:**

~~~~~~#!ifdef WITH_UAC~~~~~~
#---------- uac params ----------#
modparam("uac", "reg_db_url",DBURL)
modparam("uac", "reg_timer_interval",60)
modparam("uac", "reg_retry_interval",120)
modparam("uac", "reg_db_table", "uacreg")
modparam("uac","credential","username:domain:password")
modparam("uac","auth_realm_avp","$avp(i:10)")
modparam("uac","auth_username_avp","$avp(i:11)")
modparam("uac","auth_password_avp","$avp(i:12)")
modparam("uac","restore_mode","auto")
modparam("uac", "reg_contact_addr", "xx.xx.xx:5060")
#!endif

this is the route block:

~~~~~~ if(uac_reg_request_to("$fU", 1))
{
xlog("L_NOTICE", "Found remote user [$rU] on [$rd] via [$du]");
t_on_failure("REMOTE_AUTH");

    t_relay();
    }

     inside route[LOCATION] at the end:

!ifdef WITH_UAC

    if(uac_reg_lookup("$rU", "$ru")) {
    xlog("request from a remote SIP provider [$ou => $ru]\n");
    }
            lookup("location");

!endif

failure_route[REMOTE_AUTH] {
if ($T_reply_code == 401 or $T_reply_code == 407) {
xlog("L_NOTICE", "Remote asked for authentication");
uac_auth();
}
}

**this is the error log by syslog**

~~~~~~ct 11 13:52:47 rene /usr/sbin/kamailio[7413]: INFO: <script>: Routing locally generated REGISTER to<sip:ippbx.xxxxx.com>
Oct 11 13:52:47 rene /usr/sbin/kamailio[7400]: ERROR: uac [uac_reg.c:537]: uac_reg_tm_callback(): authentication failed for <2127207679>

this is sip trace with first register:

~~~~~~Frame 209: 671 bytes on wire (5368 bits), 671 bytes captured (5368 bits) on interface 0
Ethernet II, Src: Hewlett-_6b:6e:49 (10:1f:74:6b:6e:49), Dst: Cisco_7f:1e:69 (00:13:1a:7f:1e:69)
Internet Protocol Version 4, Src: 10.20.8.45 (10.20.8.45), Dst: xx.xx.xx.xx (xx.xx.xx.xx)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Request-Line: REGISTER sip:ippbx.xxxxx.com SIP/2.0
Message Header
Via: SIP/2.0/UDP 10.20.8.45;branch=z9hG4bKb278.906502e4.0
To: sip:5201341115@ippbx.xxxxx.com
From: sip:5201341115@ippbx.xxxxx.com;tag=533cb9e91f4b999cf76861cbb9ed54ed-4cad
CSeq: 11 REGISTER
Call-ID: 2e81fffd-7628@127.0.0.1
Max-Forwards: 70
Content-Length: 0
User-Agent: kamailio (4.0.3 (i386/linux))
Contact: sip:01133212720@xxx.xxx.xxx:5060
Expires: 60
Proxy-Authorization: Digest username="1341115", realm="xxxxx", nonce="5DB4B614FCD76AD44FFFC3BEAECBDA9B", uri="sip:ippbx.xxxxx.com", response="d7d38055e339a2554cf2bb7e79e9b6f4", algorithm=MD5

**this is sip trace with the second register:**

~~~~~~Frame 681: 468 bytes on wire (3744 bits), 468 bytes captured (3744 bits) on interface 0
Ethernet II, Src: Hewlett-_6b:6e:49 (10:1f:74:6b:6e:49), Dst: Cisco_7f:1e:69 (00:13:1a:7f:1e:69)
Internet Protocol Version 4, Src: 10.20.8.45 (10.20.8.45), Dst: xx.xx.xx.xx (66.33.146.52)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
    Request-Line: REGISTER sip:ippbx.xxxxx.com SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 10.20.8.45;branch=z9hG4bKb278.a06502e4.0
        To: sip:5201341115@ippbx.xxxxx.com
        From: sip:5201341115@ippbx.xxxxx.com;tag=533cb9e91f4b999cf76861cbb9ed54ed-4d45
        CSeq: 10 REGISTER
        Call-ID: 2e81fffe-7628@127.0.0.1
        Max-Forwards: 70
        Content-Length: 0
        User-Agent: kamailio (4.0.3 (i386/linux))
        Contact: <sip:01133212720@xxx.xxx.xxx:5060>
       Expires: 60

there isn't proxy-authorization Header

Any help i don't know what it's wrong

Best Regards
Rene Montilva

Discussion


Log in to post a comment.