<div dir="ltr"><div><div><div><div>Hello,<br><br></div>I didn't follow your previous tread, but I suppose you use Kamailio as 'frontdoors' gate and route all your calls to external network using Kamailio. In that way you'd better use RTPEngine (<a href="https://github.com/sipwise/rtpengine">https://github.com/sipwise/rtpengine</a>) installed on Kamailio machine running with external/internal interfaces.<br><br></div>Easiest thing is to put inside LOCATION route something like that<br><br></div>if route(FROMASTERISK) {<br></div><div>          rtpengine_manage(force trust-address direction=internal direction=external);<br>}<br></div><div>else {<br></div><div>          rtpengine_manage(force trust-address direction=external direction=internal);<br>}<br><br></div><div>(in route[FROMASTERISK] put a check to be sure call is comeing from your asterisk)<br><br></div><div>and also - yes, define WITH_NAT if you're using standart configuration<br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-07-27 22:40 GMT+03:00 Tickling Contest <span dir="ltr"><<a href="mailto:tickling.contest@gmail.com" target="_blank">tickling.contest@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I added the #!define WITH_NAT option, and now the call can only be made one way. RTPProxy was started like so:<div><br></div><div><div>$ rtpproxy -l 192.168.1.101 -s udp:localhost:7722 -u kamailio</div></div><div><br></div><div><div>root@kamailioA:~# netstat -pln | egrep "kamailio|rtpproxy"</div><div>tcp        0      0 <a href="http://192.168.1.101:5060" target="_blank">192.168.1.101:5060</a>      0.0.0.0:*               LISTEN      10112/kamailio  </div><div>tcp        0      0 <a href="http://127.0.0.1:5060" target="_blank">127.0.0.1:5060</a>          0.0.0.0:*               LISTEN      10112/kamailio  </div><div>udp        0      0 <a href="http://192.168.1.101:5060" target="_blank">192.168.1.101:5060</a>      0.0.0.0:*                           10081/kamailio  </div><div>udp        0      0 <a href="http://127.0.0.1:5060" target="_blank">127.0.0.1:5060</a>          0.0.0.0:*                           10081/kamailio  </div><div>udp        0      0 <a href="http://127.0.0.1:7722" target="_blank">127.0.0.1:7722</a>          0.0.0.0:*                           10042/rtpproxy  </div><div>raw        0      0 <a href="http://0.0.0.0:255" target="_blank">0.0.0.0:255</a>             0.0.0.0:*               7           10081/kamailio  </div><div>unix  2      [ ACC ]     STREAM     LISTENING     33357    10102/kamailio      /var/run/kamailio//kamailio_ctl</div></div><div><br></div><div>My full config is at <a href="https://gist.github.com/ticklingcontest/e315972c80c82f6dfa23920c7725d60b" target="_blank">https://gist.github.com/ticklingcontest/e315972c80c82f6dfa23920c7725d60b</a></div><div><br></div><div>BTW, my entire setup, kamailio, asterisk and the phones etc. are in one private network. I think setting realtime endpoint with "direct_media=no" is pointless as all of these interactions are fronted by Kamailio.<br></div><div><br></div><div>What's going on here?  Any help is appreciated.<br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 27, 2016 at 10:15 AM, Daniel Tryba <span dir="ltr"><<a href="mailto:d.tryba@pocos.nl" target="_blank">d.tryba@pocos.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Wed, Jul 27, 2016 at 01:54:07AM -0400, SamyGo wrote:<br>
> You need to enable NAT handling in your Kamailio (#!define WITH_NAT), then<br>
> depending upon how your clients will interact with asterisk you may or may<br>
> not need a media proxy, like RTPproxy. If asterisks can send/receive media<br>
> directly from the internet then its ok for now, else you definitely need to<br>
> have rtpproxy/rtpengine in there.<br>
<br>
</span>I'd suggest to use rtpengine for all calls, it fixes most problems and<br>
uses nearly no resources (with the kernel plugin)<br>
<div><div><br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Alexandru Covalschi<br><div>VoIP engineer and system administrator<br>tel: +37367398493<br><br></div></div></div></div></div></div></div>
</div>