1

我正在尝试在 Sipjs 的帮助下为用户设置 Asterisk 语音聊天,遵循 SIPJS 文档http://sipjs.com/guides/server-configuration/asterisk上给出的说明。用户被创建并被连接。他们可以通过 Zoiper 互相呼叫。但无法通过 Sipjs 或 SipML5 调用。当任何用户从 Sipjs 或 SipMl5 调用时。控制台显示以下错误:

Connected to Asterisk 11.20.0 currently running on asterix (pid = 13719)
[Oct 14 05:25:22] NOTICE[13735][C-00000000]: chan_sip.c:25844 handle_request_invite: Call from '' (88.150.240.102:5071) to extension '90041215085741' rejected because extension not found in context 'default'.
[Oct 14 05:25:46] NOTICE[13735][C-00000001]: chan_sip.c:10005 process_sdp: Received SAVPF profle in audio offer but AVPF is not enabled, enabling: audio 23496 UDP/TLS/RTP/SAVPF 109 9 0 8
[Oct 14 05:25:46] WARNING[13735][C-00000001]: chan_sip.c:10398 process_sdp: Rejecting secure audio stream without encryption details: audio 23496 UDP/TLS/RTP/SAVPF 109 9 0 8
[Oct 14 05:25:54] WARNING[13735]: chan_sip.c:4024 retrans_pkt: Retransmission timeout reached on transmission 1faf349623b90d4f62fe562ae66d6c45 for seqno 1 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
[Oct 14 05:25:55] NOTICE[13735][C-00000002]: chan_sip.c:25844 handle_request_invite: Call from '' (88.150.240.102:5070) to extension '0041215085741' rejected because extension not found in context 'default'.

并且在安装 DTLS 证书期间,我得到“主机名:未知主机”。任何人请指导我如何正确设置 Asterisk 语音聊天。

4

1 回答 1

1

从我在您的控制台中看到的 - 第一 - 扩展在你的上下文中不存在 第二 - 在你的 sip 用户配置中设置“avpf = yes” 第三 - 在你的 sip 用户配置中设置“加密 = 是”

从你的标题我知道的是,你还没有为此生成证书 -

mkdir /etc/asterisk/keys
cd /usr/src/asterisk-13.1.0/contrib/scripts
/ast_tls_cert -C hostname -O "Some Name" -d /etc/asterisk/keys

这是网络电话的 sip 配置示例:

[1000]
host=dynamic
secret=YouPassword
context=from-internal
type=friend
encryption=yes
avpf=yes
icesupport=yes
directmedia=no
disallow=all
allow=ulaw
allow=alaw
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/keys/asterisk.pem
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass

如果您仍然有问题,请分享您的配置(希望您已配置 webrtc 支持)

于 2015-11-21T06:57:16.413 回答