VoIP calls doesn't work in different networks (Using PJSIP and Kamailio server)

痴心易碎 提交于 2019-12-10 11:33:23

问题


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.


回答1:


Please check your IP address you have given in the kamailio configuration , use external IP address and not internal.




回答2:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!