From 0fa0cb98aa18b997c80afba70475ac8fa149204f Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sat, 14 Jul 2012 19:30:19 +0200 Subject: [PATCH] initial debugging --- README.rst | 21 ++++++++++++ callnotifier.php | 85 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 README.rst create mode 100644 callnotifier.php 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 -- 2.30.2