[asterisk-bugs] [Asterisk 0011318]: When my gateway gets a new ip address, sip can not be re-registered (wrong "nonce"?)

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Nov 26 01:27:39 CST 2007


The following issue has been REOPENED. 
====================================================================== 
http://bugs.digium.com/view.php?id=11318 
====================================================================== 
Reported By:                MicWy
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11318
Category:                   Channels/chan_sip/Registration
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:            1.4.11  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             11-20-2007 01:14 CST
Last Modified:              11-26-2007 01:27 CST
====================================================================== 
Summary:                    When my gateway gets a new ip address, sip can not
be re-registered (wrong "nonce"?)
Description: 
I'm running asterisk on a local server. The internet gateway gets a new ip
every night. after that, all external sip registrations remains in the
state "request send".

I tried to debug sip:

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP
88.74.139.30:16322;received=88.74.155.83;branch=z9hG4bK6e283905;rport=10036
From: <sip:03XXXXXXX at 0341.sip.arcor.de>;tag=as3c85d392
To: <sip:034XXXXXXX at 0341.sip.arcor.de>;tag=SDm61ed99-
Call-ID: 0ecf687b44aa9b3777ffed0967026ef5 at 88.74.139.30
CSeq: 1284 REGISTER
Server: SSW/0.0.0
WWW-Authenticate: Digest
realm="arcor.de",nonce="47428568f7222c281c2cf7505b622ed4f37325a4",algorithm=MD5
Contact: <sip:.iIiIiI.52521118. at 82.82.16.8>
Content-Length: 0

--- (10 headers 0 lines) ---
Nov 20 08:08:23 NOTICE[15125]: chan_sip.c:5431 sip_reg_timeout:    --
Registration for '03XXXXXXX at 0341.sip.arcor.de' timed out, trying again
(Attempt http://bugs.digium.com/view.php?id=523)
REGISTER 13 headers, 0 lines
Reliably Transmitting (no NAT) to 212.144.96.102:5060:
REGISTER sip:0341.sip.arcor.de SIP/2.0
Via: SIP/2.0/UDP 192.168.100.2:5060;branch=z9hG4bK78e7369a;rport
From: <sip:03XXXXXXX at 0341.sip.arcor.de>;tag=as5c0adb73
To: <sip:03XXXXXXX at 0341.sip.arcor.de>
Call-ID: 0ecf687b44aa9b3777ffed0967026ef5 at 192.168.100.2
CSeq: 1285 REGISTER
User-Agent: Asterisk PBX
Max-Forwards: 70
Authorization: Digest username="03XXXXXXX", realm="arcor.de",
algorithm=MD5, uri="sip:0341.sip.arcor.de",
nonce="474259501d015b7c6917172b433db63e4b0d5eb7",
response="89c243afdadcb84147e76e795eacf174", opaque=""
Expires: 120
Contact: <sip:03XXXXXXX at 192.168.100.2>
Event: registration
Content-Length: 0

---
Destroying call '0ecf687b44aa9b3777ffed0967026ef5 at 192.168.100.2'
isdn-gw1*CLI> 
<-- SIP read from 212.144.96.102:5060: 
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP
88.74.139.30:16322;received=88.74.155.83;branch=z9hG4bK78e7369a;rport=10036
From: <sip:03XXXXXXX at 0341.sip.arcor.de>;tag=as5c0adb73
To: <sip:03XXXXXXX at 0341.sip.arcor.de>;tag=SDm61ed99-2b8de099
Call-ID: 0ecf687b44aa9b3777ffed0967026ef5 at 88.74.139.30
CSeq: 1285 REGISTER
Server: SSW/0.0.0
WWW-Authenticate: Digest
realm="arcor.de",nonce="47428568f7222c281c2cf7505b622ed4f37325a4",algorithm=MD5
Contact: <sip:.iIiIiI.52521118. at 82.82.16.8>
Content-Length: 0


--- (10 headers 0 lines) ---
Retransmitting http://bugs.digium.com/view.php?id=1 (no NAT) to
212.144.96.102:5060:
REGISTER sip:0341.sip.arcor.de SIP/2.0
Via: SIP/2.0/UDP 192.168.100.2:5060;branch=z9hG4bK78e7369a;rport
From: <sip:03XXXXXXX at 0341.sip.arcor.de>;tag=as5c0adb73
To: <sip:03XXXXXXX at 0341.sip.arcor.de>
Call-ID: 0ecf687b44aa9b3777ffed0967026ef5 at 192.168.100.2
CSeq: 1285 REGISTER
User-Agent: Asterisk PBX
Max-Forwards: 70
Authorization: Digest username="03XXXXXXX", realm="arcor.de",
algorithm=MD5, uri="sip:0341.sip.arcor.de",
nonce="474259501d015b7c6917172b433db63e4b0d5eb7",
response="89c243afdadcb84147e76e795eacf174", opaque=""
Expires: 120
Contact: <sip:03XXXXXXX at 192.168.100.2>
Event: registration
Content-Length: 0


As you can see, the parameter "nonce" which is sent by the server is
totally ignored by asterisk. Is always uses the same "nonce" in it's
response. When i do a "reload", asterisk re-registers fine. The requests
have the same "nonce" as the server contains in it's "unauthorized"
responses.


====================================================================== 

---------------------------------------------------------------------- 
 MicWy - 11-26-07 01:27  
---------------------------------------------------------------------- 
(sorry for reopen - that was the only way to add another comment)

I contacted sipgate and got assistance to solve this. The cause is the
router (Zyxel 660hw) which seems to have a poorly documented feature called
SIP-pass-through which rewrites ips in sip headers. There's no option to
control or disable this feature, so I fear that I have to replace that
router.

Thank you for your help and sorry for wasting your time with this
non-asterisk issue. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-26-07 01:27  MicWy          Status                   closed => new       
11-26-07 01:27  MicWy          Resolution               no change required =>
reopened
11-26-07 01:27  MicWy          Note Added: 0074300                          
======================================================================




More information about the asterisk-bugs mailing list