From: Christian Weiske Date: Sat, 14 Jul 2012 17:30:19 +0000 (+0200) Subject: initial debugging X-Git-Tag: v1.0.0~92 X-Git-Url: https://git.cweiske.de/auerswald-callnotifier.git/commitdiff_plain/0fa0cb98aa18b997c80afba70475ac8fa149204f initial debugging --- 0fa0cb98aa18b997c80afba70475ac8fa149204f diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..188b878 --- /dev/null +++ b/README.rst @@ -0,0 +1,21 @@ +Auerswald Callnotifier for COMpact 3000 +*************************************** + +Connects to the debug port of your Auerswald Compact 3000 telephony switchboard +and listens for incoming calls. +It will notify you whenever a call comes in. + + +TODO +==== +- multiple notification methods: XMPP, dreambox, notify-send +- ldap name resolution +- write a call list (who, when, how long) +- filter/exclude by local target + + +Issues +====== +Ctrl+C does not send the disconnect command. +This is a problem with PHP since pcntl_signal handling and blocking sockets +do not work together. The signal will not be handled. diff --git a/callnotifier.php b/callnotifier.php new file mode 100644 index 0000000..605b773 --- /dev/null +++ b/callnotifier.php @@ -0,0 +1,85 @@ +#!/usr/bin/env php +CDPN[41], + var_dump($details); + $regex = '#CGPN\\[([^\\]]+)\\]->CDPN\\[([^\\]]+)\\]#'; + if (preg_match($regex, $details, $matches)) { + var_dump('a call!', $matches); + } +} + +?> \ No newline at end of file