[asterisk-dev] strange spiral handling in chan_sip

Klaus Darilion klaus.mailinglists at pernau.at
Wed Jan 14 09:04:37 CST 2009


I just found this text in chan_sip which describes how spirals will be 

/* This is a spiral. What we need to do is to just change the outgoing 
* so that it now routes to the new Request URI. Since we created the 
INVITE ourselves
* that should be all we need to do.

IMO this is wrong. If a message spirals back to Asterisk this means that 
Asterisk should handle it as it a totally new request - newer it should 
  influence the outgoing request.
I observed (1.4.22) real bogus behavior that Asterisk sends a new 
outgoing INVITE with increased CSeq (looks like a reINVITE) and also it 
try to lookup the userpart (instead of the hostpart) of the received 
spiraled request.

Here  is the received spiraled request:

<--- SIP read from --->
INVITE sip:8604+4369911161122 at example.at;transport=UDP SIP/2.0
Record-Route: <sip:;lr;ftag=as5764a3a4 
Via: SIP/2.0/UDP;branch=z9hG4bKdfe1.f9c82eb2.0
Via: SIP/2.0/UDP;branch=z9hG4bKdhEr6TTK465LvdH;rport=5084
Via: SIP/2.0/UDP;branch=z9hG4bKdfe1.e9c82eb2.0
Via: SIP/2.0/UDP;branch=z9hG4bK52f281cb;rport=5060
From:  <sip:072062007301 at example.foobar.at>;tag=as5764a3a4
To: <sip:8604+4369911161122 at example.foobar.at>
Call-ID: 7ee2bd3a6aea62ff7e40db6e0c385e54 at example.foobar.at
CSeq: 103 INVITE
Max-Forwards: 67
Supported: replaces
Contact: <sip:example.orig at>
Content-Length: 306
Content-Type: application/sdp
Record-Route: <sip:;lr>
Record-Route: <sip:;lr;ftag=as5764a3a4

from logfile:

[Jan 14 15:08:26] DEBUG[15909] chan_sip.c: Potential spiral detected. 
Original RURI was sip:8604+4369911161122 at example.foobar.at, new RURI is 
sip:8604+4369911160036 at example.at;transport=UDP
[Jan 14 15:08:26] WARNING[15909] chan_sip.c: No such host: 


More information about the asterisk-dev mailing list