Tutorials, dial plan examples, voice grammars and tools
You need to register to post on Forums - "Register" link in the upper right corner of this page.
Visual Dialplan and Free PBX

Visual Dialplan
You can simply create extensions, voicemail boxes and trunks using Free PBX (Elastix, trixbox, PIAF etc.) and then do all the dial plan magic with Visual Dialplan. This way you can develop dial plans using Visual Dialplan, leveraging all the benefits that come with its large component library including Lumenvox ASR components, Festival TTS components, validation engine, database support etc., and then deploy it directly to your FreePBX (Elastix, trixbox, PIAF etc.) server.
Dialplan deployment to Free PBX from Visual Dialplan is simple as pressing at "Deploy" button.
It does not require additional work at Free PBX side. There is no need to do any additional configuration at Free PBX side nor update Free PBX dialplan to make this work.
Visual Dialplan comes with integrated SSH client and will do the entire job behind the scene through SSH (write the dialplan to the Free PBX server and then include it at appropriate places within the Free PBX dial plan).
To develop Free PBX dialplan with Visual Dialplan make sure to select Free PBX for the "Asterisk server type" at "Preferences" dialog. This will instruct Visual Dialplan to deploy two files:
- globals_vdp.conf (where all the global variables will be stored) and
- extensions_vdp.conf file (where all the contexts and macros/subroutines will be stored).
It will also instruct Visual Dialplan to include these files at appropriate places within Free PBX dial plan structure.
Visual Dialplan hooks in the extensions_custom.conf and globals_custom.conf files (standard Free PBX files designed for the custom dial plan development). You can use this to override default behavior of the Free PBX or to develop custom dial plan that will work together with the Free PBX dial plan.
On the other side, Visual Dialplan will not change the configuration you did through the Free PBX user interface but will rather add the call flow elements developed with the Visual Dialplan at appropriate places within Free PBX structure without interfering with existing Free PBX configuration and settings.
You MUST follow the Free PBX contexts structure when developing the dialplan for FreePBX:
- "vdp-outbound" context must be used to define outgoing call flows
- "vdp-inbound" context must be used to define incoming call flows
How to connect to FreePBX (Elastix, trixbox, PIAF, AsteriskNOW etc.)
1. Define the connection to the FreePBX server
Visual Dialplan comes with integrated SSH client.
Type in the SSH access parameters at "Preferences" dialog and click on the "Test connection" button to test the connection with the server.
You should get the message that you established connection to the server.
Now you should click on the "Detect" button to detect the Asterisk server version.
You should get the message informing you about the Asterisk server version and appropriate version will be selected automatically from the drop down list.
Now select the appropriate type of your server (Free PBX, trixbox etc.) from the "Asterisk server type" drop down list.
IMPORTANT NOTE:
It is very important to set the appropriate type of the server (Free PBX) in order to instruct Visual Dialplan to deploy the dial plan appropriately.
2. Read the server configuration data
Select defined server above at the "Select server ..." drop down box to read the server configuration data.

Visual Dialplan will connect to the server and read server configuration data.
It will pre-populate library components with configuration data and later on validate the dial plan accordingly.

Note that Visual Dialplan will only read configuration data but will not change any of it.
3. Test your configuration
Now you are ready to develop your own dial plan but before you start modeling the dial plan it is our strong recommendation to test the Visual Dialplan and Free PBX integration first.
To complete the test follow these simple steps:
- Download 'hello-world'
- Open it with Visual Dialplan
- Select already configured server in the steps above
- Deploy the dial plan by clicking on the Deploy icon (or by selecting "Dialplan/Deploy" from the menu)
Hello world sample is very simple dial plan.
It will play the hello world message to the caller if the caller calls extension 56781.
Please make sure you hear the hello world message to confirm your installation is in place.
How to create and deploy dial plan (FreePBX, Elastix, trixbox, PIAF, AsteriskNOW etc.)
1. Create your dialplan
Now we are ready to proceed with the dial plan development.
Select 'File/New Dialplan ...' and follow on screen instructions.
By default Visual Dialplan will create two contexts:
- "vdp-outbound" context must be used to define outgoing call flows.
This context will be included into the Free PBX dial plan and can be used to override the default behavior of the Free PBX related to the outgoing calls (if you use catch all extension), or to develop custom dial plan that will work together with the Free PBX dial plan (if you use other extensions, not catch all extension).
- "vdp-inbound" context must be used to define incoming call flows.
This context will be included into the Free PBX dial plan and can be used to override the default behavior of the Free PBX related to the incoming calls (if you use catch all extension), or to develop custom dial plan that will work together with the Free PBX dial plan (if you use other specific extensions, not catch all extension).
IMPORTANT NOTES:
1.1. Make sure to follow the default context structure.
- "vdp-outbound" context must be used to define outgoing call flows.
- "vdp-inbound" context must be used to define incoming call flows.
Otherwise the dial plan will not work as expected. Do not delete or rename these contexts.
Alternatively, you can create new context in Visual Dialplan and set it as the destination in the Free PBX UI. This requires some work on Free PBX side but it is quite simple - just type in the context you developed in Visual Dialplan as a destination and it will work.
For example you can develop custom-test context in Visual Dialplan and then instruct Free PBX to send calls directly to that context by setting custom-test context as the destination in Incoming Route:

When making new contexts you must follow Free PBX naming convention:
The context name should start with 'custom-' and be in format 'custom-context,extension,priority'. For example 'custom-test,s,1'.
1.2. Make sure to start your dial plan with Extensions (not Start) block!
Traditionally in FreePBX the call routes depending on the inbound route configured in FreePBX with particular DID.
The same in Visual Dialplan - the call routes depending on the inbound route configured in Visual Dialplan with particular Extensions (DID=extension in Visual Dialplan) or in other words, the call routes depending on the call flow defined in vdp-inbound context.
The same for outgoing calls - the context that handles outgoing calls is vdp-outbound.
The context should be started with Extensions building block (
), NOT with the Start extension - 's' (
) because the 's' extension is handled by the Free PBX server by default.Double-click on Extensions building block and in the box put in the number you would have used as DID in FreePBX's inbound route. Then decide how you want that call to route, say to another context. When routing to another context, start that one with the "Start Extension" block.
You can use 'catch all' extension ("_.") to override all inbound and outbound calling rules in Free PBX or specific extensions (56781 or any other) to handle only those specific extensions.
1.3. Make sure to end your dial plan properly!
You should return the call back to Free PBX to be routed further as defined by the PBX, after you finished with your custom dial plan, but you can also hang up the call.
If you want to return the call back to Free PBX for further processing:
- for incoming calls use Goto component and send the call back to "ext-did" context (extension "EXTEN")
- for outgoing calls use Goto component and send the call back to "outbound-allroutes" context (extension "EXTEN"),
To hang up the call use 'Hang up' component.
You can also start with one of the included samples.

2. Deployment
When you are satisfied with the dial plan simply click on the "Deploy" button or select "Dialplan/Deploy" from the main menu and the dial plan will be deployed to the FreePBX server. No additional work at Free PBX side is required.
NOTE:
Make sure you selected Free PBX type of Asterisk server at preferences dialog before deploying the dial plan.
How to delete custom dial plan and return back to original Free PBX dial plan
To return back to the Free PBX default dial plan simply delete content of "vdp-outbound" and "vdp-inbound" contexts and deploy the dial plan. That way you will delete all the dial plan logic you did with Visual Dialplan and return back to Free PBX dial plan.
Post new comment
HTML tags are not allowed inside posts.