Skip to content

Add a Custom Destination

A Custom Destination registers an arbitrary Asterisk dialplan target (context,extension,priority) as a destination FreePBX modules can route to. Use this when you've written custom dialplan in extensions_custom.conf and need GUI modules to call into it.

Advanced

Custom Destinations require comfort with Asterisk dialplan. Wrong values cause hangups or worse, dialplan loops.

Before You Start

  • You've written and reloaded your custom dialplan in /etc/asterisk/extensions_custom.conf.
  • You know the exact context, extension, and priority of the entry point.

Steps

  1. Go to System Attributes → Custom Destinations.
  2. Click Add Custom Destination.
  3. Fill in:
    • Targetcontext,extension,priority, e.g. my-custom-app,s,1.
    • Description — e.g. Custom CRM Lookup.
    • Notes — optional notes for the next tech.
    • ReturnYes if your dialplan ends with Return() and you want FreePBX to send the call onward to a "Destination After Return"; No if your dialplan handles the full call.
    • Destination After Return — only if Return = Yes; pick where the call goes after your custom code finishes.
  4. Click Submit.
  5. Click Apply Config.

Verify

Point an Inbound Route at your Custom Destination and place a test call. Watch:

asterisk -rvvvv

The console should show your custom context being entered.

Common Issues

  • "No such context." The custom dialplan isn't loaded. dialplan reload or restart Asterisk.
  • Call drops immediately. Your dialplan ends without Hangup() or Return(). Add one.
  • Loop / call returns to itself. Return = Yes but no matching Return() in your dialplan, or vice versa.