<div dir="ltr"><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>
<div>Dear</div><div><br></div><div>Thanks for your quick reply and sorry for spamming your mailbox.</div><div><br></div><div>I am very confused about the setup of kamailio.cfg and rtpproxy.</div><div>I have an existing kamailio 4.4 - rtpproxy running and I get the config files from both and setup the new vm.</div><div>Just private connection works but the idea is to have connection from outside too.</div><div>I am sure there is a mismatch with public ip, natting and/or setup of the vm hosts file.<br></div><div><br></div><div><ul><li>architecture:</li></ul></div><div><i>- 1x virtualbox</i></div><div>  + 1x vm with bridge mode for network (get private ip address from the router). I suppose this is the PRIVATE_IP</div><div><i>+ 1x desktop (windows)</i> hosting a sipphone here Microsip (<a href="https://www.microsip.org/" target="_blank">https://www.microsip.org/</a>)</div><div><i>- 1x modem/router</i> from the telecom provider - bbox-3V+ from PROXIMUS <br></div><div>  + forced in DMZ host the Kamailio server PRIVATE_IP</div><div><br></div><div><img src="cid:ii_ku7vv6420" alt="211001 - kamailio architecture and settings.png" class="gmail-CToWUd gmail-a6T" tabindex="0" width="561" height="316"></div><div><br></div><div><ul><li>the hosts file from Kamailio + rtpproxy is (
Maybe something is wrong or missing)</li></ul></div><div><br></div><div>
<div>/etc/hosts</div><div><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>127.0.0.1       localhost<br>127.0.1.1       <a href="http://sipsecure.by-systems.be" target="_blank">sipsecure.by-systems.be</a> sipsecure<br>192.168.1.19    <a href="http://sipsecure.by-systems.be" target="_blank">sipsecure.by-systems.be</a> sipsecure<br>xxx.XXX.xxx.XXX   <a href="http://sipsecure.by-systems.be" target="_blank">sipsecure.by-systems.be</a> sipsecure<br># The following lines are desirable for IPv6 capable hosts<br>::1     localhost ip6-localhost ip6-loopback<br>ff02::1 ip6-allnodes<br>ff02::2 ip6-allrouters</div></blockquote>

</div><div><br></div><div><u><i>/etc/kamailio/kamailio.cfg</i></u></div><div><span style="font-size:6pt;font-family:Rockwell;color:white;font-weight:bold;font-style:italic">k</span><span style="font-size:6pt;font-family:Rockwell;color:white;font-weight:bold;font-style:italic">amailio.config</span></div><div>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell">#!define PUBLIC_IP "</span><span style="font-family:Rockwell">xxx.xxx.xxx.xxx</span><span style="font-family:Rockwell">"</span><span style="font-family:Rockwell"><br>
#!define PRIVATE_IP "192.168.1.19"<br>
#!define PRIVATE_NET "<a href="http://192.168.1.0/24" target="_blank">192.168.1.0/24</a></span><span style="font-family:Rockwell">“</span></span></font></p><font size="2"><span style="color:rgb(0,0,0)">

</span></font><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Consolas">#!ifdef WITH_NAT</span></span></font></p><font size="2"><span style="color:rgb(0,0,0)">

</span></font><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Consolas"># ----- </span><span style="font-family:Consolas">rtpproxy</span><span style="font-family:Consolas"> params -----</span></span></font></p><font size="2"><span style="color:rgb(0,0,0)">

</span></font><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Consolas">modparam</span><span style="font-family:Consolas">("</span><span style="font-family:Consolas">rtpproxy</span><span style="font-family:Consolas">", "</span><span style="font-family:Consolas">rtpproxy_sock</span><span style="font-family:Consolas">", "udp:</span><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell">PRIVATE_IP</span></span></font><span style="font-family:Consolas">:7722")</span></span></font></p><font size="2"><span style="color:rgb(0,0,0)">

</span></font><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Consolas"><br>
</span><span style="font-family:Consolas"># ----- </span><span style="font-family:Consolas">nathelper</span><span style="font-family:Consolas"> params -----</span></span></font></p><font size="2"><span style="color:rgb(0,0,0)">

</span></font><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Consolas">modparam</span><span style="font-family:Consolas">("</span><span style="font-family:Consolas">nathelper</span><span style="font-family:Consolas">", "</span><span style="font-family:Consolas">natping_interval</span><span style="font-family:Consolas">", 30)</span></span></font></p><font size="2"><span style="color:rgb(0,0,0)">

</span></font><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Consolas">modparam</span><span style="font-family:Consolas">("</span><span style="font-family:Consolas">nathelper</span><span style="font-family:Consolas">", "</span><span style="font-family:Consolas">ping_nated_only</span><span style="font-family:Consolas">", 1)</span></span></font></p><font size="2"><span style="color:rgb(0,0,0)">

</span></font><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Consolas">modparam</span><span style="font-family:Consolas">("</span><span style="font-family:Consolas">nathelper</span><span style="font-family:Consolas">", "</span><span style="font-family:Consolas">sipping_bflag</span><span style="font-family:Consolas">", FLB_NATSIPPING)</span></span></font></p><font size="2"><span style="color:rgb(0,0,0)">

