[Home]

Summary:ASTERISK-00001: SIP re-invites failing with certain proxies
Reporter:John Todd (jtodd)Labels:
Date Opened:2003-07-15 18:14:56Date Closed:2011-06-07 14:04:43
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When sip UAs and SIP proxies that are set to "canreinvite=yes" call each other, failures occur due to INVITE timeouts.

****** ADDITIONAL INFORMATION ******


Problem: I cannot make peer-to-peer SIP work correctly in certain circumstances

I have a 7960 that is configured with one of it's lines as follows:

[2209]
type=friend
username=2209
secret=blahblahblah
host=dynamic
context=intern
canreinvite=yes


I have a SIP service provider, described as follows:

; Note: remote host is a SER proxy
[inoc-dba]
type=friend
host=204.61.208.90
username=12345
secret=foo
canreinvite=yes


From the 7960, I call a remote number.  I pick up the call on the remote line.  Things work quite well for a while; around 30 seconds into the call, however, I get the "408" message and the call terminates.

ms1*CLI>
   -- Executing NoOp("SIP/2209-82d8", "") in new stack
   -- Executing Goto("SIP/2209-82d8", "intern-post|812345|1") in new stack
   -- Goto (intern-post,811893,1)
   -- Executing SetCallerID("SIP/2209-82d8", "12345") in new stack
   -- Executing SetCIDName("SIP/2209-82d8", "John Todd") in new stack
   -- Executing Dial("SIP/2209-82d8", "SIP/12345@inoc-dba") in new stack
   -- Called 11893@inoc-dba
   -- SIP/inoc-dba-8f50 is ringing
   -- Got SIP response 481 "Call Leg/Transaction Does Not Exist" back from 204.91.156.6
   -- SIP/inoc-dba-8f50 answered SIP/2209-82d8
   -- Attempting native bridge of SIP/2209-82d8 and SIP/inoc-dba-8f50
   -- Got SIP response 481 "Call Leg/Transaction Does Not Exist" back from 204.91.156.6
[call proceeeds normally here for ~30 seconds - voice works in both directions]
   -- Got SIP response 408 "Request Timeout" back from 204.61.208.90
 == Spawn extension (intern-post, 812345, 3) exited non-zero on 'SIP/2209-82d8'
ms1*CLI>

Note: I get the "-- Got SIP response 481 "Call Leg/Transaction Does Not Exist" back from 204.91.156.6" messages about once every 30 seconds regardless of call status; that seems to be a different bug. <sigh>


If I set "canreinvite=no" on the SIP description for the 7960, the call works fine for as long as I'd like (test: 10 minutes) but of course the audio is going between my Asterisk server and the remote phone, and not between the two phones, which is sub-optimal.

So the question is: why is it that I get the "Request Timeout" on calls where I set "canreinvite=yes" on the 7960?  Is this a bug or a configuration issue on my end?  It appears from the SIP debug below that this is due to spurious re-INVITEs being sent from Asterisk to the far end of the connection, even after the conversation is active and OK'ed.  

JT
Comments:By: Malcolm Davenport (mdavenport) 2003-07-17 11:08:55

Can you provide sip debug messages?

By: John Todd (jtodd) 2003-07-17 15:09:27

Weird - I included this in the original submission, but it did not appear in the bugnote.  I will add a typical "sip debug" as well as a further bugnote in a few minutes..



204.91.156.7  = 7960 ext. 42*999 (registered with SER SIP proxy)
204.91.156.6  = 7960 ext. 2203   (registered with Asterisk)
204.91.156.10 = Asterisk server
204.61.208.90 = SER SIP proxy


