<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi Mariana,<br>
<br>
If CANCEL hits opensips while the the INVITE is still under
processing (in a different process), the INVITE transaction will
not exist yet (it is created by t_relay), so the t_check_trans()
will return false -> script will exit without doing anything
for the CANCEL - more or less the CANCEL will be dropped without
being replied or fwded. This will force retransmission of Cancel
-> buying more time to finish the processing of the INVITE.<br>
<br>
Hope this helped.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<br>
On 01/08/2013 10:49 PM, Mariana Arduini wrote:
<blockquote
cite="mid:CABHUZgC4cJ9OtgOsix0m0gTc=ays_ZQ-fQqaZEWXapF8ry1U8w@mail.gmail.com"
type="cite">
<div dir="ltr">Hello all,
<div><br>
</div>
<div>I hope somebody can give me a kind hint on what to do here.<br>
<div><br>
</div>
<div style="">We have this piece of code for CANCEL handling:</div>
<div style=""><br>
</div>
<div style="">
<div>
# CANCEL processing</div>
<div> if (is_method("CANCEL")) {</div>
<div> if (t_check_trans()) {</div>
<div> t_relay();</div>
<div> }</div>
<div> exit;</div>
<div> }</div>
<div><br>
</div>
<div style="">What happens is sometimes we take too long to
process the INVITE due to some DB issues, and the UAC
sends us a CANCEL before we relay the INVITE. </div>
<div style=""><br>
</div>
<div style="">We don´t use t_newtran() because of this big
warning in docs saying that "<span style="color: rgb(0, 0,
0); font-family: Helvetica,Arial; font-size: 12px;
text-align: justify;">the changes on the request that
are made after this function call will not be saved into
transaction!!!</span>". We need to perform a lot of
changes in the requests and I understand this wouldn´t be
possible after calling t_newtran().</div>
<div style=""><br>
</div>
<div style="">So our transaction is not created untill we
relay the INVITE, which means that any CANCEL received
before that will be dropped.</div>
<div style=""><br>
</div>
<div style="">We also tried testing the CANCEL messages
we´re receiving in these cases with has_totag() and
loose_route(), but they won´t pass as well.</div>
<div style=""><br>
</div>
<div style="">Is there any way to verify a CANCEL message in
this scenario and relay it in case is belongs to a valid
transaction?</div>
<div style=""><br>
</div>
<div style="">Any help will be much appreciated.</div>
<div style=""><br>
</div>
<div style="">Regards,</div>
<div style="">Mariana.</div>
</div>
</div>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>