[asterisk-dev] Call-ID register
Matthew J. Roth
mroth at imminc.com
Wed Oct 9 10:39:48 CDT 2013
Ismael Bouya wrote:
>
> (Note: in the time waiting to be registered to the list I found a
> workaround, that is to set fromdomain to the correct domain. However I
> think it remains a bug anyway that maybe could be corrected, certainly
> from the registrar, but asterisk could do something about it too maybe?)
>
> Hi,
> I was running asterisk for more than 8 month without problem, and it
> stopped working last saturday concerning the register command (I did
> things on my server, but nothing concerning asterisk and the last upgrade
> in my distribution was in late september and went well)
>
> After a few tests and tcpdumps, I found that asterisk sent register
> command, got an answer but didn't listen to it. Or it did listen to it (I
> see it in the debug mode of the console), but doesn't treat it as an
> answer: (ip and logins have been changed)
> --- (9 headers 0 lines) ---
> Retransmitting #1 (no NAT) to 198.151.12.54:5060:
> REGISTER sip:sip.registrar.fr SIP/2.0
> Via: SIP/2.0/UDP 198.51.100.24:5060;branch=z9hG4bK36a7dfbc
> Max-Forwards: 70
> From: <sip:0033999999999 at sip.registrar.fr>;tag=as09ca9745
> To: <sip:0033999999999 at sip.registrar.fr>
> Call-ID: 5d579b0674f45ba8347883985d553b64@[2001:db8:200:13:1::1]
> CSeq: 103 REGISTER
> User-Agent: Asterisk PBX 11.5.1
> Expires: 120
> Contact: <sip:Login at 198.51.100.24:5060>
> Content-Length: 0
>
> ---
>
> <--- SIP read from UDP:198.151.12.54:5060 --->
> SIP/2.0 401 Unauthorized
> Call-ID: 5d579b0674f45ba8347883985d553b64@[2001:DB8:200:13:1:0:0:1]
> CSeq: 103 REGISTER
> From: <sip:0033999999999 at sip.registrar.fr>;tag=as09ca9745
> To: <sip:0033999999999 at sip.registrar.fr>;tag=00-08168-00d2af85-2af415a65
> Via: SIP/2.0/UDP
> 198.51.100.24:5060;received=198.51.100.24;rport=5060;branch=z9hG4bK36a7dfbc
> WWW-Authenticate: Digest realm="sip.registrar.fr",nonce="00d2ad3e462b32fb3b17a78e1258231a",opaque="00c677ab4f21d6a",stale=false,algorithm=MD5
> Server: Cirpack/v4.42a (gw_sip)
> Content-Length: 0
>
>
> And asterisk keeps sending his register command, and never listen to the
> answer.
>
> The only explanation is the slight difference in the Call-ID's host name
> in the answer (caps and 0's).
> Is that important for asterisk? (that would correspond to the fact that
> it appeared precisely last saturday since I worked on IPv6 at this time)
>
> In that case, what can I do?
>
> My "asterisk" realm is sip.mydomain.com, which is a cname to
> mydomain.com, which has an AAAA entry since last weekend.
>
> Is there a possibility to ask to asterisk not to change sip.mydomain.com
> to the ip address in his call-ID? How? (I couldn't find that anywhere in
> the documentation)
>
> Of course I have no control on the registrar, so I cannot ask them to be
> more conservative of the call-id
>
> It looks like a rather new "bug", because I have a debian with exactly
> the same configuration that works perfectly (it sends @domain2.com
> instead of @ip.address), but with an older version of asterisk
> (1.8.13.1~dfsg-3+deb7u1 on the old, 11.5.1 on the new)
>
>
> Thanks in advance for your help!
Ismael,
Disclaimer: I am not an Asterisk developer, but I am a longtime user
and I read this list to keep up with new developments. That said,
this isn't necessarily a development question, so I'll field it and
request that you pose similar questions to the users list in the
future.
RFC 3261¹ is very clear about the matching of Call-IDs in a dialog:
The Call-ID header field acts as a unique identifier to group
together a series of messages. It MUST be the same for all
requests and responses sent by either UA in a dialog...
...Call-IDs are case-sensitive and are simply compared byte-by-
byte.
When Asterisk sends a Register request it expects to receive a
response with an identical Call-ID. It doesn't, so it retransmits the
request. This is correct behavior and any attempt to loosen the
Call-ID matching would break RFC compliance in a very fundamental way.
You should contact your provider and let them know that their
registrar has a Call-ID bug when responding to IPv6 UAs. In the
meantime, setting the 'fromdomain' as you did is the proper
workaround².
Note to the developers: It would be helpful if this functionality of
the 'fromdomain' setting was documented in 'sip.conf.sample'.
Currently, it only mentions modifying the From header of outbound SIP
INVITEs³.
¹ http://tools.ietf.org/html/rfc3261#section-8.1.1.4
² https://issues.asterisk.org/jira/browse/ASTERISK-2393
³ http://svnview.digium.com/svn/asterisk/branches/11/configs/sip.conf.sample?revision=400140&view=markup
Regards,
Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer
More information about the asterisk-dev
mailing list