</span></font><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Consolas">modparam</span><span style="font-family:Consolas">("</span><span style="font-family:Consolas">nathelper</span><span style="font-family:Consolas">", "</span><span style="font-family:Consolas">sipping_from</span><span style="font-family:Consolas">", "</span><span style="font-family:Consolas"><a href="mailto:sip%3Apinger@kamailio.org" target="_blank">sip:pinger@kamailio.org</a></span><span style="font-family:Consolas">")</span></span></font></p></blockquote><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Consolas"><br></span></span></font></p><font size="2"><span style="color:rgb(0,0,0)">







</span></font><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><u><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell;font-style:italic">Etc</span><span style="font-family:Rockwell;font-style:italic">/default/</span><span style="font-family:Rockwell;font-style:italic">rtpproxy</span></span></font></u></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><u><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell;font-style:italic"><br></span></span></font></u></p><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><u><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell;font-style:italic">
</span></span></font></u><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell">PRIVATE_IP=192.168.1.19<br></span></span></font></span></span></font></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal">
<font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell">PUBLIC_IP=</span><span style="font-family:Rockwell">xxx.xxx.xxx.xxx</span></span></font></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell"></span><span style="font-family:Rockwell"></span><span style="font-family:Rockwell"></span></span></font>
<font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell"></span><span style="font-family:Rockwell">rtpport_min</span><span style="font-family:Rockwell"></span></span></font>= 10000</p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal">
<font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell"></span><span style="font-family:Rockwell">rtpport_max</span><span style="font-family:Rockwell"></span></span></font>=20000</p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal">
<font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell">syslog</span></span></font>=DBUG:LOG_LOCAL5<br><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell"></span></span></font></span></span></font><u><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell;font-style:italic"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell"></span></span></font>

</span></span></font></u></p><font size="2"><span style="color:rgb(0,0,0)">

</span></font><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell">#Defaults for </span><span style="font-family:Rockwell">rtpproxy</span><span style="font-family:Rockwell"><br>
#The control
socket.<br>
#CONTROL_SOCK="unix:/var/run/rtpproxy/rtpproxy.sock"<br>
#To listen on an UDP socket, uncomment this line:<br>
</span><span style="font-family:Rockwell">#CONTROL</span><span style="font-family:Rockwell">_SOCK=udp:</span><span style="font-family:Rockwell">127.0.0.1</span><span style="font-family:Rockwell">:7722<br>
#Additional options that are passed to the daemon.<br>
EXTRA_OPTS="-l </span><span style="font-family:Rockwell">$</span><span style="font-family:Rockwell">PRIVATE_IP</span><span style="font-family:Rockwell">/$</span><span style="font-family:Rockwell">PUBLIC_IP</span><span style="font-family:Rockwell">
="-s $</span><span style="font-family:Rockwell">PRIVATE_IP:7222
</span><span style="font-family:Rockwell">-</span><span style="font-family:Rockwell">m $</span><span style="font-family:Rockwell">rtpport_min</span><span style="font-family:Rockwell"> -M $</span><span style="font-family:Rockwell">rtpport_max</span><span style="font-family:Rockwell"> -d
$syslog"`</span></span></font></p></blockquote><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell"><br></span></span></font></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell"></span></span></font></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell"><br></span></span></font></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell">
</span></span></font></p><div><ul><li><i><b>Misconfiguring the VM</b></i></li></ul></div><div style="margin-left:40px">That means do I need to use setup 1 or 2 or another<br></div><div style="margin-left:40px"><ol><li>2x NIC interfaces (one with private ip, second from dmz ip + NAT1:1 public ip)</li><li>1x NIC interface (one private ip and natted 1:1 with public address)</li></ol></div><div><ul><li><i><b>test</b></i></li></ul></div><div style="margin-left:40px"><ol><li><i>use case 1 : </i>connect two (2x) sipphone from private network (included kamailio) = OK</li><li><span style="color:rgb(255,0,0)"><i>use case 2 :</i> connect one (1x) codec from private ip and one (1x) codec from public network (like mobile) = 
= issue - disconnect after 30 s (register expires) start a 
conversation with audio but the caller or the callee continues to send 
and INVITE message.</span>

</li><li><span style="color:rgb(255,0,0)"><i>use case 3 :</i> connect 
two (2x) sipphone from public network = issue - disconnect after 30 s 
(register expires) start a conversation with audio but the caller or the
 callee continue to send an INVITE message.</span><i><b><br></b></i></li></ol>

</div>

<p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;unicode-bidi:embed;word-break:normal"><font size="2"><span style="color:rgb(0,0,0)"><span style="font-family:Rockwell"><br></span></span></font></p><span style="color:rgb(0,0,0)">





</span></div><div><div><div dir="ltr"><div dir="ltr"><div><span style="color:rgb(0,0,0)">Best Regards,</span><br><br>Youssef BOUJRAF</div></div></div></div></div>

</div></div></div></div></div>