/[smecontribs]/rpms/smeserver-freepbx/contribs7/smeserver-freepbx-0.1-trunk_alert_mail.patch
ViewVC logotype

Contents of /rpms/smeserver-freepbx/contribs7/smeserver-freepbx-0.1-trunk_alert_mail.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Mar 2 17:31:24 2009 UTC (15 years, 8 months ago) by slords
Branch: MAIN
CVS Tags: smeserver-freepbx-0_1-12_el4_sme, smeserver-freepbx-0_1-22_el4_sme, smeserver-freepbx-0_1-28_el4_sme, smeserver-freepbx-0_1-29_el4_sme, smeserver-freepbx-0_1-26_el4_sme, smeserver-freepbx-0_1-25_el4_sme, smeserver-freepbx-0_1-15_el4_sme, smeserver-freepbx-0_1-31_el4_sme, smeserver-freepbx-0_1-21_el4_sme, smeserver-freepbx-0_1-23_el4_sme, smeserver-freepbx-0_1-27_el4_sme, smeserver-freepbx-0_1-9_el4_sme, smeserver-freepbx-0_1-24_el4_sme, smeserver-freepbx-0_1-30_el4_sme, smeserver-freepbx-0_1-17_el4_sme, smeserver-freepbx-0_1-13_el4_sme, smeserver-freepbx-0_1-20_el4_sme, smeserver-freepbx-0_1-14_el4_sme, smeserver-freepbx-0_1-32_el4_sme, smeserver-freepbx-0_1-18_el4_sme, smeserver-freepbx-0_1-16_el4_sme, HEAD
Initial import of smeserver-freepbx

1 diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/var/lib/asterisk/agi-bin/trunk_alert_mail.agi mezzanine_patched_smeserver-freepbx-0.1/root/var/lib/asterisk/agi-bin/trunk_alert_mail.agi
2 --- smeserver-freepbx-0.1/root/var/lib/asterisk/agi-bin/trunk_alert_mail.agi 1970-01-01 01:00:00.000000000 +0100
3 +++ mezzanine_patched_smeserver-freepbx-0.1/root/var/lib/asterisk/agi-bin/trunk_alert_mail.agi 2008-11-26 20:36:16.000000000 +0100
4 @@ -0,0 +1,42 @@
5 +#!/bin/bash
6 +
7 +declare -a array
8 +while read -e ARG && [ "$ARG" ] ; do
9 +array=(` echo $ARG | sed -e 's/://'`)
10 +export ${array[0]}=${array[1]}
11 +done
12 +
13 +DOMAIN=`dnsdomainname`
14 +HOST=`hostname`
15 +
16 +EMAIL=admin@$DOMAIN
17 +
18 +DATE=`date "+%d-%m-%Y %H:%M"`
19 +
20 +CID=`echo $agi_callerid`
21 +CIDNAME=`echo $agi_calleridname`
22 +EXTENSION=`echo $agi_extension`
23 +#CHANNEL=`echo $agi_channel`
24 +TYPE=`echo $agi_type`
25 +DNID=`echo $agi_dnid`
26 +
27 +REPORT=$EXTENSION
28 +
29 +if [ "$EXTENSION" = "s-CHANUNAVAIL" ]; then
30 + REPORT="Channel Unavailable"
31 +elif [ "$EXTENSION" = "s-CONGESTION" ]; then
32 + REPORT="Congestion"
33 +fi
34 +
35 +# Message Formating
36 +
37 +MSG="\n\n A call from \"$CIDNAME\" <$CID> (Type $TYPE)\n"
38 +MSG="$MSG To : $DNID\n"
39 +MSG="$MSG Has failed on host $HOST.$DOMAIN at $DATE\n\n"
40 +MSG="$MSG The error is : $REPORT \n\n"
41 +
42 +# Send an email
43 +
44 +echo -e "$MSG" | mail -s "[FAILED CALL] on host $HOST.$DOMAIN" "$EMAIL"
45 +
46 +

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed