如何在码头和外界的sipster / pjsip之间启用声音连接? [英] How to enable sound connection between sipster / pjsip in docker and outside world?

查看:650
本文介绍了如何在码头和外界的sipster / pjsip之间启用声音连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用sipster / pjsip成功安装我想要遵循基本的sipster示例并记录声音从sip连接到该sip服务器。现在如果我在一个本地的arch linux机器上运行,声音将被完全记录下来,但是如果我在Docker机器上执行相同的操作,那么我从

$ pre #code> docker run -p 5060:5060 / udp -it myContainer

SIP连接工作,但没有录音。



朋友告诉我,SIP使用RTP进行声音传输,并且该协议将UDP端口从16384绑定到32767。



现在如果我做

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

这需要年龄并最终崩溃。 / p>

有没有办法缩小sipster或pjsip中的RTP端口范围?我甚至在正确的轨道上,或者可能问题与没有声音设备的码头连接?

解决方案

Docker是不能一次映射很多端口。在我的情况下,我创建了一个rtpproxy映像,然后我创建了几个docker容器实例,每个容器映射1000个1000个端口。



我正在和很多人谈论它和每个人都说我很疯狂,为什么我需要10k端口映射..那么我必须解释VoIP如何工作...



Regards



路易斯


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?

解决方案

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

这篇关于如何在码头和外界的sipster / pjsip之间启用声音连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