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¶
- Go to System Attributes → Custom Destinations.
- Click Add Custom Destination.
- Fill in:
- Target —
context,extension,priority, e.g.my-custom-app,s,1. - Description — e.g.
Custom CRM Lookup. - Notes — optional notes for the next tech.
- Return —
Yesif your dialplan ends withReturn()and you want FreePBX to send the call onward to a "Destination After Return";Noif your dialplan handles the full call. - Destination After Return — only if Return = Yes; pick where the call goes after your custom code finishes.
- Target —
- Click Submit.
- 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 reloador restart Asterisk. - Call drops immediately. Your dialplan ends without
Hangup()orReturn(). Add one. - Loop / call returns to itself.
Return = Yesbut no matchingReturn()in your dialplan, or vice versa.