aboutsummaryrefslogtreecommitdiff
path: root/src/callnotifier/MessageHandler.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2012-07-20 07:45:53 +0200
committerChristian Weiske <cweiske@cweiske.de>2012-07-20 07:45:53 +0200
commit2039373b7d60786e5b92a79520cecfcfce34c044 (patch)
treed30dac6fa8c58cd5990c6abfa4fc533f890bfaf3 /src/callnotifier/MessageHandler.php
parent0073743d7518e5899f0cd075a1c7755a9d603bbd (diff)
downloadauerswald-callnotifier-2039373b7d60786e5b92a79520cecfcfce34c044.tar.gz
auerswald-callnotifier-2039373b7d60786e5b92a79520cecfcfce34c044.zip
read TEI and call reference
Diffstat (limited to 'src/callnotifier/MessageHandler.php')
-rw-r--r--src/callnotifier/MessageHandler.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/callnotifier/MessageHandler.php b/src/callnotifier/MessageHandler.php
index 6181e3a..9e65b81 100644
--- a/src/callnotifier/MessageHandler.php
+++ b/src/callnotifier/MessageHandler.php
@@ -103,10 +103,7 @@ class MessageHandler
}
$bytestring = substr($details, 5);
- $bytes = '';
- foreach (explode(' ', $bytestring) as $strbyte) {
- $bytes .= chr(hexdec($strbyte));
- }
+ $bytes = static::getBytesFromHexString($bytestring);
$msgtype = $bytes{7};
static $interestingTyps = array(
@@ -137,6 +134,15 @@ class MessageHandler
}
}
+ public static function getBytesFromHexString($bytestring)
+ {
+ $bytes = '';
+ foreach (explode(' ', $bytestring) as $strbyte) {
+ $bytes .= chr(hexdec($strbyte));
+ }
+ return $bytes;
+ }
+
protected function prepareDump()
{
if ($this->config->dumpFile === null) {