How to enable sound connection between sipster / pjsip in docker and outside world?

佐手、 提交于 2019-12-23 04:45:47

问题


With sipster/pjsip sucessfully installed I would like to follow through the basic sipster example and record the sound from a sip connection to that sip server. Now if I run this on a local arch linux machine the sound gets recorded fully, but if I do the same on a docker machine, that I start with

docker run -p 5060:5060/udp -it myContainer

the SIP connection works, but there is no sound recorded.

A friend told me that SIP uses RTP for sound transport and that this protocol binds UDP ports from 16384 to 32767.

Now if I do

docker run -p 5060:5060/udp -p 16384-32767:16384-32767/udp -it myContainer

this takes ages and crashes eventually.

Is there a way to narrow down the RTP port range in sipster or pjsip? And am I even on the right track or might the issue be connected to the docker not having a sound device?


回答1:


Docker is not able to map a lot of ports at once. In my case I created a rtpproxy image and then I create several docker containers instances mapping 1000-by-1000 ports per container.

I am talking to a lot of guys about it and everybody says I am crazy and why I need 10k ports mapped .. then I have to explain how VoIP works ...

Regards

Luis



来源:https://stackoverflow.com/questions/39995778/how-to-enable-sound-connection-between-sipster-pjsip-in-docker-and-outside-wor

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