[OpenSER-Users] Using append_hf("Route: xx") and loose_route() not stripping pre-loaded routeset?

Taisto Qvist taisto.qvist at ip-solutions.se
Mon Dec 17 21:29:39 CET 2007


Hi Guys,

I have been trying all day, to create "static routing" in my
openser-proxy(1.3).

My openser-script is based on the default, so what I am doing is just:

-------------------------------------------
if ( loose_route() )
{
    // strip of preloaded route is NOT being done here??
    route();
}

if ( isToMe() )
{
    // Do local logic
}
else
{
    // forward this via proxyX
        append_hf("Route: <sip:1.1.1.1:5060;lr>\r\n");
    if (loose_route() )
    {
       route(1);
    }
    else
    {
       // I always end up here...loose_route() always returns false...
       // because its looking at the first route, that should have been
stripped off...
}
-----------------------------

I have added lots of traces to lookup.c, and according to those, it
seems that the preloaded
route is not stripped off properly?
Once I get too the second "loose_route()", that function IS STILL
looking at the first
preloaded route, which should have been stripped in the first "if".
I am getting the feeling that the "deletion/stripping" of the first,
preloaded, Route, is not
done directly, causing the second check, to find the first...

My work-around is naturally to use setdsturi(), but I thought that
loose_route() should be able
to do all this for me...?

Also, this used to work, in version 1.1, about year ago :-)

Any toughts?

Regards
Taisto Qvist


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20071217/11eb291c/attachment.htm>


More information about the sr-users mailing list