Vous êtes sur la page 1sur 2

; ; ; ; ; ; ; ; ; ; ; ;

_ _ ____ | | | |___ \ / \ | | |_ __ _ __) | / /\ \ | | __/ _` ||__ < / ____ \| | || (_| |___) | /_/ \_\_|\__\__,_|____/ asterisk v1.8 ubuntu 10.04 (lucid lynx) /etc/asterisk/extensions.conf narrarated & coded by RZFeeser visit http://alta3.com contact us for training! /\

; Call files are located in /var/spool/asterisk/outgoing/ ; Call files end in .call ; Call files are 'read' if their change time is equal to, or before, the current time ; Latest O'Riley manual says to copy (cp) files into /var/spool/asterisk/outgoin g/ this is incorrect!! Always create a call file in a unique directory, ; then move them into outgoing using move (mv)! Otherwise, Asterisk may process the call file prematurely. [wake-up] ; Feature - Wakeup Call Enablement - Written by RZFeeser ; -----------------------------------------------------------------exten => _*43*XXXXXXXXXXXX,1,Answer() ; 12 Xs(*43*YYYYMODDHHMM) exten => _*43*XXXXXXXXXXXX,n,Set(year=${EXTEN:4:4}) ; Skip the first 4 and take the next 4 digits exten => _*43*XXXXXXXXXXXX,n,Set(month=${EXTEN:8:2}) ; Skip the first 8 and take the next 2 digits exten => _*43*XXXXXXXXXXXX,n,Set(day=${EXTEN:10:2}) ; Skip the first 10 and take the next 2 digits exten => _*43*XXXXXXXXXXXX,n,Set(hours=${EXTEN:12:2}) ; Skip the first 12 and take the next 2 digits exten => _*43*XXXXXXXXXXXX,n,Set(minutes=${EXTEN:14:2}) ; Skip the first 14 and take the next 2 digits exten => _*43*XXXXXXXXXXXX,n,NoOp(Wake-up call scheduled for ${CALLERID(num)} at ${hours}:${minutes} on ${day}.${month}.${year}.) exten => _*43*XXXXXXXXXXXX,n,System(echo "Channel: SIP/${CALLERID(num)}\\nCaller ID: "WakeUP"<0000>\\nMaxRetries: <3>\\nWaitTime: <60>\\nContext: playdrwho\\nExt ension: 23" > /tmp/${UNIQUEID}.call) ; RetryTime (Number of seconds to wait until the next dial attempt) defaults to 300 seconds if not specified exten => _*43*XXXXXXXXXXXX,n,System(touch -t ${year}${month}${day}${hours}${minu tes} /tmp/${UNIQUEID}.call) exten => _*43*XXXXXXXXXXXX,n,System(mv /tmp/${UNIQUEID}.call /var/spool/asterisk /outgoing/) exten => _*43*XXXXXXXXXXXX,n,Playback(rqsted-wakeup-for) ; Default Playback() references the /var/lib/asterisk/sounds/en exten => _*43*XXXXXXXXXXXX,n,SayNumber(${hours}) ; Speak numeric value of var hours exten => _*43*XXXXXXXXXXXX,n,SayNumber(${minutes})

; Speak numeric value of var minutes exten => _*43*XXXXXXXXXXXX,n,Playback(vm-goodbye) ; Default Playback() references the /var/lib/asterisk/sounds/en exten => _*43*XXXXXXXXXXXX,n,Hangup() [playdrwho] ; What to do when wake-up call is placed (Play Doctor Who Theme) - Code written by RZFeeser ; ---------------------------------------------------------------------------------------------------exten => 23,1,Answer() exten => 23,n,Wait(1) exten => 23,n,Playback(drwho) ; Playback references the /var/lib/asterisk/sounds/en/drwho.gsm exten => 23,n,Wait(1) exten => 23,n,Hangup() ; Troubleshooting ;---------------; 1) Wakeup calls work erratically, or only when asterisk is bounced. Check your system time by typing 'date'. Is it accurate? If not.... ; sudo apt-get install ntpd (if your running in a VM, this may be the case) ; ; 2) Hear a fast busy before you finish dialing. Check to see if your SIP phone has a dialplan. If so, you'll need to allow 'matching' on *43*XXXXXXXXXXXX ; ; 3) If autoload=no in /etc/asterisk/modules.conf be sure to load pbx_spool.so, otherwise calls will not work. (If autoload=yes, ignore this step) ; ; 4) Visit http://alta3.com then click on 'downloads' to download the above code ; ; ** Oh, and just because we live in a world of lawyers... this video and code i s for education purposes only. Please do not ask me to send you the Doctor Who * .gsm or *.mp3. ; Neither I, nor Alta3 Research, is looking to profit from other people's hard w ork! Rather, the A3 office simply tight with the good Doctor. If you would like to know how to ; make your own *.gsm files, shoot me an email (rzfeeser@alta3.com), or look for our other YouTube videos!

Vous aimerez peut-être aussi