There are several ways of doing this, to name a few:
- 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.
- 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.
- 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".
[1]: http://www.opensips.org/html/docs/modules/2.3.x/acc#id295391
[2]: http://www.opensips.org/html/docs/modules/2.3.x/dialog.html#id297615
Regards,
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 25.01.2017 14:52, Khalil Khamlichi wrote:
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.
On Wed, Jan 25, 2017 at 12:32 PM, Stefano Pisani
<stefano.pis...@omnianet.it <mailto:stefano.pis...@omnianet.it>> wrote:
please explain better
Il 25 Gennaio 2017 13:24:57 CET, Khalil Khamlichi
<khamlichi.kha...@gmail.com <mailto:khamlichi.kha...@gmail.com>>
ha scritto:
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.
-- Inviato dal mio cellulare Android con K-9 Mail.
_______________________________________________
Users mailing list
Users@lists.opensips.org <mailto:Users@lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users