<div dir="ltr">You will have the same problem.<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 22, 2020 at 8:05 PM Leonid Fainshtein <<a href="mailto:leonid.fainshtein@xorcom.com">leonid.fainshtein@xorcom.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">David,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">My problem is actually rtpproxy. I have to use a particular IP as the source address for RTP sending.</div><div><div dir="ltr">Best regards,<br>Leonid Fainshtein<br>Xorcom Ltd</div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 22, 2020 at 9:51 PM David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>In terms of private/public IP addresses,in kamailio you would need to "advertise" the public IP address, such that:</div><div><br></div><div>listen=udp:<a href="http://192.168.0.10:5060" target="_blank">192.168.0.10:5060</a> ADVERTISE <a href="http://123.123.123.123:5060" target="_blank">123.123.123.123:5060</a></div><div><br></div><div>So kamailio, when sending out, utilises that public (advertise) IP address as its own address.</div><div>I don't know of any mechanism that allows you to set two different public IP addresses as advertised addresses.</div><div><br></div><div>You _can_ receive  from multiple public IPs by setting multiple aliases, like:</div><div><br></div><div>alias=<a href="http://123.123.123.123:5060" target="_blank">123.123.123.123:5060</a></div><div>alias=<a href="http://213.213.213.213:5060" target="_blank">213.213.213.213:5060</a></div><div><br></div><div>and kamailio would process them as its own IPs.</div><div>But when sending out, it will use the ADVERTISED address.</div><div><br></div><div>So the correct thing to do is to have multiple private address mapped one-to-one to public ip address, i.e.:</div><div><br></div><div><div>listen=udp:<a href="http://192.168.0.10:5060" target="_blank">192.168.0.10:5060</a> ADVERTISE <a href="http://123.123.123.123:5060" target="_blank">123.123.123.123:5060</a></div><div></div></div><div><div>listen=udp:<a href="http://192.168.0.20:5060" target="_blank">192.168.0.20:5060</a> ADVERTISE <a href="http://213.213.213.213:5060" target="_blank">213.213.213.213:5060</a></div><div></div><div><div dir="ltr"><div dir="ltr"><div><br></div><div>This _would_ work properly.</div><div><br></div><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 22, 2020 at 7:04 PM Leonid Fainshtein <<a href="mailto:leonid.fainshtein@xorcom.com" target="_blank">leonid.fainshtein@xorcom.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Can you elaborate a little? I didn't understand you.</div><div><div dir="ltr">Best regards,<br>Leonid <br><br></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 22, 2020 at 6:53 PM David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">I think mapping IPs is a one-to-one relationship </div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 22 Apr 2020 at 16:18, Leonid Fainshtein <<a href="mailto:leonid.fainshtein@xorcom.com" target="_blank">leonid.fainshtein@xorcom.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">Hi,</span><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">My server has several external IP interfaces and one internal interface. For some calls I would like to handle RTP via Ext1<->Int interfaces and for other calls: via Ext2<->Int.</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">In order to achieve this,  I don't define the '-l' rtpproxy parameter, and depending on the call, I set the required IP address as a parameter of rtpproxy_manage(). </div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">I didn't succeed to get the desired result.</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">On my testbed, I have the following interfaces:</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">Ext1: 192.168.0.31</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">Ext2: 192.168.0.32</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">Int:     10.159.65.1</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">When I try to create Ext2<->Int (192.168.0.32<-> 10.159.65.1), the packets that accepted on the internal interface are sent out from the Ext1(192.168.0.31) instead of Ext2 (192.168.0.32). It looks like the decision about the source address is made based on the IP routing table information (?).<br></div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">Also, I would like to have an advertised address for at least one external interface.</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">Is it achievable with just one instance of rtpproxy? Or, it is necessary to run two rtpproxies in the bridged mode wit configured advertize addresses?</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">Thank you in advance,</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">Leonid</div></div><div><div dir="ltr"><br></div></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>