<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 Wilmar,<br>
<br>
Are you sure you set the the failure route before routing the
BYE request out ( via t_on_failure() -
<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.10.x/tm.html#id295064">http://www.opensips.org/html/docs/modules/1.10.x/tm.html#id295064</a>
) ?<br>
<br>
BTW, what are you trying to achieve here ? simply accounting the
BYE ?<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 16:43, Wilmar Campos wrote:<br>
</div>
<blockquote
cite="mid:CAH_cxxEaxvQ7_sZw8S1s-J2euLhJVPv0yZWg5qHFL9Lc12gKpA@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Bogdam,
<div><br>
</div>
<div>Thanks for your feedback on this.</div>
<div><br>
</div>
<div>Let me explain a little better the scenario.</div>
<div><br>
</div>
<div>Customer->Opensips</div>
<div>Opensips->Provider</div>
<div><br>
</div>
<div>After the INVITE, the call get connected ok.</div>
<div>After a couple of seconds/minutes/hours, provider have an
issue and equipment on provider side gets restarted.</div>
<div>Customer notice call was now without audio, hangs UP.</div>
<div>BYE is generated from customer to Opensips, Opensips rely
the message to provider, provider responds with 481.</div>
<div><br>
</div>
<div>
<div> Opensips -> Provider SIP Request: BYE
sip:14102248770@Provider:5061</div>
<div> Provider -> Opensips SIP Status: 481 Call
leg/transaction does not exist</div>
</div>
<div><br>
</div>
<div>I have a failure_route[1], but its never being called on
this scenario.</div>
<div><br>
</div>
<div>Thanks for looking at this.</div>
<div><br>
</div>
<div>Wilmar</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, Feb 5, 2014 at 5:53 AM,
Bogdan-Andrei Iancu <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:bogdan@opensips.org"
target="_blank">bogdan@opensips.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div><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 cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
<div>
<div class="h5"> On 05.02.2014 06:36, Wilmar Campos
wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<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></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>