[Home]

Summary:ASTERISK-12486: Asterisk sends a [slightly] different branch id back on CANCEL than on INVITE when call times out
Reporter:Richard Wilkinson (rickead2000)Labels:
Date Opened:2008-07-30 07:41:55Date Closed:2008-09-09 14:06:13
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When asterisk does a DIAL with a timeout of 120 seconds, when the 120 seconds expires and asterisk generates a SIP CANCEL message, the branch sent back is slightly different from the one it sent in the original INVITE.  This often results in a 481 No such call response back from the other party and thus the call doesn't get cancelled properly.

If the DIAL command is set to 110 seconds, asterisk responds with the same branch on the CANCEL than on the INVITE.

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

extensions.conf ---

exten => 100,1,Dial(SIP/012345@3rdparty,120)

---

this results in the following SIP messages (seen from the perspective of the 3rd party)

INVITE sip:012345@3rdparty:5060 SIP/2.0 Record-Route: <sip:xx.xx.xx.xx;lr=on> Via: SIP/2.0/UDP xx.xx.xx.xx;branch=z9hG4bKe2b4.1b677e16.0 Via: SIP/2.0/UDP xx.xx.xx.xx:5060;branch=z9hG4bK1c03e7f6;rport=5060

and then a CANCEL

CANCEL sip:012345@3rdparty:5060 SIP/2.0 Record-Route: <sip:xx.xx.xx.xx;lr=on> Via: SIP/2.0/UDP xx.xx.xx.xx;branch=z9hG4bKe2b4.2b677e16.0 Via: SIP/2.0/UDP xx.xx.xx.xx:5060;branch=z9hG4bK1c03e7f6;rport=5060 From: "Test user" <sip:12345@domain.com>;tag=as1de92dc2 To: <sip:12345@domain.com> Call-ID: 373b8e156602b4b246e872112584735b@domain.com CSeq: 102 CANCEL

Notice the first character after the . in the branch of the CANCEL message is different from the INVITE.

If in extensions.conf the DIAL duration is set to <110 seconds, the CANCEL message branch is the same as in the INVITE and everything is OK
Comments:By: Leif Madsen (lmadsen) 2008-09-03 13:47:17

Can you look at issue 13381 and determine whether that issue is the same one you're experiencing? It appears to be so, but I don't want to close this on you too quickly.

Thanks!

By: Leif Madsen (lmadsen) 2008-09-03 19:54:36

There is now a patch ready to be tested in 13381. Please test to see if it resolves your problem for this report. Thanks!

By: Richard Wilkinson (rickead2000) 2008-09-04 03:55:55

It certainly looks pretty similar.  There isn't any SIP INFO going on in my dialog, but other than that it looks the same.

By: Leif Madsen (lmadsen) 2008-09-04 07:24:09

Cool. Give the patch in the related bug a test and see if that resolves your issue. If it does, then we can close this issue, and we'll close the other issue when the other reporter also verifies.

Thanks!

By: Richard Wilkinson (rickead2000) 2008-09-04 07:47:39

No problem - I'll get this tested later on today and post results back.

By: Richard Wilkinson (rickead2000) 2008-09-06 10:46:35

That patch seems to resolve the issue!

By: Leif Madsen (lmadsen) 2008-09-06 13:20:53

Thanks for the update!  Once that patch goes in, this bug will be closed. Thanks for testing!

By: Digium Subversion (svnbot) 2008-09-09 14:06:11

Repository: asterisk
Revision: 142218

U   branches/1.4/channels/chan_sip.c

------------------------------------------------------------------------
r142218 | mmichelson | 2008-09-09 14:06:08 -0500 (Tue, 09 Sep 2008) | 14 lines

Make sure that the branch sent in CANCEL requests
matches the branch of the INVITE it is cancelling.

(closes issue ASTERISK-12649)
Reported by: atca_pres
Patches:
     13381v2.patch uploaded by putnopvut (license 60)
Tested by: atca_pres

(closes issue ASTERISK-12486)
Reported by: rickead2000
Tested by: rickead2000


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

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