aboutsummaryrefslogtreecommitdiff
path: root/src/callnotifier/Logger/CallNotifySend.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/callnotifier/Logger/CallNotifySend.php')
-rw-r--r--src/callnotifier/Logger/CallNotifySend.php15
1 files changed, 13 insertions, 2 deletions
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']);
}