There’s a system called ENUM that enables VoIP servers like Asterisk to check the number your dialing to see if there is a possibility to connect directly to your server instead of going over PSTN land lines. So I registered at E164.org and added my phone number. I tried to figure out how to add this functionality to Asterisk@Home, but couldn’t find anything on how to do it. But I finally managed to get it to work, and it’s really simple. Here’s how I did it.
First you need an account at E164.org. Then you need to register your phone numbers there. An automated voice will call that number to verify, so have your pen and paper ready. Write the code down and enter it in the registration form.
You need to add the following line to the file /etc/asterisk/enum.conf
search => e164.org
Put that line just above search => e164.arpa
Go to the setup page on your Asterisk@home server and select trunks.
Choose to add an ENUM trunk.
I have set my system up to only try to find a ENUM route on international numbers, so here’s how I did it.
As you can see, it removes the initial 00 (the international prefix) because ENUM numbers should be 46XXXXXXX for a Swedish number.
Then I edited the Outbound Routing. This is my international route.
If someone dials 00, this route is called.
I’ve put the ENUM trunk first, and if that fails, it calls though my VoIP provider instead.
Now just reload your settings and off you go!