Translate digits

Hi.

I’m trying to understand how to translate outgoing calls to another number being dialed.

E.g: When I dial the number for swedish emergency calls 112, I wan’t 0379112442 to be dialed instead.
I’ve tried a lot of things and googled but I just can’t understand the syntax. I’ve tried making dial rules.

Anybody who can give me a brief guide in how to proceed? Thank’s in advance!

/Henrik

We wanted when users dialed 1411 (us information which charges a toll) to use Google 411 instead (googles free information service toll free!!). I started by removing 411 and 1411 from our dial plan in the outbound routes section. Next I went to Misc Apps and created a new misc app

Description:  Goog 411
Feature Code: 1411
Feature Status: Enabled

Destination:

Custom App: custom-google-411,s,1

For the custom app all I did was put the following into my extensions_custom.conf

[custom-google-411]              
exten => s,1,Dial(ZAP/g0/18004664411)
exten => s,n,Hangup

And just like magic you get free information via goog 411. The same could be done for you making your 112 a feature code and using a custom context to dial the number you want.

Another way of doing this is by adding an extension in extensions_custom.conf

exten => 1411,1,Answer
exten => 1411,n,Macro(dialout-trunk,1,180004664411)
exten => 1411,n,Hangup

I also do:

exten => _9NXX5551212,1,Answer
exten => _9NXX5551212,n,Macro(dialout-trunk,1,18003733411)
exten => _9NXX5551212,n,Hangup

and

exten => _91NXX5551212,1,Answer
. . .

(there’s got to be a way to combine those, but my brain is filled with perl regex, not asterisk pattern matching.)

to catch the people trying to call long distance information. Seriously users, google is right there, use it. (Does the rage carry through?) :slight_smile:

hey sakodak, you said “Another way of doing this is by adding an extension in extensions_custom.conf” In what context would you add this so that it will work form the dial plan?

Sorry, those should go in [from-internal-custom] – it should already be in there.

You could also create ring group 112 and put 0379112442 # (don’t leave out the trailing #) as the extension to be dialed.