Dial extension and automate wait and dtmf


I’m trying to find the best and easiest way (most probably not the same) to create some sort of speeddial to dial and open a door lock with one button press.
So we need to dial the internal extension of the door intercom, wait for it to answer, press a key (dtmf), wait, press another key (dtmf), wait for the doorlock to activate and hangup.

Can you please help me out?


I’m thinking of some custom code that calls the door phone, waits a second, plays the DTMF code, waits 2 seconds and hangs up. And have a virtual extension forwarded to this script.

I’m not good at writing code, i believe other people here are better at this than me. Or someone else has a better idea.

Write a context that answers the call, uses the PlayDTMF function, and hangs up. Connect it through the Custom/Miscellaneous functions on the GUI and make it available as a dialed extension.

There are plenty of examples here on the forums - search for playdtmf.

Dial Local/4805551212www1212

each w is 500ms
so this would
Dial 4805551212
Wait 1.5 seconds
Dial 1234

1 Like

Allright, so in the config edit i’ll dit the ‘extensions_custom.conf’:
I want to use 900 to call the intercom

exten => 900,1,Dial Local/220www1212
exten => 900,1,Hangup

But then…how can I get Freepbx with Custom and/or Miscellaneous functions to add extension 900, and point it to the code?


Custom dial plan is done with a “Custom Destination”. For your example above, you would create a custom destination with a Goto string of:


and then use this destination in the GUI to direct the call. If you need a dialable feature code, use a Misc Application.

However, your dial string is not going to work as it’s mis-formatted. You also need to look at the help for the Dial application, and the option to pass DTMF post answer is with the D option, so it will look something like:

exten => 900,1,Dial(Local/[email protected],30,D(www1212))
exten => 900,1,Hangup
1 Like

Hi Lorne,

thanks, got it!
Works like a charm now.


1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.