Skip to main content
Flowroute

Configure Asterisk 13

In this article, we will be setting up Asterisk 13 with the assumption that you are comfortable with the Linux command line to install Asterisk manually.

We recommend compiling Asterisk from the source to get the latest stable version. You can compile and install Asterisk on the following major Linux distributions: 

Requirements

  • Your Flowroute SIP Credentials (Tech Prefix and Password), found on the Interconnection/Status & Settings page of Flowroute Manage. 

  • A list of phone numbers (DIDs) to register with the system

To configure Asterisk for Flowroute:

  1. Install Asterisk.

  2. Go to your Asterisk installation directory. The default directory is /etc/asterisk

  3. In this directory, open sip.conf with a text editor, and include the following configuration information:
    [general] 
    udpenable=yes ; 
    tcpenable=yes ;uncomment only if you plan to use TCP for SIP transport 
    disallow=all 
    allow=ulaw 
    ;allow=g729 ;uncomment this line only if you have g729 licenses installed 
    preferred_codec_only=yes 
    sipdebug=yes 
    ;externaddr= 1.2.3.4 ;uncomment & modify if you have a static public IP 
    ;localnet=192.168.0.0/24 ;uncomment & modify if your system has a private register => 
    TECH_PREFIX:SIP_PASSWORD@sip.flowroute.com
    
    [flowroute-trunk](!) ;keep this lowercase, do not change format
    type=peer< 
    context=inbound ;change to 'ext-did' or 'from-trunk' for asterisk@home 
    dtmfmode=rfc2833 
    canreinvite=no 
    insecure=port,invite 
    fromdomain=sip.flowroute.com
    
    [flowroute0][flowroute-trunk] 
    host=sip.flowroute.com 
    remotesecret=SIP_PASSWORD; replace this variable with your Flowroute SIP password 
    defaultuser=TECH_PREFIX; replace this variable with your Flowroute Tech Prefix
    
    [flowroute1][flowroute-trunk] 
    host=216.115.69.144
    
    [flowroute2][flowroute-trunk] 
    host=70.167.153.130 

    NOTE: This configuration is slightly different than previous ones because it uses templates, as indicated with a (!), to remove the need to set the same options on each trunk and phone.  It becomes simple to use the template by then putting the same in () after the objects that need to use the template.  Flowroute uses two IP addresses for SIP signaling, and two trunks are built for each IP so that Asterisk recognizes a SIP INVITE sent from each Flowroute IP.

  4. Build objects for each SIP phone that you'll need to register with Asterisk system by adding the following:
    your-phones](!) 
    type=friend context=from-phones 
    host=dynamic 
    secret=yourpassword 
    dtmfmode=rfc2833 
    disallow=all 
    allow=ulaw ;allow=g729 ;uncomment this line only if you have G.729 licenses installed. 
    [1000][your-phones] 
  5. Next, in the Asterisk directory, open extensions.conf with a text editor. This file controls how Asterisk handles inbound and outbound calls.
  6. In extensions.conf

    • Add the following to the [outgoing] context: 

      exten => _1NXXXXXXXXX,1,Dial(SIP/${EXTEN}@flowroute0) ;Send NANPA (USA) as 11 digit 
      exten => _011.,1,Dial(SIP/${EXTEN:3}@flowroute0) ;
      dialing format - SIP/{countrycode}{number}@flowroute0 
    • Add the following to the [incoming] context:
      exten => 
      YOUR_DID1,1,Answer() exten => 
      YOUR_DID2,1,Answer() exten => 
      YOUR_DID3,1,Answer() 

 

  • Was this article helpful?