<!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">
Hello,<br>
<br>
it might not be the solution, because they should route based on
Record-Route headers, not on Contact header. Anyhow changing the
Contact will break the routing, so you will need to store somehow the
original contact.<br>
<br>
You can do manual detection in case you do bridging, by checking the
receiving interface, $Ri is the local IP where the request was
received, therfore you will be sending on the other interface. Are you
doing force send socket to select outgoing interface? If yes, then is
where you know the local ip for sending.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
On 4/30/10 6:32 PM, Uriel Rozenbaum wrote:
<blockquote
 cite="mid:x2q69b7f9b31004300932kdf9dde21ra0f3c19bc21c5a1d@mail.gmail.com"
 type="cite">Guys,<br>
  <br>
I'm successfully using a Kamailio + RTPproxy setup in bridge mode with
most of my Gateways. My setup includes two different interfaces one
with a public IP and teh other with the private IP.<br>
  <br>
Now I'm facing some slight issue. Some providers won't accept my calls
(or calls will have some strange behavior) if the Contact header has an
IP out of immediate range.<br>
  <br>
I tried to use fix_nated_contact() function but as per my topology,
this function will not change the contact header because the IP is
already the one on the interface.<br>
  <br>
Example:<br>
U 192.168.200.X:5060 -&gt; 192.168.200.Y:5060<br>
INVITE <a class="moz-txt-link-abbreviated" href="mailto:sip:111160911097@192.168.200.Y">sip:111160911097@192.168.200.Y</a> SIP/2.0.<br>
Via: SIP/2.0/UDP 192.168.200.X:5060;branch=z9hG4bK096baacc;rport.<br>
From: "Uriel Rozenbaum"
<a class="moz-txt-link-rfc2396E" href="mailto:sip:60911100@192.168.200.X">&lt;sip:60911100@192.168.200.X&gt;</a>;tag=as32794d5e.<br>
To: <a class="moz-txt-link-rfc2396E" href="mailto:sip:111160911097@192.168.200.Y">&lt;sip:111160911097@192.168.200.Y&gt;</a>.<br>
Contact: &lt;sip:60911100@<b style="color: rgb(255, 0, 0);">192.168.200.X</b>&gt;.<br>
  <br>
U 200.A.A.A:5060 -&gt; 200.B.B.B:5060<br>
INVITE <a class="moz-txt-link-abbreviated" href="mailto:sip:898960911097@200.B.B.B">sip:898960911097@200.B.B.B</a> SIP/2.0.<br>
Record-Route: &lt;sip:200.A.A.A;r2=on;lr=on;ftag=as32794d5e&gt;.<br>
Record-Route: &lt;sip:192.168.200.Y;r2=on;lr=on;ftag=as32794d5e&gt;.<br>
Via: SIP/2.0/UDP 200.A.A.A;branch=z9hG4bK5222.14fbf4f7.0.<br>
Via: SIP/2.0/UDP
192.168.200.X:5060;received=192.168.200.X;branch=z9hG4bK096baacc;rport=5060.<br>
From: "Uriel Rozenbaum"
<a class="moz-txt-link-rfc2396E" href="mailto:sip:60911100@192.168.200.X">&lt;sip:60911100@192.168.200.X&gt;</a>;tag=as32794d5e.<br>
To: <a class="moz-txt-link-rfc2396E" href="mailto:sip:111160911097@192.168.200.Y">&lt;sip:111160911097@192.168.200.Y&gt;</a>.<br>
Contact: &lt;sip:60911100@<b style="color: rgb(255, 0, 0);">192.168.200.X</b>&gt;.<br>
  <br>
Is there any way to let know Kamailio the outgoing IP I'll be using and
fix the contact accordingly?<br>
I can trigger this change after I know the destination IP.<br>
  <br>
Thanks!<br>
Uriel<br>
  <br>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
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/danielconstantinmierla">http://www.linkedin.com/in/danielconstantinmierla</a> 
</pre>
</body>
</html>