<html><head></head><body bgcolor="#FFFFFF"><div>The Route header in this scenario is being used by a SIP client using kamailio as the proxy. &nbsp;You can see that it takes the value of the Route header and uses it as the URI on the outgoing side.</div><div><br></div><div>What is causing it to modify the Route header and put it back in? &nbsp;The first INVITE I supplied is coming into the kamailio server. The second is what t_relay sent upstream.&nbsp;</div><div><br></div><div>Should I just not call the loose_route function and go straight to t_relay after calling remove_hf("Route")?</div><div><br></div><div>Thanks.&nbsp;<br><br><div>Geoff Mina</div><div>Founder/CTO</div><div>Connect First Inc.</div><div>720.335.5924</div><div>888.410.3071</div><div><a href="mailto:gmina@ConnectFirst.com">gmina@ConnectFirst.com</a></div><div><br></div>Sent from my iPhone</div><div><br>On May 2, 2012, at 12:42 AM, Daniel-Constantin Mierla &lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>
  
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
  
  
    Hello,<br>
    <br>
    the Route header in initial invite is usually set by phones that
    have an outbound proxy setting. Kamailio doesn't add any Route
    header itself, unless append_hf()/insert_hf() is used --
    record_route() adds Record-Route headers.<br>
    <br>
    To deal with this case you should do loose_route() only for requests
    within dialog (those that have To header tag). For the rest just
    remove the Route header. If you look at default config file in
    v3.2.x, you will see this kind of processing (just to analyze it,
    not need to upgrade to 3.2.x).<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    On 5/2/12 12:26 AM, Geoffrey Mina wrote:
    <blockquote cite="mid:CAMgW6FQuiZEbjsZg0YPJQey9Gg9c6_U4jAG-oj2U_=A=gW-3Mg@mail.gmail.com" type="cite">Greetings,<br>
      I am confused at some functionality I am seeing with Kamailio
      1.5.4.&nbsp; I know this is an old version, but I don't have the time
      to go through a lengthy upgrade process right now.&nbsp; The issue I am
      seeing is that the server is inserting a Route header with it's
      own IP address for an unknown reason.&nbsp; Here is the initial invite
      (removed SDP for simplicity):<br>
      <br>
      INVITE <a moz-do-not-send="true" href="http://sip:13@67.207.130.146:5060">sip:13@67.207.130.146:5060</a>
      SIP/2.0<br>
      Via: SIP/2.0/UDP 68.64.220.108:5060;branch=z9hG4bK78dd33c6;rport<br>
      From: "WIRELESS CALLER" &lt;<a moz-do-not-send="true" href="mailto:sip%3A9546496707@dev-asterisk.mydomain.com">sip:9546496707@dev-asterisk.mydomain.com</a>&gt;;tag=as1cad6370<br>
      To: &lt;<a moz-do-not-send="true" href="http://sip:13@67.207.130.146:5060">sip:13@67.207.130.146:5060</a>&gt;<br>
      Contact: &lt;<a moz-do-not-send="true" href="mailto:sip%3A9546496707@68.64.220.108">sip:9546496707@68.64.220.108</a>&gt;<br>
      Call-ID: <a moz-do-not-send="true" href="mailto:43134ece101abfca6ecab20212295909@dev-asterisk.mydomain.com">43134ece101abfca6ecab20212295909@dev-asterisk.mydomain.com</a><br>
      CSeq: 102 INVITE<br>
      User-Agent: G-Tel v1.0<br>
      Max-Forwards: 70<br>
      Remote-Party-ID: "WIRELESS CALLER" &lt;<a moz-do-not-send="true" href="mailto:sip%3A9546496707@dev-asterisk.mydomain.com">sip:9546496707@dev-asterisk.mydomain.com</a>&gt;;privacy=off;screen=no<br>
      Date: Tue, 01 May 2012 18:17:50 GMT<br>
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
      NOTIFY, INFO<br>
      Supported: replaces<br>
      Route: &lt;<a moz-do-not-send="true" href="mailto:sip%3A13@boulder-voip.mydomain.com">sip:13@boulder-voip.mydomain.com</a>&gt;<br>
      P-Account-ID: 99990023<br>
      P-Proxy-Route: Yes<br>
      Content-Type: application/sdp<br>
      Content-Length: 240<br>
      <br>
      The basics of what happen next are:<br>
      <br>
      t_check_trans();<br>
      record_route();<br>
      remove_hf("P-Proxy-Route");<br>
      if(loose_route()){<br>
      &nbsp;&nbsp; route(3);<br>
      }<br>
      <br>
      <br>
      route[3]{<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply("1");<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(!t_relay()){<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_reply_error();<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
      }<br>
      <br>
      The INVITE that goes out has the funky Route: header with the
      Kamailio IP in there.&nbsp; This is causing problems for some of the
      upstream proxy servers (obviously).&nbsp; <br>
      <br>
      INVITE <a moz-do-not-send="true" href="mailto:sip%3A13@boulder-voip.mydomain.com">sip:13@boulder-voip.mydomain.com</a>
      SIP/2.0<br>
      Record-Route: <a class="moz-txt-link-rfc2396E" href="sip:67.207.130.146;lr;ftag=as1cad6370">&lt;sip:67.207.130.146;lr;ftag=as1cad6370&gt;</a><br>
      Via: SIP/2.0/UDP 67.207.130.146;branch=z9hG4bKf183.456d51e1.0<br>
      Via: SIP/2.0/UDP
68.64.220.108:5060;received=68.64.220.108;branch=z9hG4bK78dd33c6;rport=5060<br>
      From: "WIRELESS CALLER" &lt;<a moz-do-not-send="true" href="mailto:sip%3A9546496707@dev-asterisk.mydomain.com">sip:9546496707@dev-asterisk.mydomain.com</a>&gt;;tag=as1cad6370<br>
      To: &lt;<a moz-do-not-send="true" href="http://sip:13@67.207.130.146:5060">sip:13@67.207.130.146:5060</a>&gt;<br>
      Contact: &lt;<a moz-do-not-send="true" href="mailto:sip%3A9546496707@68.64.220.108">sip:9546496707@68.64.220.108</a>&gt;<br>
      Call-ID: <a moz-do-not-send="true" href="mailto:43134ece101abfca6ecab20212295909@dev-asterisk.mydomain.com">43134ece101abfca6ecab20212295909@dev-asterisk.mydomain.com</a><br>
      CSeq: 102 INVITE<br>
      User-Agent: G-Tel v1.0<br>
      Max-Forwards: 69<br>
      Remote-Party-ID: "WIRELESS CALLER" &lt;<a moz-do-not-send="true" href="mailto:sip%3A9546496707@dev-asterisk.mydomain.com">sip:9546496707@dev-asterisk.mydomain.com</a>&gt;;privacy=off;screen=no<br>
      Date: Tue, 01 May 2012 18:17:50 GMT<br>
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
      NOTIFY, INFO<br>
      Supported: replaces<br>
      P-Account-ID: 99990023<br>
      Content-Type: application/sdp<br>
      Content-Length: 240<br>
      Route: &lt;<a moz-do-not-send="true" href="http://sip:13@67.207.130.146:5060">sip:13@67.207.130.146:5060</a>&gt;<br>
      <br>
      <br>
      Any idea what may be causing this to happen and how I could
      prevent it?&nbsp; I have tried removing the Route header using the
      remove_hf("Route") before doing the t_relay, but that doesn't seem
      to help.<br>
      <br>
      Thanks,<br>
      Geoff<br>
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  

</div></blockquote></body></html>