首页 > 解决方案 > 如何在星号中继 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

请帮忙 :)

标签: asterisksippjsip

解决方案


问题解决了。

我找到了文件 pjsip_wizard.conf,在该文件中配置 endpiont 和我的主干工作要容易得多。


推荐阅读