呼叫SIP中继线时无法听到振铃信号

时间:2015-05-04 05:45:36

标签: asterisk sip voip

我运行一个带有10个IAX2扩展的Asterisk服务器(位于不同的国家/地区)。我可以在我的扩展程序之间调用make调用而不会出现任何问题。我的星号服务器位于NAT路由器后面。我有适当的防火墙/端口转发设置,以便我的客户可以从外面连接到我的盒子。

我决定通过让我的客户能够拨打普通电话号码进行外部呼叫来提升一个档次。我在信誉良好的VoIP提供商处注册并获得了DID。我在Asterisk上设置了SIP中继和出站/入站路由。随后,我能够通过IAX2扩展来接听电话。

但是我确实遇到了问题:

喊出来的时候,我没有听到铃声。当远程电话开始响铃时,我才听到沉默。当远程电话接听电话时,电话会顺利进行。

这是一个令人烦恼的事情,因为被叫方可能会在几声响起后接听电话,而我所听到的只是沉默。

疑难解答:

  1. 我在Asterisk的高级SIP设置(是/否/从/路由)中尝试了所有不同的NAT模式,但没有成功。
  2. 我尝试使用Softphone(Zoiper)连接到我的VoIP提供商direclty - 最初,我面临同样的问题,然后我启用了#34;使用RPORT for Media"选项,并成功听到振铃信号。但是,我很难在Asterisk中找到等效设置。
  3. 最后,我在星号上创建了一个新的SIP扩展(这是我唯一的SIP扩展,其他所有都是IAX2),然后尝试呼叫。在这种情况下,我能够使用振铃信号等进行成功通话。
  4. 我知道明显的答案是,将我的所有扩展都切换到SIP,但是我很难让所有客户都改变(出于各种原因)。我想继续相同的安排(IAX2扩展+ SIP中继)并获得振铃信号。是否有一些特殊设置可以在Asterisk中连接IAX2和SIP?

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

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

1 个答案:

答案 0 :(得分:1)

尝试将“R”参数添加到拨号串。

正如旁注所示,配置FreePBX的人应该挂起。当拨出到主干时,将“Tt”参数作为拨号字符串的一部分是一个很好的欺诈漏洞。此外,如果您在内部呼叫的“拨号”选项中有此选项,则可能会强迫您进行简单的呼叫欺诈。