[Freeswitch-users] Unable to register UA

Chris Burns chris at cloudtel.com
Wed Nov 11 17:16:50 PST 2009


Your SIP UA needs to take the info in the 401 and use it to digest 
authenticate. If you trace a SIP UA that supports authentication you will see 
that they also get the 401/407 and only then are able to authenticate. This 
is just a fact of how digest auth works in SIP ... see section 22.4 The 
Digest Authentication Scheme: http://www.ietf.org/rfc/rfc3261.txt

On November 11, 2009 04:58:28 pm Fede wrote:
> Hi!
>
> I'm trying to register a SIP UA to my FreeSWITCH server and for some reason
> I always get a "401 Unauthorized" response. I've tried with other UA
> (X-Lite and Ekiga) and they do work. The UA is: http://www.doddlephone.com
>
> My user configuration is:
>
> <include>
>   <user id="doddle">
>     <params>
>       <param name="password" value="doddle"/>
>       <param name="vm-password" value="1234"/>
>     </params>
>     <variables>
>       <variable name="toll_allow" value="domestic,international,local"/>
>       <variable name="accountcode" value="doddle"/>
>       <variable name="user_context" value="default"/>
>       <variable name="effective_caller_id_name" value="doddle"/>
>       <variable name="effective_caller_id_number" value="doddle"/>
>     </variables>
>   </user>
> </include>
>
> Can someone help me and tell me what I'm doing wrong?
>
> Here's the FreeSWITCH trace if it's useful:
>
> freeswitch at fc1160102.aspadmin.net> tport_wakeup_pri(0xae7056b0): events IN
> tport_recv_event(0xae7056b0)
> tport_recv_iovec(0xae7056b0) msg 0xae703f88 from (udp/216.75.60.102:5060)
> has 444 bytes, veclen = 1
> recv 444 bytes from udp/[190.179.3.18]:4375 at 21:51:10.194004:
>    ------------------------------------------------------------------------
>    REGISTER sip:216.75.60.102 SIP/2.0
>    From: sip:doddle at 216.75.60.102 <sip%3Adoddle at 216.75.60.102>;tag=633f3915
>    To: sip:doddle at 216.75.60.102 <sip%3Adoddle at 216.75.60.102>
>    Call-Id: 186e708700bcf9a944855105fc3dce0e
>    Cseq: 101 REGISTER
>    Contact: <sip:doddle at 192.168.0.1:4375;LINEID=fc9c0e49caad>
>    Expires: 3600
>    Date: Wed, 11 Nov 2009 21:51:51 GMT
>    Max-Forwards: 70
>    User-Agent: Doddle WebPhone
>    Supported: replaces
>    Via: SIP/2.0/UDP 192.168.0.1:4375;branch=z9hG4bK-0f9263f10caa;rport
>    Content-Length: 0
>
>    ------------------------------------------------------------------------
> tport_deliver(0xae7056b0): msg 0xae703f88 (444 bytes) from udp/
> 190.179.3.18:5060/sip next=(nil)
> nta: received REGISTER sip:216.75.60.102 SIP/2.0 (CSeq 101)
> nta: Via check: received=190.179.3.18
> nta: canonizing sip:216.75.60.102 with contact
> nta: REGISTER (101) going to a default leg
> nua: nua_stack_process_request: entering
> nua: nh_create: entering
> nua: nh_create_handle: entering
> nua: nua_stack_set_params: entering
> soa_clone(static::0xae7098a0, 0xae704890, 0xae718fc8) called
> soa_set_params(static::0xae719398, ...) called
> nua: nua_application_event: entering
> nua: nua_respond: entering
> nua(0xae718fc8): sent signal r_respond
> nua: nua_handle_destroy: entering
> nua(0xae718fc8): sent signal r_destroy
> nua: nua_stack_set_params: entering
> nua: nua_handle_magic: entering
> nua: nua_handle_destroy: entering
> soa_set_params(static::0xae719398, ...) called
> tport_tsend(0xae7056b0) tpn = UDP/190.179.3.18:4375
> tport_resolve addrinfo = 190.179.3.18:4375
> tport_by_addrinfo(0xae7056b0): not found by name UDP/190.179.3.18:4375
> tport_vsend returned 631
> send 631 bytes to udp/[190.179.3.18]:4375 at 21:51:10.198733:
>    ------------------------------------------------------------------------
>    SIP/2.0 401 Unauthorized
>    Via: SIP/2.0/UDP 192.168.0.1:4375
> ;branch=z9hG4bK-0f9263f10caa;rport=4375;received=190.179.3.18
>    From: sip:doddle at 216.75.60.102 <sip%3Adoddle at 216.75.60.102>;tag=633f3915
>    To: <sip:doddle at 216.75.60.102 <sip%3Adoddle at 216.75.60.102>
>
> >;tag=U8QpcZyvrQ3Fg
>
>    Call-Id: 186e708700bcf9a944855105fc3dce0e
>    Cseq: 101 REGISTER
>    User-Agent: FreeSWITCH-mod_sofia/1.0.5pre5-15326M
>    Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO,
> REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
>    Supported: timer, precondition, path, replaces
>    WWW-Authenticate: Digest realm="216.75.60.102",
> nonce="132239a5-e37e-4698-af61-5df9b3b67de8", algorithm=MD5, qop="auth"
>    Content-Length: 0
>
>    ------------------------------------------------------------------------
> nta: sent 401 Unauthorized for REGISTER (101)
> nta: timer set to 32000 ms
> nta_leg_destroy((nil))
> soa_destroy(static::0xae719398) called
> tport_wakeup_pri(0xae7056b0): events IN
> tport_recv_event(0xae7056b0)
> tport_recv_iovec(0xae7056b0) msg 0xae716af8 from (udp/216.75.60.102:5060)
> has 706 bytes, veclen = 1
> recv 706 bytes from udp/[190.179.3.18]:4375 at 21:51:10.453646:
>    ------------------------------------------------------------------------
>    REGISTER sip:216.75.60.102 SIP/2.0
>    From: sip:doddle at 216.75.60.102 <sip%3Adoddle at 216.75.60.102>;tag=633f3915
>    To: sip:doddle at 216.75.60.102 <sip%3Adoddle at 216.75.60.102>
>    Call-Id: 186e708700bcf9a944855105fc3dce0e
>    Cseq: 102 REGISTER
>    Expires: 3600
>    Date: Wed, 11 Nov 2009 21:51:51 GMT
>    Max-Forwards: 70
>    User-Agent: Doddle WebPhone
>    Supported: replaces
>    Authorization: Digest username="doddle", realm="216.75.60.102",
> nonce="132239a5-e37e-4698-af61-5df9b3b67de8", uri="sip:216.75.60.102",
> response="686ec180c04fc70be22aaca9eb21f5e9", algorithm=MD5,
> cnonce="155fb1307a89ffc0eaed1e0e94958e6e", qop=auth, nc=00000033
>    Via: SIP/2.0/UDP 192.168.0.1:4375;branch=z9hG4bK-36a1b6039a42;rport
>    Contact: <sip:doddle at 190.179.3.18:4375;LINEID=fc9c0e49caad>
>    Content-Length: 0
>
>    ------------------------------------------------------------------------
> tport_deliver(0xae7056b0): msg 0xae716af8 (706 bytes) from udp/
> 190.179.3.18:5060/sip next=(nil)
> nta: received REGISTER sip:216.75.60.102 SIP/2.0 (CSeq 102)
> nta: Via check: received=190.179.3.18
> nta: canonizing sip:216.75.60.102 with contact
> nta: REGISTER (102) going to a default leg
> nua: nua_stack_process_request: entering
> nua: nh_create: entering
> nua: nh_create_handle: entering
> nua: nua_stack_set_params: entering
> soa_clone(static::0xae7098a0, 0xae704890, 0xae71ae30) called
> soa_set_params(static::0xae71b340, ...) called
> nua: nua_application_event: entering
> nua: nua_respond: entering
> nua(0xae71ae30): sent signal r_respond
> nua: nua_handle_destroy: entering
> nua: nua_stack_set_params: entering
> nua(0xae71ae30): sent signal r_destroy
> nua: nua_handle_magic: entering
> soa_set_params(static::0xae71b340, ...) called
> nua: nua_handle_destroy: entering
> tport_tsend(0xae7056b0) tpn = UDP/190.179.3.18:4375
> tport_resolve addrinfo = 190.179.3.18:4375
> tport_by_addrinfo(0xae7056b0): not found by name UDP/190.179.3.18:4375
> tport_vsend returned 645
> send 645 bytes to udp/[190.179.3.18]:4375 at 21:51:10.462570:
>    ------------------------------------------------------------------------
>    SIP/2.0 401 Unauthorized
>    Via: SIP/2.0/UDP 192.168.0.1:4375
> ;branch=z9hG4bK-36a1b6039a42;rport=4375;received=190.179.3.18
>    From: sip:doddle at 216.75.60.102 <sip%3Adoddle at 216.75.60.102>;tag=633f3915
>    To: <sip:doddle at 216.75.60.102 <sip%3Adoddle at 216.75.60.102>
>
> >;tag=vHHFetF0N0S2B
>
>    Call-Id: 186e708700bcf9a944855105fc3dce0e
>    Cseq: 102 REGISTER
>    User-Agent: FreeSWITCH-mod_sofia/1.0.5pre5-15326M
>    Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO,
> REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
>    Supported: timer, precondition, path, replaces
>    WWW-Authenticate: Digest realm="216.75.60.102",
> nonce="5a5ebe31-baf6-429c-a184-f835a22d7c24", stale="true", algorithm=MD5,
> qop="auth"
>    Content-Length: 0
>
>    ------------------------------------------------------------------------
> nta: sent 401 Unauthorized for REGISTER (102)
> nta_leg_destroy((nil))
> soa_destroy(static::0xae71b340) called
>
>
>
> Thank you in advacen,
>
> Federico Omoto






More information about the FreeSWITCH-users mailing list