The First Step is to Create the ENUM TRUNK
Then ADD an ENUM TRUNK
Click Submit Changes, and Apply Configuration Changes, make sure to save and apply changes whenever you add a trunk or change settings
Note: No changes need to be made on this page unless you want to customize it especially.
The next step is to setup your outbound routes in FreePBX
ENUM Outbound Routes in FreePBX
Open up the outbound route 0 9_outisde, here we will specify how outgoing calls will be routed.
Check the Trunk Sequence
Here I have the trunk sequence set as ENUM first and if an enumlookup fails it will fall back to SIP Trunk which will send calls to the PSTN. Apply changes once you have changed your trunk sequence.
Setting up Dial Patterns for ENUM - Here we setup what numbers will be sent to the enum function for example , you may want to setup your FreePBX to only send numbers dialed starting with 9 to enum and all other to the PSTN.
The picture below shows the Dial Patterns for enumlookup
X = any number from 0 - 9
.X_ = match any number , any digit any length (easy option)
ENUMLOOKUP - FREEPBX changing ENUM registry's to lookup default (e164.org)
FreePBX by default looks up e164.org for enum records, you can change which domains to lookup on by accessing the file /var/lib/asterisk/agi-bin/enumlookup.agi
Open up SSH client, e.g Putty and login to the server
Open up the enumlookup.agi script and add the enum domains you wish to lookup.
And that's pretty much it for the walkthrough if you have problems usually its due to incorrect settings with your extensions or the reciever of the call not accepting incoming calls.
To allow others to call you VIA ENUM - Allow Anonymous SIP CALLS or route based on DID number e.g
This setting is found under General Settings.