<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><tt>Hello,<br>
<br>
The piece of script you posted is for handling the requests, so
logically, you cannot inspect the reply code (for BYE) when you
are still routing the BYE request - right :) ?<br>
<br>
So, in the script, when handling the BYE request, you need to
arm a failure_route (to catch the negative replies) and to check
in that route what is the reply code -> do the acc.<br>
<br>
Let me know if you have problems in scripting this.<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>
On 05.02.2014 06:36, Wilmar Campos wrote:<br>
</div>
<blockquote
cite="mid:CAH_cxxGYCWOSFGsYMgqmcTbNR4HVBAHtYFhAMO0ert6v51vFxw@mail.gmail.com"
type="cite">
<div dir="ltr">Hi All,
<div><br>
</div>
<div>I am trying to log into the database all BYE messages that
contains the return code 481.</div>
<div><br>
</div>
<div>I have this piece of code:</div>
<div>
<div> if (has_totag() &&
is_method("INVITE|ACK|BYE|UPDATE"))</div>
<div> {</div>
<div> if(loose_route()) {</div>
<div> if(!match_dialog())</div>
<div> exit;</div>
<div><br>
</div>
<div> if (is_method("BYE")) {</div>
<div> if(t_check_status("481"))</div>
<div> acc_db_request("481
No","acc_bye");</div>
<div> }</div>
</div>
<div><br>
</div>
<div>But is giving me this error.</div>
<div>ERROR:tm:t_check_status: cannot check status for a reply
which has no transaction-state established<br>
</div>
<div><br>
</div>
<div>I have try different ways to accomplish this without any
luck.</div>
<div><br>
</div>
<div>Can anyone please point me to the right direction?</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>
Wilmar</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
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>
<br>
</body>
</html>