Dial Plan.. being able to do _1NXX555XXXX

I want to have a common rule for the same NXX in every NPA. (Such as a block for 555 & 976 numbers)…

I have tried
as the dialed string (yes my dialplan does not use a leading 9) and it is not taking it. It’s defaulting to the default 1NXXNXXXXXX further down the dial plan.

Any thoughts?

Asterisk doesn’t always order things the way you would think it should. This may be helpful: voip-info.org/wiki/index.php … nf+sorting

I solve that problem by putting all of my dial strings into different contexts. They’re grouped by type of call that I want to control.

Each context is listed in the order I want them to be matched using include => statements later in other contexts. They are checked in the order that the include => statements are listed.

I also use macro’s to dial my calls, so the treatment can be worked into the individual contexts with a single line.

So it would look like this:

exten => _1888NXXXXXX,1,Macro(dialzapcard)
exten => _1877NXXXXXX,1,Macro(dialzapcard)
exten => _1866NXXXXXX,1,Macro(dialzapcard)
exten => _1855NXXXXXX,1,Macro(dialzapcard)
exten => _1800NXXXXXX,1,Macro(dialzapcard)

exten => _011.,1,Macro(dialzapcard)

exten => _1900NXXXXXX,1,Congestion
exten => _1NXX976XXXX,1,Congestion
exten => _1NXX550XXXX,1,Congestion

include => blockedcalls
include => tollfree
include => international

In my short example, the blocked calls are checked first and stopped first by simply playing the Congestion signal. Then a check is made to see if it’s toll free, and then an international call, both of which are allowed to use the zapcard to dial out.

Using this method, you can also put your extensions into contexts like [lobby], [executive] or [receptionist] and you can include =>, or leave out, the types of calls you would want them to be able to place.

include => blockedcalls
include => tollfree
exten => 31,1,Macro(callextension,${LOBBYSIP})

In this example, the lobby phone at extension 31 can place toll free calls, but the [international] context isn’t inserted with an include => statement. So, it can’t place international calls.

You may want to create other classes of call types. Such as 411, 911, local, long distance, toll free, international, broadband, and internal. Each call type could be allowed or disallowed by using an include => statement or leaving them out.

Why would you want to block NPA-555-xxxx calls? The 555 Exchange is not a pay-per-call exchange per se nor a designated high volume exchange (see telecom555.com).

The 555 area code cannot be issued per NANPA and INC (atis.org) guidelines (www.nanpa.com).