Skip to main content
Flowroute

Configure an Asterisk PBX

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. 

sip.conf

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

[general]
register => username:password@sip.flowroute.com
allow=ulaw

type=friend
secret=password
username=username
host=sip.flowroute.com
dtmfmode=rfc2833
context=inbound
canreinvite=no
allow=ulaw
insecure=port,invite

fromdomaisip.flowroute.com

extensions.conf

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.

[globals]
    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*.

[outgoing]
    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 th 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.  Additionally, you can dial 933 from your E911-enabled phone number to confirm the E911 service address associated with your phone number. 

    • 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.
  • Was this article helpful?