mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Fix call block save call detail record condition (#7455)
This commit is contained in:
@@ -375,19 +375,20 @@
|
||||
}
|
||||
|
||||
//skip call detail records for calls blocked by call block
|
||||
if (isset($xml->variables->call_block) && !empty($this->settings->get('call_block', 'save_call_detail_record'))) {
|
||||
if ($xml->variables->call_block == 'true' && $this->settings->get('call_block', 'save_call_detail_record', false) !== true) {
|
||||
//delete the xml cdr file
|
||||
if (!empty($this->settings->get('switch', 'log'))) {
|
||||
$xml_cdr_dir = $this->settings->get('switch', 'log').'/xml_cdr';
|
||||
if (file_exists($xml_cdr_dir.'/'.$this->file)) {
|
||||
unlink($xml_cdr_dir.'/'.$this->file);
|
||||
}
|
||||
if (isset($xml->variables->call_block)
|
||||
&& $xml->variables->call_block == 'true'
|
||||
&& !$this->settings->get('call_block', 'save_call_detail_record', true)
|
||||
) {
|
||||
//delete the xml cdr file
|
||||
if (!empty($this->settings->get('switch', 'log'))) {
|
||||
$xml_cdr_dir = $this->settings->get('switch', 'log').'/xml_cdr';
|
||||
if (file_exists($xml_cdr_dir.'/'.$this->file)) {
|
||||
unlink($xml_cdr_dir.'/'.$this->file);
|
||||
}
|
||||
|
||||
//return without saving
|
||||
return false;
|
||||
}
|
||||
|
||||
//return without saving
|
||||
return false;
|
||||
}
|
||||
|
||||
//check for duplicate call uuid's
|
||||
|
||||
Reference in New Issue
Block a user