[OpenSIPS-Users] accounting problem after failover
Bogdan-Andrei Iancu
bogdan at opensips.org
Thu Feb 6 15:54:15 CET 2014
Hi Edwin,
There is no need to set DB_FLAG as missed calls - I was just
investigating some possibilities of conflict ...
The acc flags must be set before the t_relay(), so that acc module can
install some callbacks when the transaction is created.
So, everything solved at this point ?
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 05.02.2014 20:41, Edwin wrote:
> Bogdan,
>
> I did not set the DB_FLAG for triggering missed calls (tried without any
> luck), should I do this?
>
>
> I came up with this peace of routing (simplified), strange thing is I can
> clear the DB_FLAG in the reply route after a t_relay, but I can not set the
> DB_FLAG after a t_relay.
>
> Does this make any sense?:
>
> loadmodule "acc.so"
> modparam("acc", "db_url", "mysql://opensips:***@***/opensips")
> modparam("acc", "db_flag", "DB_FLAG")
> modparam("acc", "cdr_flag", "DB_FLAG")
>
> .. routing ...
>
> route[1] # inbound call
> {
> ... routing logic ...
>
> set_dlg_flag("2"); # this is a inbound call
> setflag(DB_FLAG); # db_flag and cdr_flag
> t_on_reply("1");
> t_on_failure("1"); # if offline goto failure route : mobile
>
> t_relay("0x05"); # relay call to registered client
> }
>
> route [2] # goto mobile phone and do account call
> {
> ... routing logic ...
> $rU = { mobile number }
>
> t_relay("0x05"); # route call to mobile
> }
>
>
> onreply_route[1]
> {
> if(is_dlg_flag_set("2")) # if it was an inbound call
> {
> resetflag(DB_FLAG); # we got a reply, so it's an inbound call : no
> accounting
> }
> }
>
> failure_route[1]
> {
>
> reset_dlg_flag("2"); # inbound call forwared to mobile, clear
> flag
> route(2); # goto mobile phone and do account call
> }
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/accounting-problem-after-failover-tp7589422p7589464.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
More information about the Users
mailing list