try to handle nightly debug port resets
[auerswald-callnotifier.git] / src / callnotifier / Logger / CallDreambox.php
index 4720c4c920bf4f3dba081171db314ed89d879853..f5da0f98aa1f5e7b8f673564702a4b041b02fe69 100644 (file)
@@ -5,18 +5,26 @@ class Logger_CallDreambox extends Logger_CallBase
 {
     protected $host;
 
-    public function __construct($host)
+    public function __construct($host, $callTypes = 'io', $msns = array())
     {
+        parent::__construct($callTypes, $msns);
         $this->host = $host;
     }
 
     public function log($type, $arData)
     {
-        switch ($type) {
-        case 'startingCall':
-            $this->displayStart($arData['call']);
-            break;
+        if ($type != 'startingCall') {
+            return;
+        }
+
+        $call = $arData['call'];
+        if (!$this->hasValidType($call)) {
+            return;
+        }
+        if (!$this->hasValidMsn($call)) {
+            return;
         }
+        $this->displayStart($call);
     }