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:bog...@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"
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to