[asterisk-users] Realtime Pattern Matching

Richard Mudgett rmudgett at digium.com
Mon May 12 12:36:20 CDT 2014


On Mon, May 12, 2014 at 12:25 PM, Nick Olsen <nick at flhsi.com> wrote:

> Hello All, Looking for a little guidance on Real Time Pattern Matching.
>
> We are attempting to block outbound 411 via when someone dials
> NXX-555-XXXX, The must common being NXX-555-1212. However, We have some
> outbound providers that consider any call to NXX-555-XXXX a directory
> assistance call. So simply making my pattern _NXX5551212 doesn't work.
>
> So as you can see from the lines below. If I Dial 321-555-1212 the call is
> being applied to _321NXXXXXX not my _NXX555XXXX. I assume because they are
> equally specific. Does anyone have any creative ideas to pattern match
> NXX-555-XXXX besides what I've done here?
>
> 1056    outbound    _NXX555XXXX    1    Goto    outbound-411,411,1
>  Block Dir Assist
> 1057    outbound    _1NXX555XXXX    1    Goto    outbound-411,411,1
>  Block Dir Assist
> 1776    outbound    _321NXXXXXX    1    Goto
>  outbound-cocoa,${EXTEN},1    Outbound 321 Catchall
> 1777    outbound    _1321NXXXXXX    1    Goto
>  outbound-cocoa,${EXTEN},1    Outbound 1321 Catchall
>

The _321NXXXXXX is more specific than _NXX555XXXX that is why it is
selected.

See
https://wiki.asterisk.org/wiki/display/AST/Pattern+Matching
for the rules of pattern matching.

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140512/ec009eeb/attachment.html>


More information about the asterisk-users mailing list