[asterisk-users] 401 Unauthorized with Snom but not with Zoiper softphone

Jonas Kellens jonas.kellens at telenet.be
Thu Oct 7 06:54:58 CDT 2010


Hello,

I'm having difficulty with registering a SIP account in a Snom 320 
IP-phone. This is what sip debug tells me :


[Oct  7 13:28:42] VERBOSE[20314] chan_sip.c: [Oct  7 13:28:42]
<--- SIP read from UDP:public_ip:58697 --->
REGISTER sip:sip.domain.tld SIP/2.0
Via: SIP/2.0/UDP 192.168.114.200:2048;branch=z9hG4bK-vj1xvbdnp4dw;rport
From: <sip:test3 at sip.domain.tld>;tag=sd2b3o74zc
To: <sip:test3 at sip.domain.tld>
Call-ID: 3c28a76e73cf-gp9nioi8zdci
CSeq: 12 REGISTER
Max-Forwards: 70
Contact: 
<sip:test3 at 192.168.114.200:2048;line=nagqjxpx>;reg-id=1;q=1.0;+sip.instance="<urn:uuid:8d4403c1-af97-4139-b535-de7d460a9187>";audio;mobility="fix
ed";duplex="full";description="snom320";actor="principal";events="dialog";methods="INVITE,ACK,CANCEL,BYE,REFER,OPTIONS,NOTIFY,SUBSCRIBE,PRACK,MESSAGE,INFO"
User-Agent: snom320/8.4.18
Allow-Events: dialog
X-Real-IP: 192.168.114.200
Supported: path, gruu
Expires: 3600
Content-Length: 0


<------------->
[Oct  7 13:28:42] VERBOSE[20314] chan_sip.c: [Oct  7 13:28:42] --- (14 
headers 0 lines) ---
[Oct  7 13:28:42] VERBOSE[20314] chan_sip.c: [Oct  7 13:28:42] Sending 
to 192.168.114.200 : 2048 (no NAT)
[Oct  7 13:28:42] VERBOSE[20314] chan_sip.c: [Oct  7 13:28:42]
<--- Transmitting (NAT) to public_ip:58697 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 
192.168.114.200:2048;branch=z9hG4bK-vj1xvbdnp4dw;received=public_ip;rport=58697
From: <sip:test3 at sip.domain.tld>;tag=sd2b3o74zc
To: <sip:test3 at sip.domain.tld>;tag=as6108a7e2
Call-ID: 3c28a76e73cf-gp9nioi8zdci
CSeq: 12 REGISTER
Server: Asterisk PBX 1.6.2.10
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="domain.tld", nonce="398aee1e"
Content-Length: 0


I would expect the Snom to try a second register, this time with some 
type of nonce. But there is just 1 REGISTER and 1 Unauthorized and 
that's it...

Other Snom phones with SIP-accounts go very well, but at this location 
the registration fails.

Another remark : when using a Zoiper softphone, the registration goes 
very well :


REGISTER sip:sip.domain.tld;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 
192.168.114.20:5060;branch=z9hG4bK-d8754z-fab4a5effbf90a05-1---d8754z-
Max-Forwards: 70
Contact: 
<sip:test3 at public_ip:51363;rinstance=b6fd38105c91b9bf;transport=UDP>
To: <sip:test3 at sip.domain.tld;transport=UDP>
From: <sip:test3 at sip.domain.tld;transport=UDP>;tag=db1a5018
Call-ID: NzBlZDMyN2U0YTEzZDk4Y2M2N2NmNzMxYTk4OWUxYTY.
CSeq: 1 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, 
SUBSCRIBE
User-Agent: Zoiper rev.7797
Allow-Events: presence, kpml
Content-Length: 0


<------------->
[Oct  7 13:46:52] VERBOSE[20314] chan_sip.c: [Oct  7 13:46:52] --- (13 
headers 0 lines) ---
[Oct  7 13:46:52] VERBOSE[20314] chan_sip.c: [Oct  7 13:46:52] Sending 
to 192.168.114.20 : 5060 (no NAT)
[Oct  7 13:46:52] VERBOSE[20314] chan_sip.c: [Oct  7 13:46:52]
<--- Transmitting (NAT) to public_ip:51363 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 
192.168.114.20:5060;branch=z9hG4bK-d8754z-fab4a5effbf90a05-1---d8754z-;received=public_ip
From: <sip:test3 at sip.domain.tld;transport=UDP>;tag=db1a5018
To: <sip:test3 at sip.domain.tld;transport=UDP>;tag=as2fcfde3c
Call-ID: NzBlZDMyN2U0YTEzZDk4Y2M2N2NmNzMxYTk4OWUxYTY.
CSeq: 1 REGISTER
Server: Asterisk PBX 1.6.2.10
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="domain.tld", nonce="7833b268"
Content-Length: 0

REGISTER sip:sip.domain.tld;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 
192.168.114.20:5060;branch=z9hG4bK-d8754z-fdd59e394f9c23b9-1---d8754z-
Max-Forwards: 70
Contact: 
<sip:test3 at public_ip:51363;rinstance=b6fd38105c91b9bf;transport=UDP>
To: <sip:test3 at sip.domain.tld;transport=UDP>
From: <sip:test3 at sip.domain.tld;transport=UDP>;tag=db1a5018
Call-ID: NzBlZDMyN2U0YTEzZDk4Y2M2N2NmNzMxYTk4OWUxYTY.
CSeq: 2 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, 
SUBSCRIBE
User-Agent: Zoiper rev.7797
Authorization: Digest 
username="test3",realm="domain.tld",nonce="7833b268",uri="sip:sip.domain.tld;transport=UDP",response="198f6262248fb11fe6cb55408a1cb8ce",algorithm=MD5
Allow-Events: presence, kpml
Content-Length: 0


SIP/2.0 200 OK
Via: SIP/2.0/UDP 
192.168.114.20:5060;branch=z9hG4bK-d8754z-fdd59e394f9c23b9-1---d8754z-;received=public_ip
From: <sip:test3 at sip.domain.tld;transport=UDP>;tag=db1a5018
To: <sip:test3 at sip.domain.tld;transport=UDP>;tag=as2fcfde3c
Call-ID: NzBlZDMyN2U0YTEzZDk4Y2M2N2NmNzMxYTk4OWUxYTY.
CSeq: 2 REGISTER
Server: Asterisk PBX 1.6.2.10
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Expires: 60
Contact: 
<sip:test3 at public_ip:51363;rinstance=b6fd38105c91b9bf;transport=UDP>;expires=60
Date: Thu, 07 Oct 2010 11:46:52 GMT
Content-Length: 0


It's the same account, the same password, but other agent.

Can anyone help me with this please ?! I see no difference but there 
must be !!


Kind regards,
Jonas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20101007/72e35aff/attachment-0001.htm 


More information about the asterisk-users mailing list