Dial plan for prefix's in local area code considered LD

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Dial plan for prefix's in local area code considered LD

Postby Arative » Thu Feb 04, 2016 10:51 am

We switched providers and a lot of prefix's in a local area code are considered long distance calls for us now. Am I correcting in assuming that if I put the following in my dialplan that this should work.

exten => _81636486XXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _81636486XXXX,n,Dial(${SIPTRUNK}/${EXTEN:1},,To)
exten => _81636NXXXXXX,n,Hangup()


exten => _81636NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _81636NXXXXXX,n,Dial(${SIPTRUNK}/${EXTEN:2},,To)
exten => _81636NXXXXXX,n,Hangup()

So any number dialed that is 636-486 will only drop the 8 but then any number that doesn't match that particular area code and prefix will drop both the 8 and the 1 before dialing?

Is there a better way to accomplish this or is what I have the best way? I think there are about 35 or so prefixes in the 636 that are considered long distance to us

ViciBox 6.0.4 | | 2.12-538a
BUILD: 160122-1401 |1.8.32.3-vici | Single Server | | No Extra Software After Installation
Arative
 
Posts: 38
Joined: Wed May 19, 2010 1:04 pm

Re: Dial plan for prefix's in local area code considered LD

Postby MJCoate » Fri Feb 19, 2016 8:40 pm

You are correct; "EXTEN:N" tells Asterisk to drop N digits, starting from the left, off whatever matched that pattern before sending it through the Dial() application.

To my knowledge, this would be the only way to do what you want. An exception being if some of the prefix's are in sequence (i.e. 486, 487, 488,...). Then you could do something like:
exten => _8163648[6-9]XXXX...
Mike Coate | VICIdial Technical Support Staff
MJCoate
 
Posts: 82
Joined: Wed Mar 25, 2015 1:57 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 111 guests