[OpenSIPS-Users] dialog and CANCEL

Denis Putyato denis7979 at mail.ru
Fri Apr 15 13:59:47 CEST 2011


Hello Bogdan

 

And if I use in onreply_route 

 

if (status=~"200||18[0,3]" && $rm=="INVITE") {

if (t_was_cancelled()) {

   exit;

  }

}

 

This will help?

 

 

From: Bogdan-Andrei Iancu [mailto:bogdan at opensips.org] 
Sent: Wednesday, April 06, 2011 6:35 PM
To: OpenSIPS users mailling list
Cc: Denis Putyato
Subject: Re: [OpenSIPS-Users] dialog and CANCEL

 

Hi Denis,

On 03/21/2011 01:55 PM, Denis Putyato wrote: 

Hello

 

There is such scheme of call

 

One gateway – 1.1.1.1

Opensips – 2.2.2.2

Another gateway – 3.3.3.3

Calls from 1.1.1.1 to 3.3.3.3 through 2.2.2.2

I use CDR_flag for accounting

 

As you can see in testlog file, 1.1.1.1 trying cancel initial request by sending CANCEL, this CANCEL Opensips forwarding to 3.3.3.3 but from 3.3.3.3 Opensips receives 200 OK on INVITE. Because of this there is no CANCEL of the dialog on Opensips and after 1800 sec (see “default_timeout”) I have a CDR record in Opensips with duration of 1800 sec.

 

The question. Why does Opensips forward 200 OK from 3.3.3.3 to 1.1.1.1 when initial request was cancelled, and why Opensips makes accounting dialog when initial request was cancelled?  

RFC3261 says a proxy must forward all 2xx replies (disregarding the transaction state), just to solve the possible race between CANCEL and 2xx -> such race must be handled by end point and not by proxy.

So, it your case, if caller sent a CANCEL but still receives a 200 (callee picked up before actually receiving the CANCEL from caller), the caller must sent a BYE and the callee should send a negative reply to the CANCEL.

So, it is a bug in the caller device.

Regards,
Bogdan




-- 
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110415/ecc0f2fc/attachment.htm>


More information about the Users mailing list