2 namespace callnotifier;
4 class Logger_CallDreambox extends Logger_CallBase
8 public function __construct($host, $callTypes = 'i', $msns = array())
10 parent::__construct($callTypes, $msns);
14 public function log($type, $arData)
16 if ($type != 'startingCall') {
20 $call = $arData['call'];
21 if (!$this->hasValidType($call)) {
24 if (!$this->hasValidMsn($call)) {
27 $this->displayStart($call);
31 protected function displayStart(CallMonitor_Call $call)
33 if ($call->type != CallMonitor_Call::INCOMING) {
37 $this->addUnsetVars($call);
40 if ($call->fromName !== null) {
41 $msg .= $call->fromName
42 . "\nNummer: " . $call->from;
46 if ($call->fromLocation !== null) {
47 $msg .= "\nOrt: " . $call->fromLocation;
53 protected function notify($msg)
55 $url = 'http://' . $this->host
56 . '/web/message?type=2&timeout=10&text=' . urlencode($msg);
59 . ' ' . escapeshellarg($url)
60 . ' > /dev/null 2>&1 &'