International Dialing with Twilio and FreePBX

Just some quick notes on how I went about getting International Dialing working with my personal FreePBX server and a Twilio Elastic SIP Trunk. Twilio requires E.164 formatted numbers so both the outbound route and the outbound trunk must be configured to handle both local US and international numbers properly.

On the dial patterns page for my outbound route I have the following patterns configured; my local area requires 10-digit dialing for all numbers:


For my outbound trunk I have the following configured for the dialer manipulation rules:


Both the highlighted parts are required so that FreePBX recognizes that call being placed is an international call; the outbound route configuration is needed so that when the 011 prefix is used no further number validation is performed while the outbound trunk manipulation rules strip the 011 prefix from the dialed number to stay compatible with the E.164 format.

After doing the above and enabling international calling on your Twilio account you should be able to call a number like +44-1-61-850-8378 and be successful.