[Users] How to xlog failure status in failure_route?

Alan Crosswell alan at columbia.edu
Fri Oct 27 00:06:21 CEST 2006


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>




More information about the Users mailing list