[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
Thu Nov 22 00:49:20 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: feedback
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-22-2007 00:49 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-22-07 00:49
----------------------------------------------------------------------
It's the same with the other sip provider. Asterisk always has the same
"nonce" and gets a lot of "Unauthorized".
Setting "registerattempts" to a non-zero value is no solution because in
this case asterisk does no re-register but sets the registry state to
"failed".
Here's the log of registering attempts to the other sip provider:
REGISTER 13 headers, 0 lines
Reliably Transmitting (no NAT) to 217.10.79.9:5060:
REGISTER sip:sipgate.de SIP/2.0
Via: SIP/2.0/UDP 192.168.100.1:5060;branch=z9hG4bK0af186a9;rport
From: <sip:21XXXXX at sipgate.de>;tag=as71a1bfdb
To: <sip:21XXXXX at sipgate.de>
Call-ID: 612d67da188d3f8305351bd90bf018fd at 192.168.100.1
CSeq: 5635 REGISTER
User-Agent: Asterisk PBX
Max-Forwards: 70
Authorization: Digest username="21XXXXX", realm="sipgate.de",
algorithm=MD5, uri="sip:sipgate.de",
nonce="4743aebd7ee18bc001e0dc74151fe89232046310",
response="350447c3fb7b20cd4927ece093a56c74", opaque=""
Expires: 120
Contact: <sip:21XXXXX at 192.168.100.1>
Event: registration
Content-Length: 0
---
Really destroying SIP dialog
'612d67da188d3f8305351bd90bf018fd at 192.168.100.1' Method: REGISTER
asterisk*CLI>
<--- SIP read from 217.10.79.9:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP
88.74.155.83:10035;received=88.74.133.109;branch=z9hG4bK0af186a9;rport=26406
From: <sip:21XXXXX at sipgate.de>;tag=as71a1bfdb
To: <sip:21XXXXX at sipgate.de>;tag=fe1721141f05bd30d4b50c70da3ae228.d9d8
Call-ID: 612d67da188d3f8305351bd90bf018fd at 88.74.155.83
CSeq: 5635 REGISTER
WWW-Authenticate: Digest realm="sipgate.de",
nonce="474526198bee4c73cbb5d660a4724da98eb79a5d"
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
Retransmitting http://bugs.digium.com/view.php?id=1 (no NAT) to
217.10.79.9:5060:
REGISTER sip:sipgate.de SIP/2.0
Via: SIP/2.0/UDP 192.168.100.1:5060;branch=z9hG4bK0af186a9;rport
From: <sip:21XXXXX at sipgate.de>;tag=as71a1bfdb
To: <sip:21XXXXX at sipgate.de>
Call-ID: 612d67da188d3f8305351bd90bf018fd at 192.168.100.1
CSeq: 5635 REGISTER
User-Agent: Asterisk PBX
Max-Forwards: 70
Authorization: Digest username="21XXXXX", realm="sipgate.de",
algorithm=MD5, uri="sip:sipgate.de",
nonce="4743aebd7ee18bc001e0dc74151fe89232046310",
response="350447c3fb7b20cd4927ece093a56c74", opaque=""
Expires: 120
Contact: <sip:21XXXXX at 192.168.100.1>
Event: registration
Content-Length: 0
---
asterisk*CLI>
<--- SIP read from 217.10.79.9:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP
88.74.155.83:10035;received=88.74.133.109;branch=z9hG4bK0af186a9;rport=26406
From: <sip:21XXXXX at sipgate.de>;tag=as71a1bfdb
To: <sip:21XXXXX at sipgate.de>;tag=fe1721141f05bd30d4b50c70da3ae228.d9d8
Call-ID: 612d67da188d3f8305351bd90bf018fd at 88.74.155.83
CSeq: 5635 REGISTER
WWW-Authenticate: Digest realm="sipgate.de",
nonce="4745261a355497d322f0b7f20d244ed48baa6656"
Content-Length: 0
Issue History
Date Modified Username Field Change
======================================================================
11-22-07 00:49 MicWy Note Added: 0074173
======================================================================
More information about the asterisk-bugs
mailing list