[OpenSIPS-Users] opensips $Revision: 4448 $

Khalil Khamlichi khamlichi.khalil at gmail.com
Mon Jan 16 06:18:56 EST 2017


Oki, I will modify my old failure_route :


failure_route[GW_FAILOVER] {

       if (t_was_cancelled()) {
               exit;
       }

       # detect failure and redirect to next available GW
       if (t_check_status("(408)|488|([56][0-9][0-9])")) {
                #xlog("Failed GW $rd detected \n");

               if ( use_next_gw() ) {
                       t_on_failure("GW_FAILOVER");
                       t_relay();
                       exit;
               }

               send_reply("500","All GW are down");
       }
}


to :


failure_route[GW_FAILOVER] {

       if (t_was_cancelled()) {
               exit;
       }

       # detect failure and redirect to next available GW
       if (t_check_status("(408)|488|([56][0-9][0-9])")) {
               xlog("Failed GW $rd detected \n");

               if ( use_next_gw() ) {
                       t_on_failure("GW_FAILOVER");
                       *do_accounting("db|log","failed|missed",);*
                       t_relay();
                       exit;
               }

               send_reply("500","All GW are down");
       }
}


right ?

On Mon, Jan 16, 2017 at 11:07 AM, Răzvan Crainea <razvan at opensips.org>
wrote:

> I was asking you to call do_accounting() in failure route, for each leg.
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 01/16/2017 12:02 PM, Khalil Khamlichi wrote:
>
> sorry mistype, I am calling do_accounting() twice.
>
> On Mon, Jan 16, 2017 at 9:47 AM, Khalil Khamlichi <
> khamlichi.khalil at gmail.com> wrote:
>
>> thanks for your much appreciated help,
>> I am calling do_routing twice.
>>
>> Here is my actual opensips.cfg :
>>
>> route {
>> ...
>> ...
>>
>> ...
>> ...
>>         if (has_totag()) {
>>                # sequential request withing a dialog should
>>                # take the path determined by record-routing
>>                if (loose_route()) {
>>
>>                        # validate the sequential request against dialog
>>                        if ( $DLG_status!=NULL && !validate_dialog() ) {
>>                                xlog("In-Dialog $rm from $si (callid=$ci)
>> is not valid according to dialog\n");
>>                        }
>>
>>                        if (is_method("BYE")) {
>>                                # do accounting even if the transaction
>> fails
>>                                do_accounting("db|log","failed|missed",);
>>                        } else if (is_method("INVITE")) {
>>                                # even if in most of the cases is
>> useless, do RR for
>>                                # re-INVITEs alos, as some buggy clients
>> do change route set
>>                                # during the dialog.
>>                                record_route();
>>                        }
>> ...
>> ...
>>
>> ...
>> ...
>>         $acc_extra(gwid)=$avp(gw_id);
>>
>>        t_on_failure("GW_FAILOVER");
>>
>>        do_accounting("db|log","cdr|missed",);
>> #NAT
>>        if (isbflagset(NAT)) setflag(NAT);
>> #NAT
>>        route(RELAY);
>> }
>>
>> # END OF MAIN ROUTE
>>
>>
>> On Mon, Jan 16, 2017 at 8:51 AM, Răzvan Crainea <razvan at opensips.org>
>> wrote:
>>
>>> Hi, Khalil!
>>>
>>> Did you try to call the do_accounting() function for each leg going to
>>> the next gateway?
>>>
>>> Best regards,
>>>
>>> Răzvan Crainea
>>> OpenSIPS Solutionswww.opensips-solutions.com
>>>
>>> On 01/15/2017 12:24 AM, Khalil Khamlichi wrote:
>>>
>>> Hi,
>>> I am testing opensips 2.2, 2.3 I have tried to configure acc module to
>>> save to db failed calls on drouting configuration, I have found that it
>>> does save only the first failed call (that is the first gateway) it does
>>> not save to database any other failures on second and third gateways that
>>> are tried for the call.
>>> is this the expected behavioure ?
>>> Thanks for your help.
>>>
>>> regards,
>>> kh
>>>
>>>
>>> _______________________________________________
>>> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>> _______________________________________________ Users mailing list
>>> Users at lists.opensips.org http://lists.opensips.org/cgi-
>>> bin/mailman/listinfo/users
>>
>> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170116/a7dfcb0e/attachment-0001.html>


More information about the Users mailing list