[Users] LCR failure_route appending characters to invite

Lyle Thaut lyle at digilink.net
Mon Apr 16 23:55:39 CEST 2007


Hello All,

I'm having problems when calling next_gw from a failure_route.  It 
appears that extra characters are getting appended after the 
transport=udp portion of the INVITE.

This first INVITE that goes out on the wire looks normal.  I'm 
intentionally causing the 1st gateway to be offline (time out) so it 
failure routes to the next gw:
SIP/SD Request: INVITE sip:1310xxxyyyy at 192.168.18.13:5060;transport=udp

The next INVITE to the next gw (called from failure_route) fails due to 
extra characters.  Note the \000dp after the transport=udp:
SIP/SD Request: INVITE 
sip:1310xxxyyyy at 192.168.142.40:5060;transport=udp\000dp

And the same thing happens on the next failure route with the \0009b
SIP/SD Request: INVITE 
sip:1310xxxyyyy at 192.168.101.202:5060;transport=udp\0009b

Looks like I've got extras characters on each of the bad INVITES.  
\0009b = .9b & \000dp = .dp

A sample config that reproduces the problem looks like this:

# -------------------------------------------------------------
route{
    ...snip...
    route(1);
}

# -------------------------------------------------------------

route[1] {

    if(!load_gws()){
        sl_send_reply("500", "Internal server error\n");
        xlog("LCR Failure: Unable to load gateways\n");
        exit;
    };

    if(!next_gw()){
        sl_send_reply("503", "Service not available");
        xlog("LCR Failure: No gateways found\n");
        exit;
    };
    t_on_failure("1");        # Process Failures   

    if (!t_relay()) {
        sl_reply_error();
    };
    exit;
}

# -------------------------------------------------------------

failure_route[1]{

        if(!next_gw()){
            t_reply("503", "Service not available");
            xlog("$CwrLCR Failure: No gateways found$Cxx\n");
            exit;
        };      
        t_relay();
        exit;
}
# -------------------------------------------------------------

If I replace the next_gw call in the failure_route with a rewrite_uri(), 
append_branch() and a t_relay() then it works as desired so I believe 
that the problem is LCR related.

Debug shows the URI's seem to be correct in the gw_uri_avp:
2(12902) load_gws(): DEBUG: Added gw_uri_avp 
<sip:1|0 at 192.168.101.202:5060;transport=udp>
2(12902) load_gws(): DEBUG: Added gw_uri_avp 
<sip:1|0 at 192.168.142.40:5060;transport=udp>
2(12902) load_gws(): DEBUG: Added gw_uri_avp 
<sip:|0 at 192.168.18.13:5060;transport=udp>

System: Solaris10/Sparc64
OpenSER: 1.2.0 with TLS

Any suggestions or thoughts?

Thanks,
Lyle





More information about the sr-users mailing list