Dial plan help

Hi, I have a script that generates a call file that looks like this:

Channel: sip/voipvoip/$phone
Maxretries: 5
Retrytime: 300
Waittime: 40
Application: Playback
Data: $name
");

So, when this call file is moved to /var/spool/asterisk/outgoing, I get the phone call and it plays the message $name…this works just fine. At the end of the message though I want it to say something like “to confirm, please press 1, or to reschedule please press 2”

Then, when I press 1 or 2 I want to execute a specific script. So, if someone answers the phone and hears this “Hello, this call is to confirm your 2:30 meeting tomorrow with Bill, please press 1 to confirm, or 2 to reschedule”…if they press 1, I will have a script update the database that puts a “1” in the confirm column or something.

So, can I add something in the call file itself for this? Or, do I have to do something in extensions.conf? My current extensions.conf:
[test]
include => stdexten

exten => s,1,Wait(1) ; Wait a second, just for fun
exten => s,n,Answer ; Answer the line
exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
exten => s,#,Hangup

Is better use the dialplan to do that using your .call file take a look on this basically is the same thing that you want.

Okay, I will read that tomorrow morning. It is late here now, 12:03AM. However, every call I place will include different info in the call…so, every user who gets a call will not hear the same message (every call will playback its own respective .gsm file). For example, if Bill has a meeting with Joe at 3:00PM tomorrow, and Jill has a meeting with Sally at 3:00 PM tomorrow…Bill and Jill will each get a call reminding them of their meeting with $guest (where $guest is a variable pulled from a mysql database)…make sense?