2 namespace callnotifier;
4 class Logger_CallNotifySend extends Logger_CallBase
6 public function log($type, $arData)
10 $this->displayStart($arData['call']);
13 $this->displayFinished($arData['call']);
19 protected function displayStart(CallMonitor_Call $call)
21 $this->addUnsetVars($call);
22 if ($call->type == CallMonitor_Call::INCOMING) {
24 trim($this->getNumberString($call, 'from')),
29 trim($this->getNumberString($call, 'to')),
35 protected function displayFinished(CallMonitor_Call $call)
37 $this->addUnsetVars($call);
38 if ($call->type == CallMonitor_Call::INCOMING) {
39 $title = trim($this->getNumberString($call, 'from'));
40 $msg = 'End of incoming call';
42 $title = trim($this->getNumberString($call, 'to'));
43 $msg = 'End of outgoing call';
48 . ', length ' . date('H:i:s', $call->end - $call->start - 3600)
52 protected function notify($title, $msg)
57 . ' --expire-time=5000'
60 . ' ' . escapeshellarg($title)
61 . ' ' . escapeshellarg($msg)