[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
Tue Nov 20 01:32:43 CST 2007
A NOTE has been added to this issue.
======================================================================
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-20-2007 01:32 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.
======================================================================
----------------------------------------------------------------------
oej - 11-20-07 01:32
----------------------------------------------------------------------
The response has a different call-id, so it doesn't really match the
request and therefore the registration fails. The server should *not*
change the call-id because the IP has changed, that is a bug in the server.
Issue History
Date Modified Username Field Change
======================================================================
11-20-07 01:32 oej Note Added: 0074038
======================================================================
More information about the asterisk-bugs
mailing list