星号 可能匹配的优先级

发布于 2024-12-02 00:13:54 字数 598 浏览 0 评论 0原文

我希望能够仅将免费号码与我的拨号方案隔离开来,然后通过 SIP 而不是通过本地中继进行路由。我的问题是优先编号,免费电话号码似乎也与中继分机相匹配。

现在: `

 exten => _1XXXXXXXXXX,1,SetCallerID(${DEFAULT_CIDName} <${DEFAULT_CIDNum}>)

 exten => _1XXXXXXXXXX,n,Dial(${TRUNK_OB}/${EXTEN:0:11})

 exten => _1XXXXXXXXXX,n,Hangup

`

我希望能够添加:

exten => _1800NXXXXXX,1,拨号(SIP/sip.server.com/${EXTEN})

(以及 888、855、877 和 866),

但免费电话号码也与中继拨号匹配。

如果我将添加设置为优先级 2,然后将中继拨号设置为优先级 3,是否只拨打 SIP 并跳过中继,或者是否可以将它们都设置为优先级 1,然后如果是免费电话,则只拨打啜饮?

我到处都看过,但无法得出结论。任何建议将不胜感激!

I want to be able to isolate only toll free numbers from my dialplan and route then through SIP instead of through a local trunk. My question is the priority numbering and it seems the toll free number would also match up with the trunk extension.

Currently:
`

 exten => _1XXXXXXXXXX,1,SetCallerID(${DEFAULT_CIDName} <${DEFAULT_CIDNum}>)

 exten => _1XXXXXXXXXX,n,Dial(${TRUNK_OB}/${EXTEN:0:11})

 exten => _1XXXXXXXXXX,n,Hangup

`

I want to be able to add:

exten => _1800NXXXXXX,1,Dial(SIP/sip.server.com/${EXTEN})

(as well as 888, 855, 877 & 866)

but the toll free number matches the trunk Dial as well.

If I set the addition as Priority 2 and then set the trunk dial as Priority 3, would it only dial the SIP and skip the trunk or is it possible to have them both as Priority 1 and then if it's a toll free, only dial the SIP?

I have looked everywhere and can not come up with the conclusion. Any advice would be greatly appreciated!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

平安喜乐 2024-12-09 00:13:54

在您的示例中,您覆盖优先级 1,并且 dialplan 在“更广泛”的扩展模式中继续使用优先级 2。在您的情况下,当您拨打 18001234567 时,将执行以下拨号计划:

exten => _1800NXXXXXX,1,Dial(SIP/sip.server.com/${EXTEN})
exten => _1XXXXXXXXXX,2,Dial(${TRUNK_OB}/${EXTEN:0:11})
exten => _1XXXXXXXXXX,3,Hangup

SetCallerID() 被免费分机覆盖。有两种方法可以解决此问题:

  1. 覆盖扩展 2,而不是 1

    扩展=> _1XXXXXXXXXX,1,SetCallerID(${DEFAULT_CIDName} <${DEFAULT_CIDNum}>)
    扩展=> _1XXXXXXXXXX,n,拨号(${TRUNK_OB}/${EXTEN:0:11})
    扩展=> _1XXXXXXXXXX,n,挂断
    ;覆盖免费电话号码的优先级 2(拨号)
    扩展=> _1800NXXXXXX,2,拨号(SIP/sip.server.com/${EXTEN})
    

    这可能不是最干净的解决方案,因为在移动代码时您会被优先级搞糊涂。

  2. 在优先级 1 中设置一个“拨号字符串”变量,您可以稍后覆盖并使用该变量。

    扩展=> _1XXXXXXXXXX,1,设置(DIALOUTSTRING=${TRUNK_OB}/${EXTEN:0:11})
    扩展=> _1XXXXXXXXXX,n,SetCallerID(${DEFAULT_CIDName} <${DEFAULT_CIDNum}>)
    扩展=> _1XXXXXXXXXX,n,拨号(${DIALOUTSTRING})
    扩展=> _1XXXXXXXXXX,n,挂断
    ;使用另一个拨出号码拨打免费电话
    扩展=> _1800NXXXXXX,1,设置(DIALOUTSTRING=SIP/sip.server.com/${EXTEN})
    

In your example you overwrite priority 1 and dialplan continues with priority 2 within the "broader" extension pattern. In your case, when you dial 18001234567, the following dialplan will execute:

exten => _1800NXXXXXX,1,Dial(SIP/sip.server.com/${EXTEN})
exten => _1XXXXXXXXXX,2,Dial(${TRUNK_OB}/${EXTEN:0:11})
exten => _1XXXXXXXXXX,3,Hangup

The SetCallerID() is overwritten by the toll-free extension. There are two ways to solve this problem:

  1. Overwrite extension 2, not 1

    exten => _1XXXXXXXXXX,1,SetCallerID(${DEFAULT_CIDName} <${DEFAULT_CIDNum}>)
    exten => _1XXXXXXXXXX,n,Dial(${TRUNK_OB}/${EXTEN:0:11})
    exten => _1XXXXXXXXXX,n,Hangup
    ; overwrite priority 2 (Dial) for toll free numbers
    exten => _1800NXXXXXX,2,Dial(SIP/sip.server.com/${EXTEN})
    

    This may not be the cleanest solution as you will get confused by priorites when moving code around.

  2. Set a "dialstring" variable in priority 1 which you can overwrite and use later.

    exten => _1XXXXXXXXXX,1,Set(DIALOUTSTRING=${TRUNK_OB}/${EXTEN:0:11})
    exten => _1XXXXXXXXXX,n,SetCallerID(${DEFAULT_CIDName} <${DEFAULT_CIDNum}>)
    exten => _1XXXXXXXXXX,n,Dial(${DIALOUTSTRING})
    exten => _1XXXXXXXXXX,n,Hangup
    ; use another dialout for toll free numbers
    exten => _1800NXXXXXX,1,Set(DIALOUTSTRING=SIP/sip.server.com/${EXTEN})
    
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文