[I dial "842*999" on 204.91.156.6 (7960) - Asterisk strips off the leading digit and sends to the SIP proxy.]
10.430000 204.91.156.6 -> 204.91.156.10 SIP/SDP Request: INVITE sip:842*999@204.91.156.10, with session description
10.430000 204.91.156.10 -> 204.91.156.6 SIP Status: 407 Proxy Authentication Required
10.500000 204.91.156.6 -> 204.91.156.10 SIP Request: ACK sip:842*999@204.91.156.10
10.550000 204.91.156.6 -> 204.91.156.10 SIP/SDP Request: INVITE sip:842*999@204.91.156.10, with session description
10.560000 204.91.156.10 -> 204.91.156.6 SIP Status: 100 Trying
10.560000 204.91.156.10 -> 204.61.208.90 SIP/SDP Request: INVITE sip:42*999@204.61.208.90, with session description
10.740000 204.61.208.90 -> 204.91.156.10 SIP Status: 100 trying -- your call is important to us
10.740000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060;user=phone, with session description
10.850000 204.91.156.7 -> 204.61.208.90 SIP Status: 100 Trying
10.900000 204.91.156.7 -> 204.61.208.90 SIP Status: 180 Ringing
11.080000 204.61.208.90 -> 204.91.156.10 SIP Status: 180 Ringing
11.080000 204.91.156.10 -> 204.91.156.6 SIP Status: 180 Ringing
[call picked up here]
13.460000 204.91.156.7 -> 204.61.208.90 SIP/SDP Status: 200 OK, with session description
13.640000 204.61.208.90 -> 204.91.156.10 SIP/SDP Status: 200 OK, with session description
13.640000 204.91.156.10 -> 204.61.208.90 SIP Request: ACK sip:42*999@204.61.208.90
13.640000 204.91.156.10 -> 204.91.156.6 SIP/SDP Status: 200 OK, with session description
13.750000 204.91.156.6 -> 204.91.156.10 SIP Request: ACK sip:842*999@204.91.156.10:5060
13.810000 204.61.208.90 -> 204.91.156.7 SIP Request: ACK sip:42*999@204.91.156.7:5060
14.150000 204.91.156.10 -> 204.91.156.6 SIP/SDP Request: INVITE sip:2209@204.91.156.10, with session description
14.150000 204.91.156.10 -> 204.61.208.90 SIP/SDP Request: INVITE sip:42*999@204.61.208.90, with session description
14.150000 204.91.156.10 -> 204.61.208.90 SIP/SDP Request: INVITE sip:42*999@204.61.208.90, with session description
[what's all this stuff in these three previous lines?  why are there 2 more INVITEs sent to 204.61.208.90?]
14.260000 204.91.156.6 -> 204.91.156.10 SIP/SDP Status: 200 OK, with session description
14.270000 204.91.156.10 -> 204.91.156.6 SIP Request: ACK sip:2209@204.91.156.10
14.330000 204.61.208.90 -> 204.91.156.10 SIP Status: 100 trying -- your call is important to us
14.330000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
14.340000 204.61.208.90 -> 204.91.156.10 SIP Status: 100 trying -- your call is important to us
14.340000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
14.350000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
14.350000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
14.560000 204.91.156.7 -> 204.61.208.90 SIP/SDP Status: 200 OK, with session description
14.740000 204.61.208.90 -> 204.91.156.10 SIP/SDP Status: 200 OK, with session description
14.740000 204.91.156.10 -> 204.61.208.90 SIP Request: ACK sip:42*999@204.61.208.90
14.930000 204.61.208.90 -> 204.91.156.7 SIP Request: ACK sip:42*999@204.91.156.7:5060
16.350000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
20.350000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
24.350000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
28.350000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
32.350000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
36.350000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
40.350000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
43.350000 204.61.208.90 -> 204.91.156.10 SIP Status: 408 Request Timeout
43.350000 204.91.156.10 -> 204.61.208.90 SIP Request: ACK sip:42*999@204.61.208.90
43.350000 204.91.156.10 -> 204.91.156.6 SIP/SDP Request: INVITE sip:2209@204.91.156.10, with session description
43.480000 204.91.156.6 -> 204.91.156.10 SIP/SDP Status: 200 OK, with session description
43.490000 204.91.156.10 -> 204.91.156.6 SIP Request: ACK sip:2209@204.91.156.10
43.490000 204.91.156.10 -> 204.91.156.6 SIP Request: BYE sip:2209@204.91.156.10
43.610000 204.91.156.6 -> 204.91.156.10 SIP Status: 200 OK
[call hangs up on 2209 phone here - I hang up 42*999 phone a few seconds later.]
48.510000 204.91.156.7 -> 204.61.208.90 SIP Request: BYE sip:42*999@204.61.208.90:5060;ftag=as656b48b4;lr=on
48.720000 204.61.208.90 -> 204.91.156.10 SIP Request: BYE sip:12345@204.91.156.10:5060
48.720000 204.91.156.10 -> 204.61.208.90 SIP Status: 200 OK
48.900000 204.61.208.90 -> 204.91.156.7 SIP Status: 200 OK





Now, a perspective just looking at the SIP traffic going to/from the 42*999 extension during an identical test:

 0.000000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060;user=phone, with session description
 0.110000 204.91.156.7 -> 204.61.208.90 SIP Status: 100 Trying
 0.150000 204.91.156.7 -> 204.61.208.90 SIP Status: 180 Ringing
[I pick up the phone]
 4.160000 204.91.156.7 -> 204.61.208.90 SIP/SDP Status: 200 OK, with session description
 4.520000 204.61.208.90 -> 204.91.156.7 SIP Request: ACK sip:42*999@204.91.156.7:5060
 5.030000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
 5.030000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
 5.190000 204.91.156.7 -> 204.61.208.90 SIP/SDP Status: 200 OK, with session description
 5.540000 204.61.208.90 -> 204.91.156.7 SIP Request: ACK sip:42*999@204.91.156.7:5060
 5.660000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
 7.660000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
11.660000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
15.660000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
19.660000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
23.660000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
27.660000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
31.660000 204.61.208.90 -> 204.91.156.7 SIP/SDP Request: INVITE sip:42*999@204.91.156.7:5060, with session description
[the channel hangs up and goes silent here but no SIP message sent... I hang up the actual phone 5 seconds later]
42.820000 204.91.156.7 -> 204.61.208.90 SIP Request: BYE sip:42*999@204.61.208.90:5060;ftag=as18331bc1;lr=on
43.210000 204.61.208.90 -> 204.91.156.7 SIP Status: 200 OK

By: km (km) 2003-07-24 09:52:05

Could this have something to do with Asterisk's lack of implementation with session timers?  timecop was fiddling with this because of his SIP provider's insistance on session timers.

By: John Todd (jtodd) 2003-07-24 13:09:57

No, I don't think this has anything to do with session timers.  Asterisk continues to send additional INVITEs, which tells me that something thinks a reply has not been received.

By: dpackham (dpackham) 2003-07-25 10:10:15

I have this happening on a system with 15 Cisco 7960's running the latest 5.1 Cisco SIP code.  all my calls are tromboned (looped) theu the * server regardless of the canreinvite and reinvite settings in sip.conf.  all our phones are on the same subnet and local to each other..  if you want debugs/dumps please let me know.  I'd be more than willing to help out on this

By: dpackham (dpackham) 2003-07-29 20:56:25

it does not happen with FWD.  FWD does the P2P correctly.  I think the invites are getting munged...  Il will attach captures tommrow

By: Mark Spencer (markster) 2003-08-16 15:53:00

So what exactly *is* the bug I'm supposed to fix?  Maybe one of you needs to call me to explain.

By: Mark Spencer (markster) 2003-08-21 18:33:28

Insufficient information to work with.

By: Digium Subversion (svnbot) 2010-04-20 13:38:40

Repository: asterisk
Revision: 258147

U   trunk/configs/extensions.conf.sample

------------------------------------------------------------------------
r258147 | lmadsen | 2010-04-20 13:38:40 -0500 (Tue, 20 Apr 2010) | 8 lines

Add example dialplan for dialing ISN numbers (http://www.freenum.org).
Minor tweaks and documentation added by me.

(closes issue ASTERISK-15840)
Reported by: pprindeville
Patches:
     freenum.patchASTERISK-1 uploaded by pprindeville (license 347)
Tested by: lmadsen
------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=258147

By: Digium Subversion (svnbot) 2010-04-20 13:39:12

Repository: asterisk
Revision: 258148

_U  branches/1.6.2/
U   branches/1.6.2/configs/extensions.conf.sample

------------------------------------------------------------------------
r258148 | lmadsen | 2010-04-20 13:39:12 -0500 (Tue, 20 Apr 2010) | 16 lines

Merged revisions 258147 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r258147 | lmadsen | 2010-04-20 13:38:39 -0500 (Tue, 20 Apr 2010) | 8 lines
 
 Add example dialplan for dialing ISN numbers (http://www.freenum.org).
 Minor tweaks and documentation added by me.
 
 (closes issue ASTERISK-15840)
 Reported by: pprindeville
 Patches:
       freenum.patchASTERISK-1 uploaded by pprindeville (license 347)
 Tested by: lmadsen
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=258148