aboutsummaryrefslogtreecommitdiff
path: root/src/callnotifier/Logger/CallDreambox.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/callnotifier/Logger/CallDreambox.php')
-rw-r--r--src/callnotifier/Logger/CallDreambox.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/callnotifier/Logger/CallDreambox.php b/src/callnotifier/Logger/CallDreambox.php
index 4720c4c..d617f1d 100644
--- a/src/callnotifier/Logger/CallDreambox.php
+++ b/src/callnotifier/Logger/CallDreambox.php
@@ -5,18 +5,26 @@ class Logger_CallDreambox extends Logger_CallBase
{
protected $host;
- public function __construct($host)
+ public function __construct($host, $callTypes = 'i', $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);
}