1471+x
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...
1471+x
Something like:
Code: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
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?
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
There are currently 1 users browsing this thread. (0 members and 1 guests)