Hello,

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 (https://github.com/sipwise/rtpengine) installed on Kamailio machine running with external/internal interfaces.

Easiest thing is to put inside LOCATION route something like that

if route(FROMASTERISK) {
          rtpengine_manage(force trust-address direction=internal direction=external);
}
else {
          rtpengine_manage(force trust-address direction=external direction=internal);
}

(in route[FROMASTERISK] put a check to be sure call is comeing from your asterisk)

and also - yes, define WITH_NAT if you're using standart configuration



2016-07-27 22:40 GMT+03:00 Tickling Contest <tickling.contest@gmail.com>:
I added the #!define WITH_NAT option, and now the call can only be made one way. RTPProxy was started like so:

$ rtpproxy -l 192.168.1.101 -s udp:localhost:7722 -u kamailio

root@kamailioA:~# netstat -pln | egrep "kamailio|rtpproxy"
tcp        0      0 192.168.1.101:5060      0.0.0.0:*               LISTEN      10112/kamailio  
tcp        0      0 127.0.0.1:5060          0.0.0.0:*               LISTEN      10112/kamailio  
udp        0      0 192.168.1.101:5060      0.0.0.0:*                           10081/kamailio  
udp        0      0 127.0.0.1:5060          0.0.0.0:*                           10081/kamailio  
udp        0      0 127.0.0.1:7722          0.0.0.0:*                           10042/rtpproxy  
raw        0      0 0.0.0.0:255             0.0.0.0:*               7           10081/kamailio  
unix  2      [ ACC ]     STREAM     LISTENING     33357    10102/kamailio      /var/run/kamailio//kamailio_ctl

My full config is at https://gist.github.com/ticklingcontest/e315972c80c82f6dfa23920c7725d60b

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.

What's going on here?  Any help is appreciated.

On Wed, Jul 27, 2016 at 10:15 AM, Daniel Tryba <d.tryba@pocos.nl> wrote:
On Wed, Jul 27, 2016 at 01:54:07AM -0400, SamyGo wrote:
> You need to enable NAT handling in your Kamailio (#!define WITH_NAT), then
> depending upon how your clients will interact with asterisk you may or may
> not need a media proxy, like RTPproxy. If asterisks can send/receive media
> directly from the internet then its ok for now, else you definitely need to
> have rtpproxy/rtpengine in there.

I'd suggest to use rtpengine for all calls, it fixes most problems and
uses nearly no resources (with the kernel plugin)


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




--
Alexandru Covalschi
VoIP engineer and system administrator
tel: +37367398493