protected $callTypes;
protected $msns;
+ public $debug = false;
/**
* Create a new call logger.
protected function hasValidType($call)
{
if ($call->type == CallMonitor_Call::INCOMING && $this->callTypes == 'o') {
+ $this->debug('No valid call type (requested: o)');
return false;
}
if ($call->type == CallMonitor_Call::OUTGOING && $this->callTypes == 'i') {
+ $this->debug('No valid call type (requested: i)');
return false;
}
}
if (count($this->msns) > 0 && !in_array($msn, $this->msns)) {
//msn shall not be logged
+ $this->debug('No valid MSN (requested: ' . $msn . ')');
return false;
}
return str_pad($number, 12, ' ', STR_PAD_RIGHT);
}
+ protected function debug($msg)
+ {
+ if (!$this->debug) {
+ return;
+ }
+ echo $msg . "\n";
+ }
}
?>