Up to now I’ve successfully got my system to send two text messages when a particular customer rings to confirm their dental appointment.
I do this like this in extensions_custom.conf:-
[textstaff]
exten => s,1,TrySystem(. /home/asterisk/textstaff.sh > /dev/null 2>&1 &)
exten => s,n,Return
the file contents look like this
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin/:/usr/sbin/postfix
echo "VIP customer coming on Tuesday" | mail -s sender=VIP [email protected]
I just tried ‘extending’ this system by trying to do a company wide page to all phones at the same time by modifying textstaff.sh to this:
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin/:/usr/sbin/postfix
echo "VIP customer coming on Tuesday" | mail -s sender=VIP [email protected]
cp /var/spool/asterisk/tmp/vipannounce.call /var/spool/asterisk/tmp/vipannouncebk.call
mv /var/spool/asterisk/tmp/vipannouncebk.call /var/spool/asterisk/outgoing
The contents of vipannounce.call
are
Channel: Local/51@from-internal
Callerid: "VIP NOTIFICATION"
MaxRetries: 5
RetryTime: 300
WaitTime: 45
Context: vipnotification
Extension: s
Priority: 1
The contents of vipnotifications
is
[vipnotifications ]
exten => s,1,Background(en/custom/vip_received)
I tested it, but the system froze and was very sluggish on SSH and it took me issuing a fwconsole reload
for it to respond. The SECOND I issued the fwconsole reload
, though, it woke up and started responding again.
Did I do this in a wrong headed way? It seems like I maybe was asking the system to be doing two things at the same time? Which I know it can do, but maybe not like this??
Cheers!