Skip to main content

wake up call

Posted by Jasril on

so while playing around with call files, one of the most obvious (although unused) applications is probably wake up calls!

wether you want it or now here it is:


exten => s,1,Answer()
exten => s,n,Wait(1)
exten => s,n,Set(year=${STRFTIME(${EPOCH},,%Y)})
exten => s,n,Set(month=${STRFTIME(${EPOCH},,%m)})
exten => s,n,Read(day,date,2,,,8)
exten => s,n,Read(hours,hour,2,,,8)
exten => s,n,Read(minutes,minute,2,,,8)
exten => s,n,NoOp(Wake-up call scheduled for ${CALLERID(num)} at ${hours}:${minutes} on ${day}.${month}.${year}.)
exten => s,n,System(echo -e "Channel: SIP/VoIP-Innovations/${CALLERID(num)}\\nCallerID: "WakeUpCalls.com" <12345678910>\\nApplication: Macro\\nData: wake-up-msg" > /tmp/${UNIQUEID}.call)
exten => s,n,System(touch -t ${year}${month}${day}${hours}${minutes} /tmp/${UNIQUEID}.call)
exten => s,n,System(mv /tmp/${UNIQUEID}.call /var/spool/asterisk/outgoing/)
exten => s,n,Playback(wakeup-call)
exten => s,n,Playback(set)
exten => s,n,Playback(for)
exten => s,n,SayNumber(${hours})
exten => s,n,SayNumber(${minutes})
exten => s,n,Hangup()

then when it calls you back (at the same # you called from)


exten => s,1,Answer
exten => s,n,Wait(1)
exten => s,n,Playback(this)
exten => s,n,Playback(is)
exten => s,n,Playback(your)
exten => s,n,Playback(wakeup-call)
exten => s,n,Wait(1)
exten => s,n,Hangup

of course the above could just be replaced with a "Playback" of some custom greeting instead

when you activate the feature code it asks you for the date of the month (since i have it assume you want the call during the year and month you started, although if it is the last day of the month when you want to put in a wake up for the next day, then that sucks) the hour, and the minute at which time you wish to recieve your wake up call, then

also, i don't believe all of these recordings come with thirdlane, although they do come with asterisk...