SIP的NAT配置(星号)

SIP的NAT配置(星号),sip,asterisk,Sip,Asterisk,我安装了一个星号服务器,在尝试时注册了几个SIP用户 *CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 2000/2000 (Unspecified) D 5060 Unmonitored 2005/2005 (Unspecified) D *N *

我安装了一个星号服务器,在尝试时注册了几个SIP用户

*CLI> sip show peers

Name/username          Host            Dyn Nat ACL Port     Status     

2000/2000              (Unspecified)   D           5060     Unmonitored 


2005/2005              (Unspecified)   D  *N   *   0        Unmonitored 

6 sip peers [Monitored: 0 online, 0 offline Unmonitored: 5 online, 1 offline]

让我知道如何为特定的SIP用户配置NAT设置,例如在这种情况下,2000年的NAT为空,2005年的NAT为N。

您可以使用CLI编辑SIP*.conf(根据您的设置)

到目前为止,星号nat支持已演变为以下选项:

nat = no                ; Do no special NAT handling other than RFC3581
nat = force_rport       ; Pretend there was an rport parameter even if there wasn't
nat = comedia           ; Send media to the port Asterisk received it from regardless of where the SDP says to send it.
nat = auto_force_rport  ; Set the force_rport option if Asterisk detects NAT (default)
nat = auto_comedia      ; Set the comedia option if Asterisk detects NAT
不要忘记为natted用户设置canreinvite=no。

我在下面为用户681展示了一个示例

[681]
deny=0.0.0.0/0.0.0.0
type=friend
secret=123456
qualify=yes
port=5060
nat=yes
dtmfmode=rfc2833
dial=SIP/681
context=from-internal
canreinvite=no
callgroup=
callerid=device <681>
accountcode=
call-limit=50
[681]
拒绝=0.0.0.0/0.0.0.0
类型=朋友
秘密=123456
合格=是
端口=5060
nat=是
dtmfmode=rfc2833
拨号=SIP/681
上下文=来自内部
canreinvite=否
呼叫组=
callerid=设备
会计代码=
通话限制=50