Contextual dial patterns for local 7 digits

Greetings,

My system requires 10 digit dialing, but for convenience and emulation of the POTS system, I’d like to provide 7 digit dialing to the end users in multiple area codes.

What would be the best way to accomplish this kind of behavior?

The only thing I can think of is the Extension Routing module, and assigning each user to a route configured for their area code.

Hi!

Is there a way to know, using the extension number, in what region (and from that what area code) it is?

For example, all extensions beginning with 6 are in the 213 area code, all extensions beginning with 7 in the 416 area code…

If there is my guess an outbound route with a prepend for the area code and a match done by caller Id (which is the extension number here) would work.

You would add as many of these entries as needed to cover all the extensions you want 7 digit dialing to work for…

It could even be done a per extension basis (or a mix or per extension and prefix) but if you have a great number of extensions it would soon become unmanageable which is why if there is an easy way to match on the extension number the area code it is from it would be preferrable.

The other possibility is custom code but the first method would be preferrable since it would be more in the spirit of FreePBX…

God luck and have a nice day!

Nick

7 digit dialing can ONLY be done inside your parochial area code and more and more that will Go the eay of yhe dodo, generally metro areas already require 11 digits because it is more efficient.

Outbound routes are designed to allow you to prepend your area code to reach the rest of the world , be careful because you might need 10 or 11 digit’s with your VSP.

Hi dicko!

10 digit dialing for “local” numbers has been mandatory in my province for over 10 years (June 2006)… :wink:

Have a nice day,

Nick

Here we have a dozen area codes, none starts with 1 we all learnt to get through quicker with 1 (nxx) nxx-xxxx it just makes sense globally, its all about that unique 1 as the most significant digut, ask Mr. Strowger for a reason. (And why Manhatten is 212)

IIRC, POTS here would complain if you dial a number in your “local” calling area with a “1” (it would complain that it is not a long distance phone number)… I believe it still dialed it as if it was dialed without a 1 after…

I still know some people who have POTS so I will check with them if that’s (still) true…

Have a nice ay,

Nick

Strangely here, the PUC approved business tarriffs are higher for a lata call than a long distance call, luckily most vsps ship your local calls ‘out of state’ go figure.

Actually, yes. I’m using the 10 digit DID as the extension number, so the first three digits would be the area code.

[quote=“Marbled, post:2, topic:39708, full:true”]For example, all extensions beginning with 6 are in the 213 area code, all extensions beginning with 7 in the 416 area code…

If there is my guess an outbound route with a prepend for the area code and a match done by caller Id (which is the extension number here) would work.

You would add as many of these entries as needed to cover all the extensions you want 7 digit dialing to work for…[/quote]
So in this case, it sounds like it’d be one entry for each area code where customers are residing?

This method sounds like the most reasonable path, and would be easier to manage than extension routes would be as well.

So, for extensions of the format NPANXXXXXX for the extension number, in my outbound route dial plans I would have a prepend of NPA, Match Pattern of NXXXXXX, and a CallerID value of NPA?

Hi!

Sounds right except for the last field… You want to precede it with “_” and end it with “.” for it to match one those extension numbers…

Good luck and have a nice day!

Nick

So “_123.” would cause any extension matching 123xxxxxx to be subject to the dial pattern rule?

Hi!

Actually I believe I was wrong about the underscore being needed there, try it without… The underscore is required by Asterisk to do pattern matching but you are not directly coding a dial plan here…

The pattern match on the caller ID field is supposed to work in the same way as the other fields…

Good luck and have a nice day!

Nick

I set the “CallerID” as 123NXXXXXX then set the Prepend to 123, then when dialing NXXXXXX the correct area code was pre-pended, simulating local 7-digit dialing.

Thanks for your help Marbled, this solution worked perfectly.

Hi!

That’s actually a very good idea to give the full pattern… If you ever have extensions which don’t use the DID number as extension number (which could quite possibly happen in the future) there is no risk it could try to match on those (like it could have with a pattern that permitted any number of digits after the area code…

You are welcome…

Have a nice day!

Nick

If you are trying to provide 7 digit dialling for all your customers, no matter what area code they are in and you are using 10 digit extensions that reflect that localization, I would suggest that in your [macro-dialout-trunk-predial-hook] you look for an ${EXTEN} that is 7 digits and add the area code extracted from the ${callerid(num):0:3) and send the call conditionally onward to [outbound-allroutes]

2 Likes

Hi!

If you need to deal with only a few area codes I believe the main solution I offered is the preferable one since you can clearly see, from FreePBX, what processing is done on those numbers…

However, if you need to deal with many area codes (like for example the 300 or so US ones) then go with the solution dicko offered since the other one doesn’t scale very well when the number of area codes is important.

Which solution is preferable in your case depends on your needs and only you know for sure what they are…

Good luck and have a nice day!

Nick

If any one wants to explore what the current state of NANP’s NPANXX assignment is then,

wget http://www.nanpa.com/nanp1/allutlzd.zip

will be fascinating :wink: