[asterisk-bugs] [JIRA] Commented: (ASTERISK-17883) SIP CANCEL is broken when phone is not registered to asterisk (sip friend and/or sip user)

Mark Michelson (JIRA) noreply at issues.asterisk.org
Wed Oct 3 15:44:27 CDT 2012


    [ https://issues.asterisk.org/jira/browse/ASTERISK-17883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197920#comment-197920 ] 

Mark Michelson commented on ASTERISK-17883:
-------------------------------------------

I'm going to disagree with Matt's analysis here. First off, the quotation of 8.2.6.2 is irrelevant here because that is telling a UAS what to do when generating a response, not when verifying a request.

The big thing with CANCELs is that you are attempting to match a *transaction*, not a *dialog*. In order to match a transaction, all that is required is the following, from section 17.2.3:
{quote}
      1. the branch parameter in the request is equal to the one in the
         top Via header field of the request that created the
         transaction, and

      2. the sent-by value in the top Via of the request is equal to the
         one in the request that created the transaction, and

      3. the method of the request matches the one that created the
         transaction, except for ACK, where the method of the request
         that created the transaction is INVITE.
{quote}

To further bring home the point that the CANCEL requires no to-tag, I present this e-mail from the SIP-implementors' list from July 2001: https://lists.cs.columbia.edu/pipermail/sip-implementors/2001-July/001631.html

In it, Jonathan Rosenberg, one of the authors of RFC 3261, clarifies the specifics behind SIP CANCEL. Specifically, he states:

{quote}
Everything in the CANCEL matches the INVITE. If there were no tags in the
INVITE, there are none in the CANCEL. That is the intent of the above.
{quote}

"The above" is the portion of RFC 3261 quoted by Santiago previously.

I conclude then that it is fine for a CANCEL not to contain a to-tag. This issue was reported against 1.8.4. I'm curious whether this has been fixed in the many revisions to chan_sip.c since then. This should be easy to verify using SIPp or some other such tool.

> SIP CANCEL is broken when phone is not registered to asterisk (sip friend and/or sip user)
> ------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-17883
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-17883
>             Project: Asterisk
>          Issue Type: Bug
>          Components: Channels/chan_sip/General
>    Affects Versions: 1.8.4
>            Reporter: Artem Makhutov
>            Severity: Minor
>         Attachments: sip.log
>
>
> I have discovered a bug while playing with asterisk and with the embedded sip client of an android mobile phone.
> Canceling a call is broken when the mobile phone is not registered to asterisk.
> When calling from the android phone and the other party picks up the phone everything works just fine. But when the other party does not pick up the phone and I hangup the call on the mobile then the other phone will never stop ringing.
> This problem does not occur when the mobile phone is registered to asterisk.
> Here is the relevant configuration of sip.conf:
> [2005]
> type=friend
> defaultuser=2005
> transport=udp
> fromuser=2005
> context=internal
> host=dynamic
> fromdomain=xxxxxxx
> secret=xxxxxxx
> qualify=yes
> nat=yes
> directmedia=no
> disallow=all
> allow=speex
> allow=alaw
> allow=ulaw
> allow=gsm
> allow=g729
> allow=h264

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list