Jump to content

Recommended Posts

Posted

Does anyone know how to force all calls from an extension to add a prefix to the beginning?

 

We have a pay phone which is on our asterisk server - using the normal school lines to dial out. The problem is, kids are trying to call home at break etc... and not leaving a message. This leads to parents doing 1471 and calling the school demanding to know who called them and why.

 

What we want to do is insert 141 in front of all calls dialled from that phone. So, if they call 842134, the asterisk server will actually dial 141842134.

 

Any ideas how to do this?

 

Doing a google search for asterisk and prefix turns up about 1,000,000 irrelevant items...

Posted

Something like:

 

exten => _0Z.,n,Dial(${TRUNK}/44${EXTEN:1})

 

 

in your dialplan will put a 44 before any number starting 0, and chop the 0 off the front of it (in this example, I use it to stick the country code in front of an external but not international call).

 

Result: 01234567899 becomes 441234567899

Posted
Ok, next question then - how can I restrict this to just being from that one extension. I want all the other extensions to continue to function as normal?
  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...