<div dir="ltr">Why is erroneous to have the contact header with the backend IP? <div><br></div><div>With the record-route on the 200 Ok, the ACK should be directed to the backend IP, but containing a route header pointing to the Kamailio IP. Kamailio will loose_route() this request and send it to the backend server as expected.</div>
<div><br></div><div>Regards,</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 5, 2014 at 3:53 PM, Marc Soda <span dir="ltr"><<a href="mailto:msoda@coredial.com" target="_blank">msoda@coredial.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Olle.  I am calling record_record() on the initial INVITE.  In fact, the OK has a Record-Route header:<div>
<br></div><div>1.1.1.1 is the endpoint</div><div>2.2.2.2 is the kamailio proxy</div><div>3.3.3.3 is the backend server</div>
<div><br></div><div><div>SIP/2.0 200 OK</div><div>Via: SIP/2.0/UDP 1.1.1.1:60077;rport=46110;branch=z9hG4bK-d8754z-eb9768c7e3a2d1e7-1---d8754z-</div><div>Record-Route: <sip:2.2.2.2;lr=on;ftag=db634167;nat=yes></div>

<div>From: <<a href="mailto:sip%3Asip7878_spqa@edge.domain.com" target="_blank">sip:sip7878_spqa@edge.domain.com</a>;transport=UDP>;tag=db634167</div><div>To: <<a href="mailto:sip%3A2155555555@edge.coredial.com" target="_blank">sip:2155555555@edge.coredial.com</a>;transport=UDP>;tag=as3f9cf263</div>

<div>Call-ID: MzI5YTA3YmRkNzFiZjhhZTRkNTc2OGE1ZTc5ZjdjMmM.</div><div>CSeq: 2 INVITE</div><div>User-Agent: CoreDialPBX</div><div>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO</div><div>Supported: replaces</div>

<div>Contact: <<a href="mailto:sip%3A21555555555@3.3.3.3" target="_blank">sip:21555555555@3.3.3.3</a>></div><div>Content-Type: application/sdp</div><div>Content-Length: 266</div><div><br></div><div>v=0</div><div>o=root 13486 13487 IN IP4 3.3.3.3</div>

<div>s=session</div><div>c=IN IP4 3.3.3.3</div><div>t=0 0</div><div>m=audio 29990 RTP/AVP 0 8 101</div><div>a=rtpmap:0 PCMU/8000</div><div>a=rtpmap:8 PCMA/8000</div><div>a=rtpmap:101 telephone-event/8000</div><div>a=fmtp:101 0-16</div>

<div>a=silenceSupp:off - - - -</div><div>a=ptime:20</div><div>a=sendrecv</div></div><div><br></div><div>I don't think 3.3.3.3 should show up anywhere, it should be rewritten to 2.2.2.2.</div><div><div class="h5"><div class="gmail_extra">
<br>
<br><div class="gmail_quote">On Wed, Mar 5, 2014 at 1:34 PM, Olle E. Johansson <span dir="ltr"><<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"><br><div><div><div>On 05 Mar 2014, at 18:30, Marc Soda <<a href="mailto:msoda@coredial.com" target="_blank">msoda@coredial.com</a>> wrote:</div><br><blockquote type="cite">
<div dir="ltr">I have Kamailio setup as a proxy in front of a backend server (Asterisk).  When I make a call through the proxy, the Contact header in the 200 OK that is returned to the client has the IP of the backend server in it.  Thus, the client is sending it's ACK directly to the backend server.<div>


<br></div><div>Is there a special method to rewrite the Contact header to be Kamailio's IP?</div></div></blockquote></div>Check record_route() in the default configuration script. You need to add a route set by using record_route() in the initial transaction.</div>

<div><br></div><div>Cheers,</div><div>/O<br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>Where is a good place in the config to do this?  (my config is loosely based on this:  <a href="http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb" target="_blank">http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb</a>)</div>


<div><br></div><div>Thanks!</div><div>Marc</div><div><div><br></div>
</div></div></div>
_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br><a href="mailto:sr-users@lists.sip-router.org" target="_blank">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><br>_______________________________________________<br>


SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">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></blockquote></div><br>
</div></div></div></div>
<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>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Carlos<div><a href="http://caruizdiaz.com" target="_blank">http://caruizdiaz.com</a></div><div><a href="http://ngvoice.com" target="_blank">http://ngvoice.com</a></div>
<div>+595981146623</div></div>
</div>