[OpenSIPS-Users] tm param for 477?

Tito Cumpen tito at xsvoce.com
Fri Jan 12 02:35:04 EST 2018


Bogdan,


The issue is I'm not sure where to enter the   t_relay("0x02"). I don't see
it used in the standard relay route examples. I tried putting it in my
relay route like this

route[relay] {
        # for INVITEs enable some additional helper routes
        if (is_method("INVITE")) {

t_relay("0x02");

        do_accounting("evi", "missed");
        setflag(accounted);

                t_on_branch("handle_nat");
                t_on_reply("handle_nat");
                t_on_failure("missed_call");
        } else if (is_method("BYE|CANCEL")) {
                rtpengine_delete();
        }


   if (!t_relay("3")) {

if (is_method("INVITE")){


                xlog("connection failure here at $rU\n");
        #        route(handletmfail) ;
        #       exit;
}
}
        if (!t_relay()) {
                xlog("failure sending call to $rU\n");
                send_reply("500","Internal Error");
        };
        exit;
}



But it gets sent to the failure route  prior to failing the pending branch.

Thanks,
Tito


On Tue, May 9, 2017 at 6:17 AM, Bogdan-Andrei Iancu <bogdan at opensips.org>
wrote:

> Hi Tito,
>
> The 477 is locally generated by OpenSIPS prior to send the the request
> out. This is why you cannot have in in the failure route (which is
> triggered by the failure of the transaction, AFTER the request was sent
> out).
>
> What you can do is to use the 2 flag for t_relay() (see
> http://www.opensips.org/html/docs/modules/2.3.x/tm.html#t_relay) and
> check in script for the failure of t_relay().
>
> Regards,
>
> Bogdan-Andrei Iancu
>   OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
>
> OpenSIPS Summit May 2017 Amsterdam
>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>
> On 05/01/2017 10:55 PM, Tito Cumpen wrote:
>
> Group,
>
> Is there a tm param to force 477 failures to go to failure block ?
>
> IE: I have a wss socket that times out or closes connection but the UL
> entry is still active
> so the connection attempt fails and the 477 is sent back to the UAC
> instead of trying the logic in the failure block. Can anything be done here
> ?
>
>
> Thanks,
> Tito
>
>
>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180111/b49901c2/attachment.html>


More information about the Users mailing list