I have setup kamailio 4.2 on an azure instance as server and for client I am using PJSIP library for Android and iOS applications. The voice calls seem to work well when both the devices are connected to the same network, however, either of the device connects to a different network (or when both the devices are in different networks), they are able to register on SIP server, and even call can be triggered and accepted between both the devices but there is no audio heard on either end.
* I have even setup rtpproxy.
Can anyone please help me?
Thanks in advance.
Please check your IP address you have given in the kamailio configuration , use external IP address and not internal.
I also have faced the same issue. The only thing u need to do is install and configure rtpproxy correctly. Steps for configuring in Debian are as follows. 1) Install RTP proxy.
sudo apt-get install rtpproxy
2) In Kamailio, make it listen to unix socket of rtpproxy, because by default kamailio expects UDP.
vim /etc/kamailio/kamailio.cfg
instead of
modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722")
use
modparam("rtpproxy", "rtpproxy_sock", "unix:/var/run/rtpproxy/rtpproxy.sock")
Be sure in the top of the same file if NAT def is given as follows :
#!KAMAILIO
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
#!define WITH_PRESENCE
**#!define WITH_NAT**
#!define WITH_TLS
#!define WITH_ACCDB
3)now start rtpproxy
sudo service rtpproxy start
4)Restart Kamailio service
sudo service kamailio start
For a detailed explanation, I have googled and found a blog. Take a look on it at your ease. RTPproxy with ka
来源:https://stackoverflow.com/questions/29166375/voip-calls-doesnt-work-in-different-networks-using-pjsip-and-kamailio-server