SIP 外线呼出时听不到振铃信号

Unable to hear ringing signal when calling out on a SIP trunk

我 运行 一个带有 10 个 IAX2 扩展的 Asterisk 服务器(位于不同的国家)。我可以毫无问题地在我的分机之间拨打电话。我的星号服务器在 NAT 路由器后面。我有适当的 firewall/port 转发设置,以便我的客户可以从外部连接到我的盒子。

我决定通过让我的客户能够向常规 phone 号码拨打外部电话来提升它。我在一家信誉良好的 VoIP 提供商处注册并获得了 DID。我在 Asterisk 上设置了一个 SIP t运行k 和 outbound/inbound 路由。随后,我能够通过 IAX2 分机接听电话。

但是我有一个问题:

打电话时没有铃声。当遥控器 phone 开始响起时,我只听到静音。当远端 phone 接听电话时,通话顺利进行。

这比什么都烦,因为被叫方可能会在响几声后接听 phone,而我听到的只是沉默。

疑难解答:

  1. 我在 Asterisk 的高级 SIP 设置 (Yes/No/Never/route) 中尝试了所有不同的 NAT 模式,但没有成功。
  2. 我尝试使用 Softphone (Zoiper) 直接连接到我的 VoIP 提供商 - 最初,我遇到了同样的问题,然后我启用了 "Use RPORT for Media" 选项,并且成功地听到了铃声信号。但是,我很难在 Asterisk 中找到等效设置。
  3. 最后,我在asterisk上创建了一个新的SIP分机(这是我唯一的SIP分机,其他都是IAX2),然后尝试呼叫。在这种情况下,我能够通过振铃信号等成功拨打电话

我知道显而易见的答案是,将我所有的分机切换到 SIP,但我很难让我的所有客户都改变(出于各种原因)。我想继续相同的安排(IAX2 分机 + SIP T运行k)并获得振铃信号。在 Asterisk 中是否有一些特殊的设置来连接 IAX2 和 SIP?

