From 378a3adf9811b27980efd03dd8a51d9fe00258ca Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 10 Aug 2012 22:32:08 +0200 Subject: all loggers support call type and MSN filtering now --- src/callnotifier/Logger/CallNotifySend.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/callnotifier/Logger/CallNotifySend.php') diff --git a/src/callnotifier/Logger/CallNotifySend.php b/src/callnotifier/Logger/CallNotifySend.php index 477a253..74c930e 100644 --- a/src/callnotifier/Logger/CallNotifySend.php +++ b/src/callnotifier/Logger/CallNotifySend.php @@ -7,12 +7,23 @@ class Logger_CallNotifySend extends Logger_CallBase { switch ($type) { case 'startingCall': - $this->displayStart($arData['call']); + $displayMethod = 'displayStart'; break; case 'finishedCall': - $this->displayFinished($arData['call']); + $displayMethod = 'displayFinished'; break; + default: + return; } + + $call = $arData['call']; + if (!$this->hasValidType($call)) { + return; + } + if (!$this->hasValidMsn($call)) { + return; + } + $this->$displayMethod($arData['call']); } -- cgit v1.2.3