Call SipJs to Asterisk 12



我试图从SIpJs呼叫Asterisk 12。我的同伴在这里

[6002]
type=friend
secret=6002
host=dynamic
context=public
transport=ws
avpf=yes
icesupport=no
encryption = no

我的JsSip代码在这里

  var configuration = {
            'ws_servers': 'ws://192.168.0.102:8088/ws',
            'uri': 'sip:6002@192.168.0.102',
            'password': '6002'
        };
var options = {
            'eventHandlers': eventHandlers,
            'mediaConstraints': {'audio': true, 'video': false}
        };
        function call() {
            coolPhone.call('sip:6003@192.168.0.102', options);
        }

它是正确的注册,但当我调用"call"函数星号记录这个错误

 Rejecting secure audio stream without encryption details: audio 46421 RTP/SAVPF 111 103 104 0 8 106 105 13 126

JSSIp error is here

呼叫失败,原因:不兼容的SDP

有人能帮我吗?

首先,您需要为DTLS创建证书。然后启用来自每个对等点的DTLS。

使用以下命令创建证书。(将X.X.X.X替换为您的星号服务器IP)

mkdir /etc/asterisk/keys
cd ${ASTERISKSOURCE_PATH}/contrib/scripts/
./ast_tls_cert -C X.X.X.X -O "My Super Company" -d /etc/asterisk/keys

然后添加以下键与您的对等:

dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer
dtlsverify=no ; Tell Asterisk to not verify your DTLS certs
dtlscertfile=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS cert file is
dtlsprivatekey=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS private key is
dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when setting up DTLS

相关内容

  • 没有找到相关文章

最新更新