[SR-Users] behaviour of exit();

Grant Bagdasarian gb at cm.nl
Mon Jan 11 10:20:36 CET 2016


Hello,

I have the following statements in my config script.
When either of the IF statements is true, what does the exit function do? Will it still pass the message to the next hop or will it just abort and drop the sip message?

failure_route[DISPATCH_FAILURE] {
                xlog("L_INFO", "[R-FAILURE-ROUTE-DISPATCH-FAILURE:$ci] !>" "Route:DISPATCH_FAILURE;UnixTime:$TV(un);RequestURI:$rU;RequestMethod:$rm;Status:$rs;FromTag:$ft;ToTag:$tt;CallID:$ci;From:$fU;To:$rU\r\n");

                t_on_branch("MSG_MOD");

                if(t_is_expired()) {
                               xlog("L_INFO", "[R-FAILURE-ROUTE-DISPATCH-FAILURE:$ci] !>" "Transaction expired - aborting\r\n");
                               exit;
                }

                if (t_is_canceled()) {
                               xlog("L_INFO", "[R-FAILURE-ROUTE-DISPATCH-FAILURE:$ci] !>" "Transaction cancelled - aborting\r\n");
                               exit;
                }

Thanks.

Regards,

Grant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160111/3d3b4390/attachment.html>


More information about the sr-users mailing list