[asterisk-bugs] [Asterisk 0011264]: Asterisk doesn't reply well to in-dialog OPTIONS in pedantic mode

noreply at bugs.digium.com noreply at bugs.digium.com
Sat Nov 17 13:47:45 CST 2007


The following issue has been REOPENED. 
====================================================================== 
http://bugs.digium.com/view.php?id=11264 
====================================================================== 
Reported By:                ibc
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   11264
Category:                   Channels/chan_sip/Interoperability
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.13  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             11-15-2007 14:04 CST
Last Modified:              11-17-2007 13:47 CST
====================================================================== 
Summary:                    Asterisk doesn't reply well to in-dialog OPTIONS in
pedantic mode
Description: 
A way to monitorize a SIP dialog is by sending in-dialog OPTIONS so the
UAC/UAS replies with 200 OK if that dialog exists or 404 if not.

Asterisk with pedantic=no replies a "404 Not Found" correctly but in
pedantic=yes it replies with a "481 Call/Transaction Does Not Exist".

I'm not 100% sure (I'll try to confirm it) but I think it should reply
with a 404 instead of 481 in this case (OPTIONS in-dialog).
====================================================================== 

---------------------------------------------------------------------- 
 ibc - 11-17-07 13:47  
---------------------------------------------------------------------- 
Sorry, I reopen this bug because now I've confirmed it exists:

As I said, RFC 3261 says that a way to monitorize a SIP dialog is by
sending in-dialog OPTIONS so the UAC/UAS replies with 200 OK if that dialog
exists or 404/481 if not.

With Twinkle I can send an in-dialog OPTIONS (menu "Call" - "Terminal
capabilities" during a call), so it lets me testing it.


Two cases:


1) The phone sends the INVITE to Asterisk:

If Twinkle calls to 500 at asterisk (and that extension exists) the Asterisk
replies a 200 OK with "Contact: sip:500 at IP_Asterisk".
So if Twinkle sends now and in-dialog OPTIONS it's sent to
"sip:500 at IP_Asterisk" and Asterisk replies with a "200 OK":

If during same dialog I send the same in-dialog OPTIONS but changing the
Call-ID (or From/To tag in pedantic mode) the Asterisk replies a 404 (481
in pedantic mode), so it's OK, it works :)


2) Asterisk sends the INVITE to Twinkle:

In this case Asterisk sends an INVITE with "Contact:
sip:asterisk at IP_Asterisk". Of course, "asterisk" is not a valid extension
when calling to Asterisk.

So Twinkle accepts the call and sends an in-dialog OPTIONS:
  OPTIONS sip:asterisk at IP_Asterisk SIP/2.0
  Call-ID: "the correct value"
  From: ...
  To: ...
  ...

so because "asterisk" is not a valid extension it replies with a 404 :(
But in fact it should reply with a 200 OK since the session exists, and
since this is an in-dialog request it should match the Call-ID (and From/To
tags if pedantic mode) against the active sessions and reply with 200 OK if
the dialog exists.

Nortel and Cisco gateways use those in-dialog OPTIONS to monitorize the
status of a dialog, so if Asterisk generates the INVITE but replies with
404 when receiving an in-dialog OPTIONS then the gateway would end the
call. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-17-07 13:47  ibc            Status                   closed => feedback  
11-17-07 13:47  ibc            Resolution               no change required =>
reopened
11-17-07 13:47  ibc            Note Added: 0073848                          
======================================================================




More information about the asterisk-bugs mailing list