Home > System Configurations > Configure an Asterisk PBX

Configure an Asterisk PBX


  • Details in this document are for reference only, and are unsupported by the Flowroute support staff.
  • Please use as purely reference material, we make no guarantees that this information is correct, or will not harm your system. Please be careful and always keep a backup of anything before you make changes, or alter settings.

This article is intended for use with a base Asterisk installation, with no FreePBX, and values set to their defaults. This configuration was created and tested on Asterisk 13.3.0 on CentOS 6.7. It should work on other versions of Asterisk as well. 

NOTE: If you use FreePBX, we have several guides for guiding you through configuration. These can be found here.
  Before you begin

Two files must be modified in order for Asterisk to work with Flowroute, sip.conf and extensions.conf. By default, both are located along with most of Asterisk’s configuration files in /etc/asterisk. Naturally your deployment is going to require a lot more additional configuration, but this article is designed to simply get you started. 

In this article


The following example shows a modified sip.conf file. In this file, the password and username are your Flowroute SIP credentials.

register => username:password@sip.flowroute.com

host=preferred PoP.sip.flowroute.com

fromdomain=preferred PoP.sip.flowroute.com


The following shows an example of a modified extensions.conf file. In this file, the TECHPREFIX is your Flowroute Tech Prefix from your SIP Credentials.

AREACODE= ;Enter local 3-digit area code here
TECHPREFIX= ;Populate only if IP-based authentication is required. 
;You must then whitelist your IP. Instructions for doing that are found 
;on the Interconnection > Outbound Allowed IPS page of Flowroute Manage.
;This will be in the format of 8-digits followed by an asterisk (*)
;—for example, 12345678*.

exten => _1NXXNXXXXXX,1,Dial(SIP/${TECHPREFIX}${EXTEN}@flowroute)
exten => _NXXNXXXXXX,1,Dial(SIP/${TECHPREFIX}1${EXTEN}@flowroute)
exten => _NXXXXXX,1,Dial(SIP/${TECHPREFIX}1${AREACODE}${EXTEN}@flowroute)
exten => _011.,1,Dial(SIP/${TECHPREFIX}${EXTEN:3}@flowroute)

Additional configuration notes for Asterisk

  • E911 

    If you have E911 service enabled on one of your DIDs, use one of the following example rules to configure 911 dialing into your rules. We strongly recommend testing E911 after configuration to make sure that it works correctly and that the correct information is reported. In the following example code, replace E911enabledDID with your actual 11-digit, E911-enabled DID. 

    • exten => _911,1,Set(CALLERID(num)=E911enabledDID 

    • exten => _911,n,Dial(SIP/${TECHPREFIX}${EXTEN}@flowroute) 

  • Testing 

    To test your configuration, you can initiate a test call from the console by loading asterisk -r and then running the following: 

    originate SIP/flowroute/*test number here* application Playback hello-world 

  • PBX Security 

    We strongly suggest reading and implementing our Asterisk security. Call fraud is common and we do our best to mitigate it but PBX Security goes a long way to help your system to be secure.

    Information about implementing PBX security on your Asterisk system can be found in the article Asterix PBX Security