asterisk - 如何在星号中继 PJSIP<->SIP 上进行配置?
问题描述
我在使用 PJSIP(IP:XXXX) 到 SIP-server(IP:YYYY) 的星号上配置中继时遇到问题。我想通过 IP 配置中继,而不是使用 user:pass。
在 SIP 服务器上,我在 sip.conf 文件中有如下配置:
[asterisk-pjsip]
type=peer
context=tests
host=X.X.X.X
deny=0.0.0.0/0.0.0.0
permit=X.X.X.X
qualify=yes
disallow=all
allow=g729
allow=alaw
allow=ulaw
nat=yes
canreinvite=no
insecure=port,invite
并且在具有 PJSIP 的 SIP 服务器对等体上可用:
asterisk-pjsip X.X.X.X Yes Yes A 5060 OK (11 ms)
在 PJSIP-Server 上,我使用脚本将 SIP.conf 转换为 PJSIP.conf,在 SIP.conf 中我有:
[asterisk_sip]
type=peer
context=tests
host=Y.Y.Y.Y
deny=0.0.0.0/0.0.0.0
permit=Y.Y.Y.Y
qualify=yes
disallow=all
allow=g729
allow=alaw
allow=ulaw
nat=no
canreinvite=no
insecure=port,invite
转换为 PJSIP.conf 后,我得到了这个:
[asterisk_sip]
type = aor
contact = sip:Y.Y.Y.Y
[asterisk_sip]
type = identify
endpoint = asterisk_sip
match = Y.Y.Y.Y
[asterisk_sip]
type = endpoint
context = tests
disallow = all
allow = g729
allow = alaw
allow = ulaw
direct_media = no
aors = asterisk_sip
[acl]
type = acl
permit = Y.Y.Y.Y
deny = 0.0.0.0/0.0.0.0
当我将它传递到 /etc/asterisk/pjsip.conf 并重新加载 SIP 服务器上的配置对等时不可用:
Endpoint: asterisk_sip Unavailable 0 of inf
Transport: transport-udp udp 0 0 0.0.0.0:5060
请帮忙 :)
解决方案
问题解决了。
我找到了文件 pjsip_wizard.conf,在该文件中配置 endpiont 和我的主干工作要容易得多。
推荐阅读
- kdb - KDB/q count 行数按列的值分组
- algorithm - 以最小的损失量和最相似的空间打包矩形的算法(用于多用户视频室)
- c++ - SetDlgItemInt 不会更改嵌入资源的编辑框
- java - 如何有条件地“删除”或隐藏按钮?
- ios - 在 Swift 中带有变量的 NSLocalizedString 不起作用
- ios - 如何测试您自己的应用程序的更新 (iOS)
- javascript - 如何在 auth nuxt js 中添加过期令牌?
- python - 更改模型:
keras 在 model.summary() 输出中自动给出 - android - 使用 Kotlin 的 Firebase 云消息传递 Android
- apache-spark-sql - Spark SQL 中 OR 与 UNION 的性能对比