<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Courier New, Courier, monospace">Hi!<br>
<br>
And the same goes for removing headers like the stripping that
loose_route() does?<br>
<br>
So consequtive calls to loose_route() will actually check same
route-header twice?,<br>
Or will the first actually remove a route: (if it matches "us") ?<br>
<br>
Thanks a lot for the quick reply!<br>
<br>
TQ<br>
</font></font><br>
Daniel-Constantin Mierla skrev:
<blockquote cite="mid:4766F02E.1000809@voice-system.ro" type="cite"><br>
Hello,
  <br>
  <br>
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.
  <br>
  <br>
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:
  <br>
  <br>
$du = "sip:ip:port";
  <br>
  <br>
Cheers,
  <br>
Daniel
  <br>
  <br>
  <br>
On 12/17/07 22:29, Taisto Qvist wrote:
  <br>
  <blockquote type="cite">Hi Guys,
    <br>
    <br>
I have been trying all day, to create "static routing" in my
openser-proxy(1.3).
    <br>
    <br>
My openser-script is based on the default, so what I am doing is just:
    <br>
    <br>
-------------------------------------------
    <br>
if ( loose_route() )
    <br>
{
    <br>
&nbsp;&nbsp;&nbsp; // strip of preloaded route is NOT being done here??
    <br>
&nbsp;&nbsp;&nbsp; route();
    <br>
}
    <br>
    <br>
if ( isToMe() )
    <br>
{
    <br>
&nbsp;&nbsp;&nbsp; // Do local logic
    <br>
}
    <br>
else
    <br>
{
    <br>
&nbsp;&nbsp;&nbsp; // forward this via proxyX
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append_hf("Route: &lt;sip:1.1.1.1:5060;lr&gt;\r\n");
    <br>
&nbsp;&nbsp;&nbsp; if (loose_route() )
    <br>
&nbsp;&nbsp;&nbsp; {
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; route(1);
    <br>
&nbsp;&nbsp;&nbsp; }
    <br>
&nbsp;&nbsp;&nbsp; else
    <br>
&nbsp;&nbsp;&nbsp; {
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // I always end up here...loose_route() always returns false...
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // because its looking at the first route, that should have been
stripped off...
    <br>
}
    <br>
-----------------------------
    <br>
    <br>
I have added lots of traces to lookup.c, and according to those, it
seems that the preloaded
    <br>
route is not stripped off properly?
    <br>
Once I get too the second "loose_route()", that function IS STILL
looking at the first
    <br>
preloaded route, which should have been stripped in the first "if".
    <br>
I am getting the feeling that the "deletion/stripping" of the first,
preloaded, Route, is not
    <br>
done directly, causing the second check, to find the first...
    <br>
    <br>
My work-around is naturally to use setdsturi(), but I thought that
loose_route() should be able
    <br>
to do all this for me...?
    <br>
    <br>
Also, this used to work, in version 1.1, about year ago :-)
    <br>
    <br>
Any toughts?
    <br>
    <br>
Regards
    <br>
Taisto Qvist
    <br>
    <br>
    <br>
------------------------------------------------------------------------
    <br>
    <br>
_______________________________________________
    <br>
Users mailing list
    <br>
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.openser.org">Users@lists.openser.org</a>
    <br>
<a class="moz-txt-link-freetext" href="http://lists.openser.org/cgi-bin/mailman/listinfo/users">http://lists.openser.org/cgi-bin/mailman/listinfo/users</a>
    <br>
&nbsp; </blockquote>
</blockquote>
</body>
</html>