Powerful Call Flow control using the Dynamic Routes Module

Lorne Gaetz

Lorne Gaetz

As an administrator of a FreePBX or PBXact system, have you ever found yourself asking:

How do I make an automated caller survey?
How do I direct all calls to X except when Y is true, then calls go to Z?
How do I save or record the DTMF input from callers when they navigate through IVRs?
How do I play a recording to a caller indicating order status after they provide an order number?
How do I control multiple Call Flow controls by dialing a single feature code?
How do I treat known callers differently than unknown callers (whitelisting)?

You can do all that and more with the Dynamic Routes module.

Long time users of FreePBX will recognize the module name ‘Dynamic Routes’ and may even have had occasion to use it. It’s an Open Source, third party module published by John Fawcett, which provides flexible call flow controls using fairly simple GUI fields. This module has long been available for manual install, but about a month ago it was officially contributed to the FreePBX project, and now any admin running FreePBX/PBXact version 15 can directly install a signed copy from module repos.

In its very broadest sense, the Dynamic Routes module works by determining the value of some specific routing condition and then branching the call to different FreePBX destinations depending on the value of that routing condition. The GUI includes several methods for setting up routing conditions, such as:

  • You can prompt the caller for DTMF input (with input validation and ability to re-prompt for invalid input)
  • You can perform an http(s) API call to an external resource and act on the value returned
  • You can perform a MySQL or ODBC query. 
  • You can check the value of an Asterisk channel variable or Asterisk function. 
  • And for complex situations, you can reference a custom AGI script.

You can even store the DTMF input and lookup result to channel variables for later reuse making it possible to chain multiple Dynamic Routes together. With COVID lockdowns and remote work becoming the new normal, we see forum questions and support tickets from PBX administrators trying to solve one-off type problems that are solvable with the Dynamic Routes module, problems that otherwise would only be fixable with a custom dialplan. So for anyone who’s had a chance to use this module in the past, or is now thinking this is just the thing they were looking for, then please join me in thanking John Fawcett for his service in maintaining this module for the community and for formally contributing it to the FreePBX project. Eventually, we’ll get the FreePBX Wiki updated to include details on how each of the module GUI fields work. Until then, anyone using this module is encouraged to seek help and share your success on the FreePBX Community Forum.

Share this Blogpost

Share on email
Share on facebook
Share on twitter
Share on linkedin
Share on reddit
Share on tumblr
Share on telegram

Start the Discussion

Sign up for our Newsletter

Scroll to Top