<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><tt>There are several ways of doing this, to name a few:</tt></p>
<p><tt>- catch CDR events (E_ACC_CDR) [1] in the event_route, and go
from there. This is the most straight-forward solution, giving
you lots of information to work with. However, you must be using
the "acc" module in order for it to work.</tt></p>
<p><tt>- catch dialog state change events (E_DLG_STATE_CHANGED) [2]
in the event_route, go from there. The idea is to detect when a
dialog goes from state 4 (confirmed) -> 5 (deleted). A
problem with this approach might be the limited amount of
information available in the event route.<br>
</tt></p>
<p><tt>- simply catch all BYE requests in your OpenSIPS script, and
go from there. The tricky part with this approach is to not
forget about the auto-generated BYEs (calls cut by OpenSIPS), by
also doing some handling inside the "local route".<br>
</tt></p>
<p><tt>[1]:
<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.3.x/acc#id295391">http://www.opensips.org/html/docs/modules/2.3.x/acc#id295391</a><br>
[2]:
<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.3.x/dialog.html#id297615">http://www.opensips.org/html/docs/modules/2.3.x/dialog.html#id297615</a></tt></p>
<p><tt>Regards,</tt><br>
</p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 25.01.2017 14:52, Khalil Khamlichi
wrote:<br>
</div>
<blockquote
cite="mid:CAEK98WbhNy3FwCW50=gjzYnnP4853ecNBG58v6m4Xuu0iVpgqw@mail.gmail.com"
type="cite">
<div dir="ltr">sorry the expression "run a route" was misleading,
actually we are working on a dashboard, we need to catch events
happening inside opensips to feed our counters, we hope to be
able to catch hangup event and probably the sip_code so that we
can have counters for every sip code specific to every gateway.
the other way around this is to catch the cdr insert and feed
counters.</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jan 25, 2017 at 12:32 PM,
Stefano Pisani <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:stefano.pisani@omnianet.it" target="_blank">stefano.pisani@omnianet.it</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
please explain better<span class=""><br>
<br>
<div class="gmail_quote">Il 25 Gennaio 2017 13:24:57 CET,
Khalil Khamlichi <<a moz-do-not-send="true"
href="mailto:khamlichi.khalil@gmail.com"
target="_blank">khamlichi.khalil@gmail.com</a>> ha
scritto:
<blockquote class="gmail_quote" style="margin:0pt 0pt
0pt 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="ltr">there is one more question we still
struggling with, how to run a route at each hangup,
we never found any way to do it inside opensips.
right now we catching the event upon cdr insert in
db. <br>
</div>
</blockquote>
</div>
<br>
</span>
-- Inviato dal mio cellulare Android con K-9 Mail.<br>
______________________________<wbr>_________________<br>
Users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a moz-do-not-send="true"
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
</div>
<br>
</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>