Make Asterisk "press 0" while on a call


I have an interesting question. Here’s what I’d like to do with my FreePBX installation:

1.) I will dial into the phone system via some DID
2.) The system will say "please enter a password"
3.) I will enter a password, and the system will respond by “pressing” 0.

This is for setting up with a gate at my building. When at the gate intercom, typing in my apartment currently rings my cell phone and I hit ‘0’ to let them in. I’d rather it call the PBX and if the person knows a code, the PBX will hit ‘0’ and the gate will open.

2 above could simply be done with a few steps through an IVR I suppose, but I"m not not sure how to make the PBX “press” 0 while in the call.

Might try using “Misc Destination”

Set up an IVR that is accessible with a DID, then set up one of the options with your “code” and have it go to the misc destination that dials 0.

On part of our IVR we use *xx (xx=any two numbers) to access the misc destination so it dials for us to specific features in the system like voice mail etc.

I don’t think that’s going to work. I added a Misc Destination and put 0 as the “Dial:” option…

here’s what i got in the log:

2011-12-19 16:33:23] VERBOSE[6960] pbx.c: – Goto (ext-miscdests,1,1)
[2011-12-19 16:33:23] VERBOSE[6960] pbx.c: – Executing [[email protected]:1] NoOp(“SIP/NLV1-00000fb2”, “MiscDest: Test”) in new stack
[2011-12-19 16:33:23] VERBOSE[6960] pbx.c: – Executing [[email protected]:2] Goto(“SIP/NLV1-00000fb2”, “from-internal,0,1”) in new stack
[2011-12-19 16:33:23] VERBOSE[6960] pbx.c: – Goto (from-internal,0,1)
[2011-12-19 16:33:23] WARNING[6960] pbx.c: Channel ‘SIP/NLV1-00000fb2’ sent into invalid extension ‘0’ in context ‘from-internal’, but no invalid handler

Can I just have the system play a .wav of the DTMF tone for 0?

Playing a gsm file of just the ‘0’ dtmf tone worked great!

Any ideas?

Did you tried using SendDTMF asterisk application. Using this app you can send dtmf digits while call is established. Try playing arround in dialplan and you might get the idea.

I haven’t because I simply used an IVR to play a recording of a dtmf digit tone that I generated from a website.

Works great as is, and is very easy to modify through the GUI