Summary:ASTERISK-02105: SIP Cancels Fail due to Request-URI Mismatch
Reporter:lmcdowel (lmcdowel)Labels:
Date Opened:2004-07-25 20:57:45Date Closed:2008-01-15 15:03:42.000-0600
Versions:Frequency of
Environment:Attachments:( 0) siptrace.txt
( 1) siptrace2.txt
( 2) siptrace3.txt
Description:It appears that INVITE Request-URI's are overwritten by the "Contact:" header from replies to the Invite. The Contact: header is not required to be identical to the Request-URI.

This is causing subsequent CANCEL's (under some circumstances) to fail as the Cancel URI MUST be identical to that in the INVITE. See RFC 3261 sec. 9.1.

The URI is being overwritten in a call to "static void extract_uri" in chan_sip.c.


uname -a
Linux deb-raq01 2.4.23-cobalt3 #1 Wed Dec 10 00:04:31 MST 2003 i586 GNU/Linux

deb-raq01*CLI> show version
Asterisk 1.0-RC1 built by msp@debian on a i686 running Linux

I am running Debian Unstable (current).
Yes, this is a Cobalt server (don't laugh, I'm testing).

Asterisk is talking to a Cisco BTS 10200.

I did not try this on CVS as I am having difficulty getting Asterisk to build on this platform.
Comments:By: Brian West (bkw918) 2004-07-25 21:24:42

update to CVS-HEAD I think this has already been fixed.


By: lmcdowel (lmcdowel) 2004-07-26 15:19:13

The problem still exists with a copy of Today's CVS-HEAD

prefect*CLI> show version
Asterisk CVS-HEAD-07/26/04-13:33:23 built by lmcdowel@prefect on a i686 running Linux

Also, I know this seems minor, but the major problem with this is that split SIP dialing is broken (for me). For every call to a split extension, one or more of the outbound SIP calls are canceled. The cancels fail and the phones keep on ringing even after someone has answered.

By the way, majorly cool functionallity. I am using it to make my desk and mobile phones ring simultaneously. The phone company can't even do that!

By: Mark Spencer (markster) 2004-07-26 15:30:38

It might be easier if you find me on IRC, since I don't have an easy way to duplicate this environment.

By: Mark Spencer (markster) 2004-07-27 00:19:01

Nevermind, I think I got it.  I'll call it fixed in CVS and if it isn't, you can just reopen this.

By: lmcdowel (lmcdowel) 2004-07-27 15:00:03

Ok, the CANCEL's are sticking now, but the ACK's to the INVITE terminations aren't for the same reason (Request-URI mismatch). (RFC 3261 Sec.

I didn't open another Bug Report as this seems like the same issue.

I am attaching another SIP trace.

edited on: 07-27-04 14:45

By: Mark Spencer (markster) 2004-07-27 15:14:44

Okay should be fixed in CVS as well now, reopen if not.

By: Digium Subversion (svnbot) 2008-01-15 15:03:41.000-0600

Repository: asterisk
Revision: 3522

U   trunk/channels/chan_sip.c

r3522 | markster | 2008-01-15 15:03:40 -0600 (Tue, 15 Jan 2008) | 2 lines

Make request URI in CANCEL match that of the original INVITE exactly (bug ASTERISK-2105)



By: Digium Subversion (svnbot) 2008-01-15 15:03:42.000-0600

Repository: asterisk
Revision: 3524

U   trunk/channels/chan_sip.c

r3524 | markster | 2008-01-15 15:03:42 -0600 (Tue, 15 Jan 2008) | 2 lines

Make ACK sticky too (bug ASTERISK-2105)