<div dir="ltr">So here's my rtpengine conf:<div><br></div><div><font face="monospace">[rtpengine]<br>interface=internal/[PRIVATE_IP];external/[PRIVATE_IP]![PUBLIC_IP]<br>foreground=true<br>log-stderr=true<br>listen-ng=[PRIVATE_IP]:22222<br>port-min=23000<br>port-max=32768<br>recording-dir=/tmp<br>recording-method=pcap<br>recording-format=eth<br>log-level=6<br>delete-delay=0</font><br></div><div><font face="monospace"><br></font></div><div><font face="monospace">and in Kamailio, you listen on 2 ports, one for the public side, the other for the private:</font></div><div><font face="monospace"><br></font></div><div><font face="monospace">listen=LISTEN_PRIVATE_PROTO:LISTEN_PRIVATE_IF:LISTEN_PRIVATE_PORT advertise ADVERTISE_IP:ADVERTISE_PORT<br>listen=LISTEN_PRIVATE_PROTO:LISTEN_PRIVATE_IF:5080<br></font></div><div><br></div><div><font face="monospace">This is basically my setup, it should be straightforward.</font></div><div><br></div><img src="cid:ii_klvcq2zp2" alt="Screenshot 2021-03-04 at 20.58.47.png" width="562" height="498"><br><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>Hope that helps</div><div><br></div><div>Regards,<br></div></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 Thu, Mar 4, 2021 at 5:18 PM Julien Klingenmeyer <<a href="mailto:julien.klingenmeyer@ovhcloud.com">julien.klingenmeyer@ovhcloud.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 lang="FR" style="overflow-wrap: break-word;">
<div class="gmail-m_6845943787192749266WordSection1">
<p class="MsoNormal"><span>Hi Hossein,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">What do you mean by ‘some issue in host-mode’?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">We use both Kamailio and RTPEngine in Kubernetes clusters with Multus CNI to manage both private and public interfaces and we have not encountered any issues so far with this configuration.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Kind regards<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Julien<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">De : </span></b><span style="font-size:12pt;color:black">sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.kamailio.org</a>> au nom de H Yavari <<a href="mailto:hyavari@rocketmail.com" target="_blank">hyavari@rocketmail.com</a>><br>
<b>Répondre à : </b>"Kamailio (SER) - Users Mailing List" <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Date : </b>mercredi 3 mars 2021 à 20:05<br>
<b>À : </b>"Kamailio (SER) - Users Mailing List" <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Objet : </b>[SR-Users] Kamailio and Asterisk in K8s<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Helvetica Neue"">Hi to all,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Helvetica Neue""><u></u> <u></u></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Helvetica Neue"">I am going to run multiple Asterisk instances (Pods) in my Kubernetes cluster. I have a stateless Kamailio sip proxy also. We know that K8s can't handle port range for its services,
So we have to use host network for Asterisk deployment. But in this mode, Asterisk pods can't connect to other pods through local IPs and you have to add a second network interface to your pods. One solution is using something like Multus that provides multi-home
pods. But it has some issue in host-mode!<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Helvetica Neue""><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Helvetica Neue"">Also, Using media proxy like RTPEngine in front of Asterisk instances doesn't make a change. You have to run RTPEngine in the host mode or just run it on a VM with multiple NIC.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Helvetica Neue"">What is the practical solution for this scenario?<u></u><u></u></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Helvetica Neue""><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Helvetica Neue"">Thank you.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Helvetica Neue""><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Helvetica Neue"">BR<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Helvetica Neue"">Hossein<u></u><u></u></span></p>
</div>
</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>