summaryrefslogtreecommitdiffstats
path: root/abs/core/ncid/ncid-linhes
diff options
context:
space:
mode:
authorCecil <knoppmyth@gmail.com>2012-05-14 01:38:13 (GMT)
committerCecil <knoppmyth@gmail.com>2012-05-14 01:38:13 (GMT)
commit6fa6efd0975ac9e669ee73fe009c25fe739ac017 (patch)
treeb4e1cdb3e3001a1209fe932b2e26db33b0ed9120 /abs/core/ncid/ncid-linhes
parente465b073524b59ea2b795d525cf39675857cf2ee (diff)
parentc04f2dfff3a4abbe0e3b4a7247f0001f797b07ac (diff)
downloadlinhes_pkgbuild-6fa6efd0975ac9e669ee73fe009c25fe739ac017.zip
linhes_pkgbuild-6fa6efd0975ac9e669ee73fe009c25fe739ac017.tar.gz
linhes_pkgbuild-6fa6efd0975ac9e669ee73fe009c25fe739ac017.tar.bz2
Merge branch 'testing' of git@linhes.org:linhes_pkgbuild into testing
Diffstat (limited to 'abs/core/ncid/ncid-linhes')
-rw-r--r--abs/core/ncid/ncid-linhes33
1 files changed, 33 insertions, 0 deletions
diff --git a/abs/core/ncid/ncid-linhes b/abs/core/ncid/ncid-linhes
new file mode 100644
index 0000000..1a9e74c
--- /dev/null
+++ b/abs/core/ncid/ncid-linhes
@@ -0,0 +1,33 @@
+#!/bin/sh
+# keep "ncid-" in the name
+# input is 6 lines obtained from ncid
+# input: DATE\nTIME\nNUMBER\nNAME\nLINE\nTYPE\n
+#
+# input is 6 lines if a message was sent
+# input: \n\n\n<MESSAGE>\n\nMSG\n
+# Message will be in $CIDNAME
+#
+# ncid usage:
+# ncid --no-gui [--message] --program ncid-linhes
+
+# $CIDTYPE is one of:
+# CID: incoming call
+# OUT: outgoing call
+# HUP: blacklisted hangup
+# MSG: message instead of a call
+
+ConfigDir=/etc/ncid
+ConfigFile=$ConfigDir/ncidmodules.conf
+
+[ -f $ConfigFile ] && . $ConfigFile
+
+read CIDDATE
+read CIDTIME
+read CIDNMBR
+read CIDNAME
+read CIDLINE
+read CIDTYPE
+
+#echo "$CIDDATE|$CIDTIME|$CIDNMBR|$CIDNAME|$CIDLINE|$CIDTYPE" > /dev/tty
+/usr/LH/bin/lh_message.sh "$CIDNMBR\n$CIDNAME\n$CIDTYPE"
+exit 0