aboutsummaryrefslogtreecommitdiff
path: root/src/callnotifier/EDSS1/Message.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2012-07-16 22:58:34 +0200
committerChristian Weiske <cweiske@cweiske.de>2012-07-16 22:58:34 +0200
commit0073743d7518e5899f0cd075a1c7755a9d603bbd (patch)
treec48e95609e678627529b1ca4ee5b43c7a3a43ab4 /src/callnotifier/EDSS1/Message.php
parentf66acab69b4981bbb21bccd2754cb1e870f3d360 (diff)
downloadauerswald-callnotifier-0073743d7518e5899f0cd075a1c7755a9d603bbd.tar.gz
auerswald-callnotifier-0073743d7518e5899f0cd075a1c7755a9d603bbd.zip
first try on E-DSS-1 ISDN d-channel parsing
Diffstat (limited to 'src/callnotifier/EDSS1/Message.php')
-rw-r--r--src/callnotifier/EDSS1/Message.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/callnotifier/EDSS1/Message.php b/src/callnotifier/EDSS1/Message.php
new file mode 100644
index 0000000..3d22a82
--- /dev/null
+++ b/src/callnotifier/EDSS1/Message.php
@@ -0,0 +1,35 @@
+<?php
+namespace callnotifier;
+
+class EDSS1_Message
+{
+ const ALERTING = "\x01";
+ const CALL_PROCEEDING = "\x02";
+ const SETUP = "\x05";
+ const CONNECT = "\x07";
+ const SETUP_ACKNOWLEDGE = "\x0D";
+ const DISCONNECT = "\x45";
+ const RELEASE = "\x4D";
+ const RELEASE_COMPLETE = "\x5A";
+ const INFORMATION = "\x7B";
+
+ /**
+ * @var integer
+ */
+ public $type;
+ public $parameters = array();
+
+
+ public function getTypeName()
+ {
+ $rc = new \ReflectionClass($this);
+ foreach ($rc->getConstants() as $name => $value) {
+ if (ord($value) == $this->type) {
+ return $name;
+ }
+ }
+ return '';
+ }
+}
+
+?>