aboutsummaryrefslogtreecommitdiff
path: root/src/callnotifier/Logger/CallDreambox.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2012-08-10 22:32:08 +0200
committerChristian Weiske <cweiske@cweiske.de>2012-08-10 22:32:08 +0200
commit378a3adf9811b27980efd03dd8a51d9fe00258ca (patch)
tree06de01d27fa64401899d3c58c9e44a808685134c /src/callnotifier/Logger/CallDreambox.php
parentbbd03e7cdd6defd30e9019ae5bf690a085482776 (diff)
downloadauerswald-callnotifier-378a3adf9811b27980efd03dd8a51d9fe00258ca.tar.gz
auerswald-callnotifier-378a3adf9811b27980efd03dd8a51d9fe00258ca.zip
all loggers support call type and MSN filtering now
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);
}