I made some changes to the awesome work done by JonR and Andy Wysocki that some people might like to have.
I commented out the requirement that you do math to cancel the annoy, I'd have enough trouble pressing 1, forget about figuring out math before 3 cups of coffee.
I also added support for calling in from an outside phone (like a cell phone) as both my wife and I need wakeup calls and usually use our cell phones for it. You should be aware that wakeconfirm understands a caller id of less than or equal to 4 numbers as a local extension and greater than that is an outside extensions. If the call back number is an outside extension, the system adds $parm_dial_out_prefix to the front of the number to be called and $parm_dial_out_postfix to the end. That helps me make the call over an IAX2 interface with voipjet.
I made it so that if you don't answer, you get a call back in two minutes; therefore you MUST answer 1 in order to get it to stop calling! (this was added after I slept through the first call and there was no second; oops)
The code is available here: http://www.dataixl.com/asterisk/asteriskwake.tar.gz
wakeup.php, wakeconfirm.php and wake.inc need to be in your agi-bin directory (usually /var/lib/asterisk/agi-bin)
>the contents of extensions.inc need to be part of your extensions.conf file (do a copy and paste or "cat extensions.inc >>/etc/asterisk/extensions.conf")
The basic idea is that when wake.php creates the outgoing spool file, it will tell asterisk to create the call in the wake confirm context where any dialed number reaches wakeconfirm. Then wakeconfirm can read the number dialed to know what number to call back if necessary.
This worked for me; but no guarantee it'll work for you. I don't have [email protected]
so I haven't tried it there.