星号:通话已接通但没有音频

时间:2021-06-25 04:25:41

标签: asterisk pjsip

我对星号很陌生。我刚刚安装了 18 版并尝试了 2 个 pjsip 用户之间的简单调用。呼叫已建立,但没有音频。以下是跟踪:

在新堆栈中执行 [1000@home:1] Dial("PJSIP/1001-00000000", "PJSIP/1000,20") 称为 PJSIP/1000 PJSIP/1000-00000001 正在响铃 0x7f830403af20 -- 远程地址设置为:192.168.16.198:7078后严格RTP学习 PJSIP/1000-00000001 已回答 PJSIP/1001-00000000 0x7f83040178d0 -- 远程地址设置为:192.168.18.148:7078后严格RTP学习 通道 PJSIP/1000-00000001 加入了 'simple_bridge' basic-bridge

配置文件: pjsip.conf:

[general]
hasvoicemail = yes

[template_home]
dtfmfmode = rfc2833

[transport_udp]
type = transport
protocol = udp
bind = 0.0.0.0


[1000]
fullname = user1

[1000]
type = aor
max_contacts = 1

[1000]
type = auth
username = 1000
password = 1234

[1000]
type = endpoint
context = home
disallow = all
allow = ulaw
allow = alaw
direct_media = no
mailboxes = user1@mydomain.com
auth = 1000
outbound_auth = 1000
aors = 1000


[1001]
fullname = user2

[1001]
type = aor
max_contacts = 1

[1001]
type = auth
username = 1001
password = 1234

[1001]
type = endpoint
context = home
disallow = all
allow = ulaw
allow = alaw
direct_media = no
mailboxes = contact@mydomain.com
auth = 1001
outbound_auth = 1001
aors = 1001

extensions.conf:

 [general]
static=yes
writeprotect=yes
priorityjumping=no
autofallthrough=no


[home]
exten => _100X,1,Dial(PJSIP/${EXTEN},20)
exten => _100X,n,Hangup()

感谢任何帮助或建议。 谢谢。

1 个答案:

答案 0 :(得分:-1)

我解决了我的问题。在 pjsip.conf 中缺少传输并且 direct_media 是错误的。该文件的新工作版本是:

[general]
hasvoicemail = yes

[template_home]
dtfmfmode = rfc2833

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0


[1000]
fullname = user1

[1000]
type = aor
max_contacts = 10

[1000]
type = auth
username = 1000
password = anauser2

[1000]
type = endpoint
transport=transport-udp
context = home
disallow = all
allow = ulaw
allow = alaw
direct_media = yes
mailboxes = user1@mydomain.com
auth = 1000
outbound_auth = 1000
aors = 1000


[1001]
fullname = user2

[1001]
type = aor
max_contacts = 10

[1001]
type = auth
username = 1001
password = 1234

[1001]
type = endpoint
transport=transport-udp
context = home
disallow = all
allow = ulaw
allow = alaw
direct_media = yes
mailboxes = user2@mydomain.com
auth = 1001
outbound_auth = 1001
aors = 1001
相关问题