{
protected $file;
protected $fileHdl;
- protected $callTypes;
- protected $msns;
/**
* Create a new file call logger. It logs finished calls into a file.
}
$call = $arData['call'];
-
- //check if call type matches
- if ($call->type == CallMonitor_Call::INCOMING && $this->callTypes == 'o') {
- return;
- }
- if ($call->type == CallMonitor_Call::OUTGOING && $this->callTypes == 'i') {
+ if (!$this->hasValidType($call)) {
return;
}
-
- if ($call->type == CallMonitor_Call::INCOMING) {
- $msn = $call->to;
- } else {
- $msn = $call->from;
- }
- if (count($this->msns) > 0 && !in_array($msn, $this->msns)) {
- //msn shall not be logged
+ if (!$this->hasValidMsn($call)) {
return;
}