<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Denis,<br>
<br>
On 03/21/2011 01:55 PM, Denis Putyato wrote:
<blockquote cite="mid:007501cbe7be$ed5a4630$c80ed290$@ru"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">There is such scheme of
call<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">One gateway – 1.1.1.1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Opensips – 2.2.2.2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Another gateway –
3.3.3.3<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Calls from 1.1.1.1 to
3.3.3.3 through 2.2.2.2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I use CDR_flag for
accounting<o:p></o:p></span></p>
<span lang="EN-US"><o:p></o:p></span>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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? <br>
</span></p>
</div>
</blockquote>
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.<br>
<br>
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.<br>
<br>
So, it is a bug in the caller device.<br>
<br>
Regards,<br>
Bogdan<br>
<br>
<pre class="moz-signature" cols="72">--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"</pre>
</body>
</html>