Home / Clearly IP Trunking / Configuring ClearlyIP Trunks / FreePBX and PBXact / Dialplan to add 1 to all inbound calls

Dialplan to add 1 to all inbound calls


You can add the following 2 lines of dialplan into extensions_custom.conf if you already have all your inbound routes setup from a pervious carrier that you are porting to us in a 11 digit format of 1NXXNXXXXXX.  This will take the inbound 10 Digit DID we send and add a 1 before sending to your inbound routes so it can match on your existing 11 digit inbound routes.

You can do this two different ways. One using the FreePBX Config Editor Module for all the changes and 1 using SSH if you are familiar with SSH.

Using FreePBX Config Editor Module

  • Navigate to the Config Editor module in your PBX
  • Locate the "extensions_custom.conf" file and click on it


  • Inset the following 3 lines of text
  1. [from-add-1]
    exten => _NXXNXXXXXX,1,Goto(from-pstn,1${EXTEN},1)
    exten => s,1,Goto(from-pstn,${EXTEN},1)

  • Save your changes
  • Now go into your trunks in FreePBX and change the context from-trunk to be from-add-1
    • PJSIP trunks

    • Chan SIP Trunks

  • Submit your changes and press the Red Apply Config button
 .          

Using SSH

  • SSH to your PBX
  • Open the file
    • /etc/asterisk/extensions_custom.conf
  • Add the two lines of dialplan and save the file
  1. [from-add-1]
    exten => _NXXNXXXXXX,1,Goto(from-pstn,1${EXTEN},1)
    exten => s,1,Goto(from-pstn,${EXTEN},1)
  • Now go into your trunks in FreePBX and change the context from-trunk to be from-add-1
    • PJSIP trunks
    • Chan SIP Trunks


    • Submit your changes and press the Red Apply Config button
 .          



     RSS of this page