Auto adding prefix to dialstring

Hi all,

I have a simple one phone location in Mexico with a SIP provider. When we send the dialstring we also have to send the prefix with that. So if we dial 800-111-1111 we have to dial the prefix then number (ie: 123456789 + 1-800 -111-1111).

I’m wondering how to have asterisk add the prefix automaticly when they press 9. So they would have to dial 9-1-800-111-1111, seems like this would be easy and maybe I am just missing the doc’s for it somewhere. Any ideas or directions as to where to get this info would be great!

Thanks for all the help!

B. :smiley:

exten => _9NXXNXXXXXX,1,Dial(SIP/provider/12345678${EXTEN:1})

this will always prepend 12345678 and then will dial whatever you dialed, but without the 9.

hope that helps!