From e60135e26ab4b374642f6f9293ddcac26adcacc8 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 26 Jul 2012 07:33:43 +0200 Subject: [PATCH] remove preg call parsing of info lines; we've got the real edss1 messages to utilize --- src/callnotifier/MessageHandler.php | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/callnotifier/MessageHandler.php b/src/callnotifier/MessageHandler.php index 9e65b81..59e8fa0 100644 --- a/src/callnotifier/MessageHandler.php +++ b/src/callnotifier/MessageHandler.php @@ -14,7 +14,6 @@ class MessageHandler */ protected $logger = array( 'msgData' => array(), - 'incomingCall' => array(), 'edss1msg' => array(), ); @@ -73,15 +72,8 @@ class MessageHandler ) ); - if ($type != 'Info') { + if ($type == 'Debug') { $this->parseEDSS1($details); - return; - } - //Vegw/Ets-Cref:[0xffef]/[0x64] - VEGW_SETUP from upper layer to internal destination: CGPN[**22]->CDPN[41], - $regex = '#CGPN\\[([^\\]]+)\\]->CDPN\\[([^\\]]+)\\]#'; - if (preg_match($regex, $details, $matches)) { - list(, $from, $to) = $matches; - $this->log('incomingCall', array('from' => $from, 'to' => $to)); } } @@ -105,16 +97,6 @@ class MessageHandler $bytestring = substr($details, 5); $bytes = static::getBytesFromHexString($bytestring); - $msgtype = $bytes{7}; - static $interestingTyps = array( - EDSS1_Message::SETUP, - EDSS1_Message::CONNECT, - EDSS1_Message::INFORMATION - ); - if (!in_array($msgtype, $interestingTyps)) { - //return; - } - $mp = new EDSS1_Parser(); $msg = $mp->parse($bytes); -- 2.30.2