Skip to main content
Flowroute

Configure a Basic Asterisk Installation for Flowroute

This guide is intended for use with a basic Asterisk installation. This configuration was created and tested on Asterisk 13.3.0 on CentOS 6.7; however, it should work with work on other versions of Asterisk as well. This article is designed to get you up-and-running with a basic installation. 

NOTE: If you use FreePBX, we have a number of articles on integrating with Freeswitch. These articles can be found here.

Before you begin

  • You'll need your Flowroute SIP Credentials, which are your Tech Prefix and Password. These can be found on the Interconnection > Status & Settings page of Flowroute Manage.

When configuring Asterisk to work with Flowroute, you'll need to modify two files, sip.confand extensions.conf. These files are installed by default into /etc/asterisk.  

sip.conf

In this file, 

  • replace password with your Flowroute SIP credentials password.
  • replace username with your Flowroute SIP credentials username.
  • keep the default host and fromdomainsip.flowroute.com[1]

    IMPORTANT: SIP Registration for New PoPs

    If you are taking advantage of our new Points of Presence (PoPs), make sure to update the host and fromdomain [1] in this format: {your_preferred_pop}.sip.flowroute.com where {your_preferred_pop} might be "us-west-wa" for example. Your new fromdomain will then be us-west-wa.sip.flowroute.com. Note that register=" ">username:password@sip.flowroute.com will also have to be changed to conform to the new format. See Interconnection with the New PoPs for technical specifications.

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

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

extensions.conf

In this file, 

  • replace TECHPREFIX with your Flowroute SIP credentials Tech Prefix.
AREACODE= ;Enter a local 3-digit area code here
TECHPREFIX= ;Populate only if IP-based authentication is desired, you’ll need to  
;whitelist your IP as well. You must use an eight-digit format, followed by an 
;asterix (*)—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 the following examples 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 code sample, replace E911enabledDID with your own 11-digit E911-enabled DID, and TECHPREFIX with your own SIP credentials Tech Prefix. 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, 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 suggestions. Call fraud is common and we do our best to mitigate it but PBX Security goes a long way to prevent yourself from being a victim. You can find our article on PBX Security here.

  • Was this article helpful?