<div dir="ltr">Definitely not adding it back anywhere.  Is it possible that loose_route() or t_relay() would add it back?  These are the relevant blocks of code this call is traversing.<br><br>xlog("L_ERR","We have a Proxy Route request, performing loose routing to end point [$(hdr(Route))]");<br>
remove_hf("P-Proxy-Route");<br>remove_hf("Route");<br>            <br>if(loose_route()){<br>               route(RELAY);<br>}else{<br>                sl_send_reply("404","Unable to route request");<br>
}<br><br><br>route[RELAY]{<br>    xlog("L_INFO", "Setting up reply handler and relaying request\n");<br>        <br>    t_on_reply("LOG");<br>    if(!t_relay()){<br>        sl_reply_error();<br>
    }<br>}<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 15, 2013 at 8:57 AM, Carsten Bock <span dir="ltr"><<a href="mailto:carsten@ng-voice.com" target="_blank">carsten@ng-voice.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Geoffrey,<br>
<br>
it looks like you add the Route header somewhere else, since the<br>
Route-Header has a different position before and after Kamailio. Maybe<br>
a lookup (with Path?) or similar? If you want to remove a header,<br>
which you added previously in the routing logic, then you will have to<br>
apply the changes before removing the header again<br>
(msg_apply_changes())... better would be not adding the header at all.<br>
<br>
Kind regards,<br>
Carsten<br>
<br>
2013/8/15 Geoffrey Mina <<a href="mailto:geoffreymina@gmail.com">geoffreymina@gmail.com</a>>:<br>
<div><div class="h5">> Can anyone tell me why Kamailio 4.0 is sending the INVITE out with the Route<br>
> Header intact?  The call is running through this block which I thought<br>
> should remove it before sending it out.  The far end is having a hard time<br>
> dealing with the fact that the Route header is in there and we aren't<br>
> looking for strict routing.<br>
><br>
> if(is_present_hf("P-Proxy-Route")){<br>
>             xlog("L_ERR","We have a Proxy Route request, performing loose<br>
> routing to end point [$(hdr(Route))]");<br>
>             remove_hf("P-Proxy-Route");<br>
>             remove_hf("Route");<br>
><br>
>             if(loose_route()){<br>
>                 route(RELAY);<br>
>             }else{<br>
>                 sl_send_reply("404","Unable to route request");<br>
>             }<br>
><br>
>         }<br>
><br>
><br>
> Here is the inbound and outbound INVITE (I have removed hosts and IPs<br>
> intentionally)<br>
><br>
> IN:<br>
><br>
> INVITE <a href="http://sip:1177000012@dialer201.blah.com:5060" target="_blank">sip:1177000012@dialer201.blah.com:5060</a> SIP/2.0<br>
> Via: SIP/2.0/UDP 0.0.0.0:5060;branch=z9hG4bK7495b309;rport<br>
> From: "<a href="tel:%2B14109972688" value="+14109972688">+14109972688</a>" <<a href="mailto:sip%3A%2B14109972688@blah.com">sip:+14109972688@blah.com</a>>;tag=as11488f8f<br>
> To: <<a href="http://sip:1177000012@dialer201.blah.com:5060" target="_blank">sip:1177000012@dialer201.blah.com:5060</a>><br>
> Contact: <<a href="mailto:sip%3A%2B14109972688@0.0.0.0">sip:+14109972688@0.0.0.0</a>><br>
> Call-ID: <a href="mailto:629cb67912fd16af758e6e7e67e89940@blah.com">629cb67912fd16af758e6e7e67e89940@blah.com</a><br>
> CSeq: 102 INVITE<br>
> User-Agent: Asterisk PBX<br>
> Max-Forwards: 70<br>
> Date: Wed, 14 Aug 2013 23:27:17 GMT<br>
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO<br>
> Supported: replaces<br>
> Route: <<a href="mailto:sip%3A1177000012@sipgateway.blah.com">sip:1177000012@sipgateway.blah.com</a>><br>
> P-Proxy-Route: Yes<br>
> Content-Type: application/sdp<br>
> Content-Length: 242<br>
><br>
><br>
> OUT:<br>
> INVITE <a href="mailto:sip%3A1177000012@sipgateway.blah.com">sip:1177000012@sipgateway.blah.com</a> SIP/2.0<br>
> Record-Route: <sip:0.0.0.0;lr;ftag=as11488f8f><br>
> Via: SIP/2.0/UDP 0.0.0.0;branch=z9hG4bK2a77.07f36206.0<br>
> Via: SIP/2.0/UDP 0.0.0.0:5060;branch=z9hG4bK7495b309;rport=5060<br>
> From: "<a href="tel:%2B14109972688" value="+14109972688">+14109972688</a>" <<a href="mailto:sip%3A%2B14109972688@blah.com">sip:+14109972688@blah.com</a>>;tag=as11488f8f<br>
> To: <<a href="http://sip:1177000012@dialer201.blah.com:5060" target="_blank">sip:1177000012@dialer201.blah.com:5060</a>><br>
> Contact: <<a href="mailto:sip%3A%2B14109972688@0.0.0.0">sip:+14109972688@0.0.0.0</a>><br>
> Call-ID: <a href="mailto:629cb67912fd16af758e6e7e67e89940@cf-dialer.com">629cb67912fd16af758e6e7e67e89940@cf-dialer.com</a><br>
> CSeq: 102 INVITE<br>
> User-Agent: Asterisk PBX<br>
> Max-Forwards: 16<br>
> Date: Wed, 14 Aug 2013 23:27:17 GMT<br>
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO<br>
> Supported: replaces<br>
> Content-Type: application/sdp<br>
> Content-Length: 242<br>
> Route: <sip:1177000012@dialer201.blah:5060><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
> <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
><br>
<br>
<br>
<br>
--<br>
Carsten Bock<br>
CEO (Geschäftsführer)<br>
<br>
ng-voice GmbH<br>
Schomburgstr. 80<br>
D-22767 Hamburg / Germany<br>
<br>
<a href="http://www.ng-voice.com" target="_blank">http://www.ng-voice.com</a><br>
mailto:<a href="mailto:carsten@ng-voice.com">carsten@ng-voice.com</a><br>
<br>
Office <a href="tel:%2B49%2040%2034927219" value="+494034927219">+49 40 34927219</a><br>
Fax <a href="tel:%2B49%2040%2034927220" value="+494034927220">+49 40 34927220</a><br>
<br>
Sitz der Gesellschaft: Hamburg<br>
Registergericht: Amtsgericht Hamburg, HRB 120189<br>
Geschäftsführer: Carsten Bock<br>
Ust-ID: DE279344284<br>
<br>
Hier finden Sie unsere handelsrechtlichen Pflichtangaben:<br>
<a href="http://www.ng-voice.com/imprint/" target="_blank">http://www.ng-voice.com/imprint/</a><br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br></div>