NAT 后面的 AsteriskNOW IP PBX,客户端无法从外部网络连接
AsteriskNOW IP PBX behind NAT, clients cannot connect from outside Network
第一次接触asterisk(基本什么都不懂,多多包涵)
我是 运行 Asterisk 11.6,在具有 512/kbps 互联网连接的 virtualbox 中,它位于 NAT 之后。
有两个分机1001和1002,这些是我遇到的情况。
第 1 条:使用软电话在本地通话有效。 "no problem".
号码 2:从外部(软件电话)呼叫本地工作。 "no problem".
号码3:从本地打到外面,很快就挂断了。 "PROBLEM".
号4:call从外到外,从不工作。我可以听到拨号音,但听筒没有响应。 "PROBLEM".
我尝试转发端口 5060 两个 tcp 和 udp 没有任何变化...
我还在某处读到我有 NAT 环回错误,目前它与我无关。
我的问题是我想从外部网络连接这两个分机...
(1001)网络 1--->(服务器)网络 2--->(1002)网络 3
同样向后......我错过了什么吗?
这是我的 sip 配置。
Global Settings:
----------------
UDP Bindaddress: 0.0.0.0:5060
TCP SIP Bindaddress: Disabled
TLS SIP Bindaddress: Disabled
Videosupport: No
Textsupport: No
Ignore SDP sess. ver.: No
AutoCreate Peer: Off
Match Auth Username: No
Allow unknown access: Yes
Allow subscriptions: Yes
Allow overlap dialing: Yes
Allow promisc. redir: No
Enable call counters: No
SIP domain support: No
Realm. auth: No
Our auth realm asterisk
Use domains as realms: No
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Direct RTP setup: No
User Agent: FPBX-AsteriskNOW-12.0.76(11.16.0)
SDP Session Name: Asterisk PBX 11.16.0
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Trust RPID: No
Send RPID: No
Legacy userfield parse: No
Send Diversion: Yes
Caller ID: Unknown
From: Domain:
Record SIP history: Off
Call Events: On
Auth. Failure Events: Off
T.38 support: No
T.38 EC mode: Unknown
T.38 MaxDtgrm: 4294967295
SIP realtime: Disabled
Qualify Freq : 60000 ms
Q.850 Reason header: No
Store SIP_CAUSE: No
Network QoS Settings:
---------------------------
IP ToS SIP: CS3
IP ToS RTP audio: EF
IP ToS RTP video: AF41
IP ToS RTP text: CS0
802.1p CoS SIP: 4
802.1p CoS RTP audio: 5
802.1p CoS RTP video: 6
802.1p CoS RTP text: 5
Jitterbuffer enabled: No
Network Settings:
---------------------------
SIP address remapping: Disabled
Externhost: <none>
Externaddr: (null)
Externrefresh: 10
Localnet: 192.168.2.0/255.255.255.0
Global Signalling Settings:
---------------------------
Codecs: (gsm|ulaw|alaw|g726)
Codec Order: ulaw:20,alaw:20,gsm:20,g726:20
Relax DTMF: No
RFC2833 Compensation: No
Symmetric RTP: Yes
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 30
RTP Hold Timeout: 300
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: No
Pedantic SIP support: Yes
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 120 secs
Sub. min duration 60 secs
Sub. max duration: 3600 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Outbound reg. retry 403:0
Notify ringing state: Yes
Include CID: No
Notify hold state: Yes
SIP Transfer mode: open
Max Call Bitrate: 384 kbps
Auto-Framing: No
Outb. proxy: <not set>
Session Timers: Accept
Session Refresher: uas
Session Expires: 1800 secs
Session Min-SE: 90 secs
Timer T1: 500
Timer T1 minimum: 100
Timer B: 32000
No premature media: Yes
Max forwards: 70
Default Settings:
-----------------
Allowed transports: UDP
Outbound transport: UDP
Context: from-sip-external
Record on feature: automon
Record off feature: automon
Force rport: Yes
DTMF: rfc2833
Qualify: 0
Keepalive: 0
Use ClientCode: No
Progress inband: Never
Language:
Tone zone: <Not set>
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: *97
----
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
1001/1001 1.39.63.239 D Yes Yes A 28594 UNREACHABLE
1002/1002 106.200.190.71 D Yes Yes A 47695 OK (216 ms)
这是我上次的课程。
这里的用户1001是"UNREACHABLE"为什么?我想这就是我的问题所在。
帮帮我...
我也在寻找连接 PSTN 和 GSM 的方法。
(如果你们来自印度并且可以帮助我,我可以实际付钱给你,请回答上述问题的解决方案然后我会联系其他方法)
您必须在 sip.conf
的 [general] 部分添加 externip=your_public_ip
。
您还必须转发 RTP 端口范围。通常是 10000-20000 UDP
。您可以 see/change 这个范围 rtp.conf
.
当服务器落后于 Nat 时,SIP 总是会出现问题。
如果您的设备支持 IAX,即 Inter-Asterisk eXchange,非常适合您的情况,然后使用它。
您仍然希望解决 SIP 问题read this tutorial
第一次接触asterisk(基本什么都不懂,多多包涵)
我是 运行 Asterisk 11.6,在具有 512/kbps 互联网连接的 virtualbox 中,它位于 NAT 之后。
有两个分机1001和1002,这些是我遇到的情况。
第 1 条:使用软电话在本地通话有效。 "no problem".
号码 2:从外部(软件电话)呼叫本地工作。 "no problem".
号码3:从本地打到外面,很快就挂断了。 "PROBLEM".
号4:call从外到外,从不工作。我可以听到拨号音,但听筒没有响应。 "PROBLEM".
我尝试转发端口 5060 两个 tcp 和 udp 没有任何变化...
我还在某处读到我有 NAT 环回错误,目前它与我无关。
我的问题是我想从外部网络连接这两个分机...
(1001)网络 1--->(服务器)网络 2--->(1002)网络 3
同样向后......我错过了什么吗?
这是我的 sip 配置。
Global Settings:
----------------
UDP Bindaddress: 0.0.0.0:5060
TCP SIP Bindaddress: Disabled
TLS SIP Bindaddress: Disabled
Videosupport: No
Textsupport: No
Ignore SDP sess. ver.: No
AutoCreate Peer: Off
Match Auth Username: No
Allow unknown access: Yes
Allow subscriptions: Yes
Allow overlap dialing: Yes
Allow promisc. redir: No
Enable call counters: No
SIP domain support: No
Realm. auth: No
Our auth realm asterisk
Use domains as realms: No
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Direct RTP setup: No
User Agent: FPBX-AsteriskNOW-12.0.76(11.16.0)
SDP Session Name: Asterisk PBX 11.16.0
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Trust RPID: No
Send RPID: No
Legacy userfield parse: No
Send Diversion: Yes
Caller ID: Unknown
From: Domain:
Record SIP history: Off
Call Events: On
Auth. Failure Events: Off
T.38 support: No
T.38 EC mode: Unknown
T.38 MaxDtgrm: 4294967295
SIP realtime: Disabled
Qualify Freq : 60000 ms
Q.850 Reason header: No
Store SIP_CAUSE: No
Network QoS Settings:
---------------------------
IP ToS SIP: CS3
IP ToS RTP audio: EF
IP ToS RTP video: AF41
IP ToS RTP text: CS0
802.1p CoS SIP: 4
802.1p CoS RTP audio: 5
802.1p CoS RTP video: 6
802.1p CoS RTP text: 5
Jitterbuffer enabled: No
Network Settings:
---------------------------
SIP address remapping: Disabled
Externhost: <none>
Externaddr: (null)
Externrefresh: 10
Localnet: 192.168.2.0/255.255.255.0
Global Signalling Settings:
---------------------------
Codecs: (gsm|ulaw|alaw|g726)
Codec Order: ulaw:20,alaw:20,gsm:20,g726:20
Relax DTMF: No
RFC2833 Compensation: No
Symmetric RTP: Yes
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 30
RTP Hold Timeout: 300
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: No
Pedantic SIP support: Yes
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 120 secs
Sub. min duration 60 secs
Sub. max duration: 3600 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Outbound reg. retry 403:0
Notify ringing state: Yes
Include CID: No
Notify hold state: Yes
SIP Transfer mode: open
Max Call Bitrate: 384 kbps
Auto-Framing: No
Outb. proxy: <not set>
Session Timers: Accept
Session Refresher: uas
Session Expires: 1800 secs
Session Min-SE: 90 secs
Timer T1: 500
Timer T1 minimum: 100
Timer B: 32000
No premature media: Yes
Max forwards: 70
Default Settings:
-----------------
Allowed transports: UDP
Outbound transport: UDP
Context: from-sip-external
Record on feature: automon
Record off feature: automon
Force rport: Yes
DTMF: rfc2833
Qualify: 0
Keepalive: 0
Use ClientCode: No
Progress inband: Never
Language:
Tone zone: <Not set>
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: *97
----
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
1001/1001 1.39.63.239 D Yes Yes A 28594 UNREACHABLE
1002/1002 106.200.190.71 D Yes Yes A 47695 OK (216 ms)
这是我上次的课程。
这里的用户1001是"UNREACHABLE"为什么?我想这就是我的问题所在。
帮帮我...
我也在寻找连接 PSTN 和 GSM 的方法。
(如果你们来自印度并且可以帮助我,我可以实际付钱给你,请回答上述问题的解决方案然后我会联系其他方法)
您必须在 sip.conf
的 [general] 部分添加 externip=your_public_ip
。
您还必须转发 RTP 端口范围。通常是 10000-20000 UDP
。您可以 see/change 这个范围 rtp.conf
.
当服务器落后于 Nat 时,SIP 总是会出现问题。
如果您的设备支持 IAX,即 Inter-Asterisk eXchange,非常适合您的情况,然后使用它。
您仍然希望解决 SIP 问题read this tutorial