编辑: 我将 RTP 调试设置为 ON。这是我从 IAX 分机 (IAX2/101) 拨打外部 phone 号码的通话记录片段。

    -- Executing [s@macro-dialout-trunk:18] GotoIf("IAX2/101-14509", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("IAX2/101-14509", "1?Set(CONNECTEDLINE(num,i)=13034997111)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("IAX2/101-14509", "1?Set(CONNECTEDLINE(name,i)=CID:1403xxxxxxx)") in new stack
    -- Executing [s@macro-dialout-trunk:21] GotoIf("IAX2/101-14509", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:22] Dial("IAX2/101-14509", "SIP/callwithus/13034997111,300,Tt") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called SIP/callwithus/13034997111
    -- SIP/callwithus-00000009 is making progress passing it to IAX2/101-14509
    -- SIP/callwithus-00000009 answered IAX2/101-14509
    -- Channel IAX2/101-14509 joined 'simple_bridge' basic-bridge <47977ee6-7f2d-47db-8f59-34cb53215a03>
    -- Channel SIP/callwithus-00000009 joined 'simple_bridge' basic-bridge <47977ee6-7f2d-47db-8f59-34cb53215a03>
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014177, ts 000160, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014178, ts 000320, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014179, ts 000480, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014180, ts 000640, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014181, ts 000800, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014182, ts 000960, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014183, ts 001120, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014184, ts 001280, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014185, ts 001440, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014186, ts 001600, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014187, ts 001760, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014188, ts 001920, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014189, ts 002080, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014190, ts 002240, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014191, ts 002400, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014192, ts 002560, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014193, ts 002720, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014194, ts 002880, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014195, ts 003040, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014196, ts 003200, len 000033)
       > 0xb7635c88 -- Probation passed - setting RTP source address to 198.27.70.147:18512
Got  RTP packet from    198.27.70.147:18512 (type 03, seq 011686, ts 100000, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014197, ts 003360, len 000033)
Got  RTP packet from    198.27.70.147:18512 (type 03, seq 011687, ts 100160, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014198, ts 003520, len 000033)
Sent RTP packet to      198.27.70.147:18512 (type 03, seq 014199, ts 003680, len 000033)
Got  RTP packet from    198.27.70.147:18512 (type 03, seq 011688, ts 100320, len 000033)

相反,当我从我的 SIP 分机拨出时,这是我看到的(成功呼叫):

-- Executing [s@macro-dialout-trunk:19] ExecIf("SIP/201-0000000a", "1?Set(CONNECTEDLINE(num,i)=13034997111)") in new stack
-- Executing [s@macro-dialout-trunk:20] ExecIf("SIP/201-0000000a", "1?Set(CONNECTEDLINE(name,i)=CID:1403xxxxxxx)") in new stack
-- Executing [s@macro-dialout-trunk:21] GotoIf("SIP/201-0000000a", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:22] Dial("SIP/201-0000000a", "SIP/callwithus/13034997111,300,Tt") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called SIP/callwithus/13034997111
-- SIP/callwithus-0000000b is making progress passing it to SIP/201-0000000a
-- SIP/callwithus-0000000b answered SIP/201-0000000a
-- Channel SIP/201-0000000a joined 'simple_bridge' basic-bridge <729d535c-c536-4ec9-982e-2d5655c24cf5>
-- Channel SIP/callwithus-0000000b joined 'simple_bridge' basic-bridge <729d535c-c536-4ec9-982e-2d5655c24cf5>
   > 0xb762dda8 -- Probation passed - setting RTP source address to 192.168.1.67:49826
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055600, ts 3315920772, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028360, ts 3315920768, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055601, ts 3315920932, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055602, ts 3315921092, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055603, ts 3315921252, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028361, ts 3315920928, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028362, ts 3315921088, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028363, ts 3315921248, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055604, ts 3315921412, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028364, ts 3315921408, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055605, ts 3315921572, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028365, ts 3315921568, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055606, ts 3315921732, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055607, ts 3315921892, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028366, ts 3315921728, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028367, ts 3315921888, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055608, ts 3315922052, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055609, ts 3315922212, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028368, ts 3315922048, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028369, ts 3315922208, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055610, ts 3315922372, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028370, ts 3315922368, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055611, ts 3315922532, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055612, ts 3315922692, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028371, ts 3315922528, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028372, ts 3315922688, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055613, ts 3315922852, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055614, ts 3315923012, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028373, ts 3315922848, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055615, ts 3315923172, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028374, ts 3315923008, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028375, ts 3315923168, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055616, ts 3315923332, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055617, ts 3315923492, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028376, ts 3315923328, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028377, ts 3315923488, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055618, ts 3315923652, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055619, ts 3315923812, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028378, ts 3315923648, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028379, ts 3315923808, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055620, ts 3315923972, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055621, ts 3315924132, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055622, ts 3315924292, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055623, ts 3315924452, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028380, ts 3315923968, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028381, ts 3315924128, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028382, ts 3315924288, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028383, ts 3315924448, len 000033)
       > 0xb763d570 -- Probation passed - setting RTP source address to 198.27.70.147:22320
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032968, ts 100320, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056916, ts 100320, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032969, ts 100480, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056917, ts 100480, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032970, ts 100640, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056918, ts 100640, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032971, ts 100800, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056919, ts 100800, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055624, ts 3315924612, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055625, ts 3315924772, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028384, ts 3315924608, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028385, ts 3315924768, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032972, ts 100960, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056920, ts 100960, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032973, ts 101120, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056921, ts 101120, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055626, ts 3315924932, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055627, ts 3315925092, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028386, ts 3315924928, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028387, ts 3315925088, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032974, ts 101280, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056922, ts 101280, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032975, ts 101440, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056923, ts 101440, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055628, ts 3315925252, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055629, ts 3315925412, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028388, ts 3315925248, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028389, ts 3315925408, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032976, ts 101600, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056924, ts 101600, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032977, ts 101760, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056925, ts 101760, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055630, ts 3315925572, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055631, ts 3315925732, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028390, ts 3315925568, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028391, ts 3315925728, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032978, ts 101920, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056926, ts 101920, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032979, ts 102080, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056927, ts 102080, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055632, ts 3315925892, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055633, ts 3315926052, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028392, ts 3315925888, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028393, ts 3315926048, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032980, ts 102240, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056928, ts 102240, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032981, ts 102400, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056929, ts 102400, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055634, ts 3315926212, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055635, ts 3315926372, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028394, ts 3315926208, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028395, ts 3315926368, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032982, ts 102560, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056930, ts 102560, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032983, ts 102720, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056931, ts 102720, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055636, ts 3315926532, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055637, ts 3315926692, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028396, ts 3315926528, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028397, ts 3315926688, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032984, ts 102880, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056932, ts 102880, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032985, ts 103040, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056933, ts 103040, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055638, ts 3315926852, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028398, ts 3315926848, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032986, ts 103200, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056934, ts 103200, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032987, ts 103360, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056935, ts 103360, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055639, ts 3315927012, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055640, ts 3315927172, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028399, ts 3315927008, len 000033)
Sent RTP packet to      198.27.70.147:22320 (type 03, seq 028400, ts 3315927168, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032988, ts 103520, len 000033)
Got  RTP packet from    198.27.70.147:22320 (type 03, seq 032989, ts 103680, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056936, ts 103520, len 000033)
Sent RTP packet to      192.168.1.67:49826 (type 03, seq 056937, ts 103680, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055641, ts 3315927332, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055642, ts 3315927492, len 000033)
Got  RTP packet from    192.168.1.67:49826 (type 03, seq 055643, ts 3315927652, len 000033)

尝试将 "R" 参数添加到您的拨号字符串。

作为旁注,配置你的 FreePBX 的人应该挂了。当拨出到中继线时,将 "Tt" 参数作为拨号字符串的一部分是一个很好的欺诈漏洞。此外,如果您的 "Dial" 内部电话选项中有此功能 - 可能会迫使您进行简单的电话欺诈。