Donovan Niesen
2007-Apr-17 10:06 UTC
[asterisk-users] Trigger a wake-up call from the shell?
I have set up a script that ensures certain services are up on my Asterisk box (Trixbox 2.0). I would like it to trigger a wake-up call if certain conditions aren't meant. How might I accomplish this from the shell? -- Donovan Niesen Customer Contact Services www.yourccsteam.com
William Moore
2007-Apr-17 10:54 UTC
[asterisk-users] Trigger a wake-up call from the shell?
On 4/17/07, Donovan Niesen <dniesen@yourccsteam.com> wrote:> I have set up a script that ensures certain services are up on my > Asterisk box (Trixbox 2.0). I would like it to trigger a wake-up call > if certain conditions aren't meant. How might I accomplish this from > the shell?Take a look at call files. They allow you to generate a call from * to a phone and then do whatever you want with the other end (play a message, connect you to a tech, etc.)
dave cantera
2007-Apr-17 19:22 UTC
[asterisk-users] Trigger a wake-up call from the shell?
donovan, by wake up call, I am assuming you have some condition that will trigger a call not an actual 'wake me (a human) up call'... here is what I set up to remind me to remind my son to take his singulair pill. at 5;30pm.. I created a cron job to kick this shell script off... thankfully, he doesn't require it anymore... this uses channel Zap/2 my POTS line, to call out.. daveC =================< the script >================#!/bin/sh cd /home/dc/asterisk LOGFILE="`pwd`/singulair.log" echo " =======================================" >>${LOGFILE} echo " ${0}: Started at `date` " >>${LOGFILE} chown asterisk *.call # lets see it in the logfile ls -l /var/spool/asterisk/outgoing >>${LOGFILE} echo -n " 856-111-9876 " >>${LOGFILE} cp -p /home/dc/asterisk/DJSingulaire856.call /var/spool/asterisk/outgoing/2.call; # lets see it in the logfile ls -l /var/spool/asterisk/outgoing >>${LOGFILE} echo " Done " >>${LOGFILE} =========================< the .call file >====================# # This is a sample file that can be dumped in /var/spool/asterisk/outgoing # to generate a call. # # Comments are indicated by a '#' character that begins a line, or follows # a space or tab character. To be consistent with the configuration files # in Asterisk, comments can also be indicated by a semicolon. However, the # multiline comments (;-- --;) used in Asterisk configuration files are not # supported. Semicolons can be escaped by a backslash. # # Obviously, you MUST specify at least a channel in the same format as you # would for the "Dial" application. Only one channel name is permitted. # #Channel: Zap/1 Channel: Zap/2/8561119876 # # You may also specify a wait time (default is 45 seconds) for how long to # wait for the channel to be answered, a retry time (default is 5 mins) # for how soon to retry this call, and a maximum number of retries (default # is 0) for how many times to retry this call. # MaxRetries: 2 ;RetryTime: 60 ;waitTime: 30 # # Once the call is answered, you must provide either an application/data # combination, or a context/extension/priority in which to start the PBX. # ##Context: dialout-alert-MyCell #doesn't quite work Context: dialout-alert Extension: s Priority: 1 # # Alternatively you can specify just an application # and its arguments to be run, instead of a context # extension and priority # #Application: VoiceMailMain #Data: 1234 # # You can set the callerid that will be used for the outgoing call # Callerid: DJ Singulaire <(856) 778-0811> # # You can set channel variables that will be passed to the channel. # This includes writable dialplan functions. # #Set: file1=/tmp/to #Set: file2=/tmp/msg #Set: timestamp=20021023104500 #Set: CDR(accountcode|r)=blort #Set: CDR(userfield|r)=42 =============< extensions.conf >==================[dialout-alert] exten => s,1,Answer exten => s,n,Playback(tt-weasels) (always get a kick out of this!) exten => s,n,Playback(custom/take-your-singulair) Donovan Niesen wrote:> I have set up a script that ensures certain services are up on my > Asterisk box (Trixbox 2.0). I would like it to trigger a wake-up call > if certain conditions aren't meant. How might I accomplish this from > the shell? >-- Building Strong Relationships w/ Intelligent Customer Service -- Interlocking Business Solutions, LLC 856-380-0894 x5000