[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
Mon Nov 19 09:27:24 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11264 
====================================================================== 
Reported By:                ibc
Assigned To:                oej
====================================================================== 
Project:                    Asterisk
Issue ID:                   11264
Category:                   Channels/chan_sip/Interoperability
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
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-19-2007 09:27 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-19-07 09:27  
---------------------------------------------------------------------- 
Why? it's perfectly possible that an Asterisk user A can call to an
Asterisk user B, but B can't call to A:


sip.conf:

  [user_a]
  context = context_a

  [user_b]
  context = context_b


extensions.conf:

  [context_a]
  exten => user_b,1,Dial(SIP/user_b)

  [context_b]
  ;can't call to user_a


So in this case, imagine user_a calls to user_b. The "Contact" header in
the INVITE says "<sip:user_a at IP_Asterisk>".
The call is established and user_b (that could be a gateway) sends
periodically in-dialog OPTIONS to user_a at IP_Asterisk in order to test if
the dialog remains open for a correct CDR.
But since user_b can't call to user_a then it will get a 404. This is a
wrong reply since the dialog does exist.

IMHO: Asterisk shouldn't match the RURI username for in-dialog OPTIONS,
just the Call-ID (and the From/To tags if pedantic=yes), and reply 200 OK
if the dialog exists, and 404/481 if not.
This behaviour of in-dialog OPTION is not very cleared explaind in RFC3261
(but it's in fact), and many vendors implement it (Nortel, Cisco). 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-19-07 09:27  ibc            Note Added: 0073943                          
======================================================================




More information about the asterisk-bugs mailing list