Hi gentlemen,<br><br>I&#39;m having a bit of a hard time developing a bridge for media sessions.<br><br>I have a box with 2 interfaces; eth0 has the private IP p.r.i.v and eth1 has public IP p.u.b.l.<br><br>When I receive a message in the private IP I try sending the call to a public proxy we have (p.u.b.2) using Carrierroute module but the source IP used is p.r.i.v. It is obvious that p.u.b.2 will not be able to route back messages.<br>
<br><span style="font-family: courier new,monospace;">#</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">U <a href="http://192.168.200.11:5060">192.168.200.11:5060</a> -&gt; p.r.i.v:5060</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">INVITE sip:1568767139@p.r.i.v SIP/2.0.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Via: SIP/2.0/UDP 192.168.200.11:5060;branch=z9hG4bK5d94bc09.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">From: &quot;60911000&quot; &lt;sip:60911000@p.r.i.v&gt;;tag=as6d477d46.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">To: &lt;sip:1568767139@p.r.i.v&gt;.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Contact: &lt;<a href="mailto:sip%3A60911000@192.168.200.11">sip:60911000@192.168.200.11</a>&gt;.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">...</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">U p.r.i.v:5060 -&gt; p.u.b.2:5060</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">INVITE sip:1568767139@p.u.b.2 SIP/2.0.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Record-Route: &lt;sip:p.r.i.v;lr=on;ftag=as6d477d46&gt;.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Via: SIP/2.0/UDP p.r.i.v;branch=z9hG4bKf531.440788e1.0.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Via: SIP/2.0/UDP 192.168.200.11:5060;rport=5060;received=192.168.200.11;branch=z9hG4bK5d94bc09.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">From: &quot;60911000&quot; &lt;sip:60911000@p.r.i.v&gt;;tag=as6d477d46.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">To: &lt;sip:1568767139@p.r.i.v&gt;.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Contact: &lt;<a href="mailto:sip%3A60911000@192.168.200.11">sip:60911000@192.168.200.11</a>&gt;.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">...</span><br>
<br>I try then to set listen=0.0.0.0 so kamailio will be binded to all IPs but then the Route headers and Via use this 0.0.0.0<br><br><span style="font-family: courier new,monospace;">#</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">U <a href="http://192.168.200.11:5060">192.168.200.11:5060</a> -&gt; p.r.i.v:5060</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">INVITE sip:1568767139@p.r.i.v SIP/2.0.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Via: SIP/2.0/UDP 192.168.200.11:5060;branch=z9hG4bK14a00df7.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">From: &quot;60911000&quot; &lt;sip:60911000@p.r.i.v&gt;;tag=as502405cf.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">To: &lt;sip:1568767139@p.r.i.v&gt;.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Contact: &lt;<a href="mailto:sip%3A60911000@192.168.200.11">sip:60911000@192.168.200.11</a>&gt;.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">...</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">U p.u.b.l:5060 -&gt; p.u.b.2:5060</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">INVITE sip:1568767139@p.u.b.2 SIP/2.0.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Record-Route: &lt;sip:0.0.0.0;lr=on;ftag=as502405cf&gt;.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Via: SIP/2.0/UDP 0.0.0.0;branch=z9hG4bK711b.8d28549.0.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Via: SIP/2.0/UDP 192.168.200.11:5060;rport=5060;received=192.168.200.11;branch=z9hG4bK14a00df7.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">From: &quot;60911000&quot; &lt;sip:60911000@p.r.i.v&gt;;tag=as502405cf.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">To: &lt;sip:1568767139@p.r.i.v&gt;.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Contact: &lt;<a href="mailto:sip%3A60911000@192.168.200.11">sip:60911000@192.168.200.11</a>&gt;.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">...</span><br><br>In this case the destination UA cannot return the call because it does not have a valid IP to do so.<br><br>Is there any way to make Kamailio act in a different way? Like letting me modify the IP it will use for Via and Record-Route headers. Be aware that I&#39;m supposed to do some kind of mirror for calls coming from outside the network (origin is public and destination is private).<br>
<br>I&#39;m sure I&#39;ll be asking some more on this same thread as I test.<br><br>Thanks in advance!<br>Uriel<br><br>