[Users] How to xlog failure status in failure_route?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Oct 30 09:55:54 CET 2006


Hi Alan,

this is a known issue as a result of how the failure route was design - 
in failure route, the processed message is a request, not a reply. It 
needs to be like this in order to be able to create new branches and to 
do forward. So, the pseudo-variables have no access to the reply. This 
is possible only via TM (similar as t_check_status does). If you want to 
print the code into logs, try it from reply route.

regards,
bogdan


Alan Crosswell wrote:

>I tried xlog $rs $rr to log the reason for a failure in failure_route
>but it just logs NULL.  What am I doing wrong?  The error status is
>available to test with t_check_status and is logged by ACC but not xlog.
>
># Error from media gateway
>failure_route[4] {
>    xlog("L_INFO","failure_route[4] $si: method $rm r-uri <$ru>\n");
>    if (t_check_status("(5..)|(6..)|(403)")) {  # gateway failure/refusal
>        xlog("L_INFO","failure_route[4] gateway returned 5xx or 6xx.
>Status: $rs $rr\n");
>        if (!next_gw()) {
>            xlog("L_CRIT","No more gateways for <$tu>\n");
>            t_reply("503", "Service not available - No more gateways");
>            return;
>        } else {
>            xlog("L_INFO","failure_route[4] next gw r-uri <$ru> \n");
>            t_on_failure("4");
>            t_relay();
>            return;
>        }
>    }
>    xlog("L_INFO","failure_route[4]: relaying normal error\n");
>    t_relay();
>}
>
>
>Oct 26 18:02:04 jello /usr/sbin/openser[2028]: ACC: call missed:
>method=INVITE, i-uri=sip:9319174147124 at siptest.columbia.edu;user=phone,
>o-uri=sip:19174147124 at 67.151.91.22:50
>60;transport=udp, call_id=c141e612-75cfa484-cfce783b at 128.59.37.218,
>from="Alan Crosswell"
><sip:10508 at siptest.columbia.edu>;tag=CA5BDB76-6DB44EED, code=403 Forbidden
>Oct 26 18:02:04 jello /usr/sbin/openser[2028]: failure_route[4]
>128.59.37.218: method INVITE r-uri
><sip:19174147124 at 67.151.91.22:5060;transport=udp>
>Oct 26 18:02:04 jello /usr/sbin/openser[2028]: failure_route[4] gateway
>returned 5xx or 6xx.  Status: <null> <null>
>Oct 26 18:02:04 jello /usr/sbin/openser[2028]: failure_route[4] next gw
>r-uri <sip:19174147124 at 67.151.91.22:5060;transport=udp>
>
>_______________________________________________
>Users mailing list
>Users at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/users
>
>  
>





More information about the Users mailing list