【问题标题】:Unable to hear ringing signal when calling out on a SIP trunk在 SIP 中继上呼出时听不到振铃信号
【发布时间】:2015-05-04 05:45:36
【问题描述】:

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

我决定让我的客户能够拨打常规电话号码进行外部呼叫,从而将其提升一个档次。我在一家知名的 VoIP 提供商处注册并获得了 DID。我在 Asterisk 上设置了 SIP 中继和出站/入站路由。随后,我能够通过 IAX2 扩展接收呼叫。

但是我确实有一个问题:

呼叫时,我没有听到铃声。当远程电话开始响铃时,我只听到静音。当远程电话接听电话时,通话顺利进行。

这比其他任何事情都令人烦恼,因为被叫方可能会在几声响后接听他们的电话,而我听到的只是沉默。

疑难解答:

  1. 我在 Asterisk 的高级 SIP 设置(是/否/从不/路由)中尝试了所有不同的 NAT 模式,但没有成功。
  2. 我尝试使用软电话 (Zoiper) 直接连接到我的 VoIP 提供商 - 最初,我遇到了同样的问题,然后我启用了“将 RPORT 用于媒体”选项,并成功听到了振铃信号。但是,我很难在 Asterisk 中找到等效设置。
  3. 最后,我在星号上创建了一个新的 SIP 分机(这是我唯一的 SIP 分机,其他都是 IAX2),然后尝试呼叫。在这种情况下,我可以通过振铃信号等成功拨打电话。

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

编辑: 我将 RTP 调试设置为 ON。这是我从 IAX 分机 (IAX2/101) 向外部电话号码拨打电话的日志 sn-p。

    -- 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)

【问题讨论】:

    标签: asterisk sip voip


    【解决方案1】:

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

    顺便说一句,配置您的 FreePBX 的人应该被挂起。当拨出到中继线时,将“Tt”参数作为拨号字符串的一部分是一个很好的欺诈漏洞。此外,如果您在内部呼叫的“拨号”选项中有该选项 - 可能会强制您进行简单的呼叫欺诈。

    【讨论】:

    • 感谢您的回答。
    • 我正在研究在拨号字符串中添加 R/r,但我想我在某处读到过,在拨号字符串中添加“r”可能会导致“误报”。即,呼叫者可能会在不应该听到铃声时听到铃声。例如,当他应该听到忙音时,他可能会听到“Ring...Beep...Beep...Beep”。附言我是设置我的 FreePBX 的人。我是一个 Asterisk 菜鸟,刚刚学习这个工具。你提到我的拨号字符串中的 Tt 很有趣,我正在使用带有 AsteriskNow Distro 的 FreePBX 12.0.62,分机的 默认 拨号字符串是“Ttr”,中继是“Tt”。奇怪!
    • 嗯,总的来说你是对的。 “r”参数将生成 Asterisk 端铃声,而“R”将生成该铃声,直到远程端返回 SIP 183,传递音频。如果您所有的电话都是 IP 电话,我建议您完全远程“tT”标志,这些标志用于 DTMF 信令传输,在使用 IP 电话时不需要。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多