i have setup asterisk/rtpproxy/kamailio following the guide in https://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb and later NAT traversal with rtpproxy as i understand in simple we must have:
phone/caller-->[-->rtpproxy->kamailio->asterisk->kamailio->rtpproxy-]->phone/dest

But when you make a call between two phones, there is no sound...

...to make it work and get sound have to open the ports (range 10000 to 30000 udp) in the asterisk exposing them to the public ip whre its the kamailio and rtpproxy.

We configured kamailio with rtpproxy (also tried with rtpengine), and when I configure Asterisk and Kamailio in "real time" mode, everything goes well, the extensions are registered, the authentication is in the asterisk side (table sipusers requires ignore the version check parameter if you use kamailio 5+) etc etc .. but there's no sound, we have:

kamailio.bindip="10.10.1.1" desc "kamailio.bindip"
kamailio.bindport=5060 desc "kamailio.bindport"
asterisk.bindip="10.10.1.2" desc "asterisk.bindip"
asterisk.bindport=5060 desc "asterisk.bindport"
listen=udp:10.10.1.1:5060 advertise 200.1.1.1:5060

at rtpproxy we have:

/usr/bin/rtpproxy -s unix:/var/run/rtpproxy/rtpproxy.sock -u kamailio -p /var/run/rtpproxy/rtpproxy.pid -l 10.10.1.1 -A 200.1.1.1 -F -m 10000 -M 30000

why we need to make asterisk open the ports directly to the publlic ip?

N]OTE: the public ip are not a real interface in the kamailio/rtppropxy machine, are provided by the service AWS at amazon! a NAT kind i guess!


Lenz McKAY Gerardo (PICCORO)