无法通过 SIP 中继拨号:FreePBX/Asterisk

无法通过 SIP 中继拨号:FreePBX/Asterisk

我在 FreePBX/Asterisk 中设置了 SIP TRUNK,它非常适合接听来电。以下是相关配置:

type=friend
host=201.217.31.10
callerid=mynumber
[email protected]
[email protected]
fromuser=595XXYYZZZZZZ
fromdomain=prepago.com.py
secret=******
dtmfmode=auto
trunkname=covoip
context=from-trunk
hasexten=no
hasiax=no
hassip=yes
registeriax=no
registersip=yes
trunkstyle=voip
nat=force_rport,comedia
insecure=port,invite
disallow=all
allow=alaw,ulaw,gsm
qualify=yes

但是,每当我尝试拨打电话(通过同一中继)时,我都会收到来自 Aterisk 的“所有线路忙”信号。如果我启用SIP调试这是我收到的(显然我的电话被拒绝是因为无效别名在另一端,由于这是我的 VOIP 提供商,所以我无法控制它):

<--- SIP read from UDP:201.217.31.10:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.16.50:5061;received=190.128.230.22;branch=z9hG4bK6a440fdb;rport=5061
From: <sip:[email protected]>;tag=as3a625f1c
To: <sip:[email protected]>
Call-ID: 59fbc0e25c141a603114ce2214c9d208@[::1]
CSeq: 180 REGISTER
Contact: <sip:[email protected]:5061>;expires=30
Expires: 30
User-Agent: FPBX-AsteriskNOW-12.0.33(13.0.1)
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---
[2015-02-19 15:48:50] NOTICE[2015]: chan_sip.c:23725 handle_response_register: Outbound Registration: Expiry for 201.217.31.10 is 30 sec (Scheduling reregistration in 24 s)
Really destroying SIP dialog '59fbc0e25c141a603114ce2214c9d208@[::1]' Method: REGISTER
[2015-02-19 15:48:52] WARNING[1833]: func_cdr.c:349 cdr_write_callback: CDR requires a value (CDR(variable)=value)
Audio is at 16688
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding codec gsm to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 201.217.31.10:5060:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.16.50:5061;branch=z9hG4bK61ad8aec;rport
Max-Forwards: 70
From: <sip:[email protected]:5061>;tag=as23ae8214
To: <sip:[email protected]>
Contact: <sip:[email protected]:5061>
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: FPBX-AsteriskNOW-12.0.33(13.0.1)
Date: Thu, 19 Feb 2015 18:48:52 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 300

v=0
o=root 1709304421 1709304421 IN IP4 192.168.16.50
s=Asterisk PBX 13.0.1
c=IN IP4 192.168.16.50
t=0 0
m=audio 16688 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

---

<--- SIP read from UDP:201.217.31.10:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.16.50:5061;received=190.128.230.22;branch=z9hG4bK61ad8aec;rport=5061
From: <sip:[email protected]:5061>;tag=as23ae8214
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 INVITE

<------------->
--- (6 headers 0 lines) ---

<--- SIP read from UDP:201.217.31.10:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.16.50:5061;received=190.128.230.22;branch=z9hG4bK61ad8aec;rport=5061
From: <sip:[email protected]:5061>;tag=as23ae8214
To: <sip:[email protected]>;tag=b72e12N2654e5f93c-504b
Call-ID: [email protected]
CSeq: 102 INVITE
Reason: Q.850 ;cause=38 ;text="11017 - Invalid alias"
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
Transmitting (NAT) to 201.217.31.10:5060:
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.16.50:5061;branch=z9hG4bK61ad8aec;rport
Max-Forwards: 70
From: <sip:[email protected]:5061>;tag=as23ae8214
To: <sip:[email protected]>;tag=b72e12N2654e5f93c-504b
Contact: <sip:[email protected]:5061>
Call-ID: [email protected]
CSeq: 102 ACK
User-Agent: FPBX-AsteriskNOW-12.0.33(13.0.1)
Content-Length: 0

对我这边的事情可能存在什么问题有什么想法吗?

如果我将一个简单的软件电话连接到我的 VOIP 提供商,它就可以完美运行(接听和拨打电话)。

答案1

38  503 NETWORK_OUT_OF_ORDER    network out of order [Q.850]    This cause indicates that the network is not functioning correctly and that the condition is likely to last a relatively long period of time e.g. immediately re-attempting the call is not likely to be successful.

我猜是您的来电显示冒犯了他们。您是否设置了任何内容以外您实际分配的 DID?

基于:

答案2

这是 Asterisk 的一个已知错误,当​​您为服务器使用非标准 SIP 端口 5060 时。此错误在此处进行了讨论https://issues.asterisk.org/jira/browse/ASTERISK-24767

您应该能够使用 fromdomain=prepago.com.py:5060 来纠正这个问题,但是 Asterisk 会忽略指令端口并将 from 重写为 From: "sip:[电子邮件保护]:5061”。您可以修补 Asterisk 代码并重新编译它,或者在您的服务器中使用标准 sip 端口。

相关内容