[OpenSER-Users] Using append_hf("Route: xx") and loose_route() not stripping pre-loaded routeset?
Daniel-Constantin Mierla
daniel at voice-system.ro
Tue Dec 18 08:14:26 CET 2007
Hello,
On 12/18/07 00:25, Taisto Qvist wrote:
> Hi!
>
> And the same goes for removing headers like the stripping that
> loose_route() does?
yes
>
> So consequtive calls to loose_route() will actually check same
> route-header twice?,
> Or will the first actually remove a route: (if it matches "us") ?
will mark for removal the local routes.
Cheers,
Daniel
>
> Thanks a lot for the quick reply!
>
> TQ
>
> Daniel-Constantin Mierla skrev:
>>
>> Hello,
>>
>> adding a new header is not reflected immediately in the sip message,
>> just before the relaying. The changes over the initial sip message
>> are kept is a special list, like a diff against original message.
>>
>> So, append_hf("Route: xx") followed loose_route() didn't work for
>> sure in any of the openser versions. You have to use dst uri:
>>
>> $du = "sip:ip:port";
>>
>> Cheers,
>> Daniel
>>
>>
>> On 12/17/07 22:29, Taisto Qvist wrote:
>>> 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
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.openser.org
>>> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>>>
More information about the Users
mailing list