lgaetz
(Lorne Gaetz)
October 29, 2024, 1:37pm
4
Don’t use from-pstn-custom. You will find references here in the forum to its existence, but it should not be used. A supportable way of adding your own dialplan on the inbound leg of a call is to create your own context that looks something like this
[form-pstn-preprocess]
exten => _.,1,Noop()
exten => _.,n,Set(TIMEOUT(absolute)=900)
exten => _.,n,GoTo(from-pstn,${EXTEN},1)
then set the context of your trunk(s) to the above context instead of from-pstn.
For outbound calls use the predial hook explained in this thread
Edit by Lorne 2025-02-03
The dialplan shared in this thread will not work with FreePBX version 17 or newer. In all cases, you want to replace all instances of
exten => s,n,MacroExit
with
exten => s,n,Return
Hooking for Fun and Income
Despite the frequency with which it arises here in the forum, there is not yet a good resource for learning to use dialplan hooks in FreePBX. This will probably end up in the wiki at some point, but until that happens, here are the broad strokes for leveraging…