summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-pbx/root/etc/pbx-asterisk/delayedcallback
diff options
context:
space:
mode:
authorIordan Iordanov <iiordanov@gmail.com>2013-03-09 22:52:53 +0000
committerIordan Iordanov <iiordanov@gmail.com>2013-03-09 22:52:53 +0000
commita0183b2f75a772366336671a818707df3dc04e79 (patch)
treea93c028a0b361fd1181a5c4b3ce9d3afbbae8d6d /applications/luci-pbx/root/etc/pbx-asterisk/delayedcallback
parent7021120936575df16a3af6606399504d42e73531 (diff)
- added beep.gsm
- now escaping special characters in pbx-asterisk - changed location of voicemail temp stuff and log file - changed pbx-send-voicemail to use base64 instead of uuencode - added many missing dependencies - now allowing ip addresses as well as hostnames for external host - constrained # seconds to ring to positive integers - specifying externrefresh in sip.conf template - fixed voicemail (sending recordings, recording new greeting, instructions) - Implemented callback
Diffstat (limited to 'applications/luci-pbx/root/etc/pbx-asterisk/delayedcallback')
-rwxr-xr-xapplications/luci-pbx/root/etc/pbx-asterisk/delayedcallback18
1 files changed, 18 insertions, 0 deletions
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/delayedcallback b/applications/luci-pbx/root/etc/pbx-asterisk/delayedcallback
new file mode 100755
index 0000000000..903efe9ad9
--- /dev/null
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/delayedcallback
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Check if there are more than one instance of this command
+# with the same command line running at the same time for some
+# reason, then quit. We are checking for the same
+# commandline in order to permit two different callback
+# attempts simultaneously.
+
+if ! grep -q "$@" /dev/shm/delayedcallback.[0-9]* 2>/dev/null
+then
+ echo "$@" > /dev/shm/delayedcallback.$$
+ sleep 25
+ asterisk -r -x "$1 $2 \"$3\" $4 $5 $6"
+ rm /dev/shm/delayedcallback.$$
+# echo "`date` $@": >> /dev/shm/delayedcallback.log
+#else
+# echo "`date` ERROR: There appears to be a callback attempt in progress to: $@" >> /dev/shm/delayedcallback.err
+fi