我在 Ubuntu 14.04 上设置了一个 Asterisk 服务器 (14.0.2)。我可以使用 ulaw 从 Twilio 和 Zoiper (无 STUN 或 ICE) 获取声音。在每种情况下,Asterisk 服务器都会播放 gsm 文件。
虽然 Linphone 或 Blink 软件电话都注册正常,但我无法从它们那里获得任何声音。它们安装在 Ubuntu 16.04 笔记本电脑(Dell Inspiron-13-7359)上。我已启用手机上可用的所有编解码器,并尝试了笔记本电脑上所有可用的音频设备设置。任何帮助都将不胜感激。
这是我的 Asterisk PJSIP 配置。
[transport-udp-nat]
type = transport
protocol = udp
bind = 0.0.0.0
; NAT settings
local_net = 10.0.0.0/8
external_media_address = 12.345.67.254
external_signaling_address = 12.345.67.254
[endpoint-internal](!)
type = endpoint
transport = transport-udp-nat
context = Local
disallow=all
allow=ulaw
allow=alaw
allow=slin
allow=g729
allow=g722
allow=opus
allow=gsm
direct_media = no
trust_id_outbound = yes
device_state_busy_at = 1
dtmf_mode = rfc4733
这是星号中的核心显示编解码器(已删除)
3 audio alaw alaw (G.711 a-law)
19 audio speex speex (SpeeX)
20 audio speex speex16 (SpeeX 16khz)
21 audio speex speex32 (SpeeX 32khz)
23 audio g722 g722 (G722)
18 audio g729 g729 (G.729A)
8 audio slin slin (16 bit Signed Linear PCM)
9 audio slin slin12 (16 bit Signed Linear PCM (12kHz))
10 audio slin slin16 (16 bit Signed Linear PCM (16kHz))
11 audio slin slin24 (16 bit Signed Linear PCM (24kHz))
12 audio slin slin32 (16 bit Signed Linear PCM (32kHz))
13 audio slin slin44 (16 bit Signed Linear PCM (44kHz))
14 audio slin slin48 (16 bit Signed Linear PCM (48kHz))
15 audio slin slin96 (16 bit Signed Linear PCM (96kHz))
16 audio slin slin192 (16 bit Signed Linear PCM (192kHz))
2 audio ulaw ulaw (G.711 u-law)
4 audio gsm gsm (GSM)
redundancy)
28 audio opus opus (Opus Codec)
答案1
端点配置中需要 rtp_symmetrical = yes。
直到我删除 gsm 编解码器后才起作用,可能一个端点的编解码器太多了。