localzuk Posted March 9, 2010 Posted March 9, 2010 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...
powdarrmonkey Posted March 9, 2010 Posted March 9, 2010 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
localzuk Posted March 9, 2010 Author Posted March 9, 2010 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?
soulofdoom Posted August 13, 2010 Posted August 13, 2010 You can separate the extensions/sip account by context and put it in the same context as your dialplan..so that is only accessible by that extension
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now