If record_length is not set then still set record path and name
This affected outbound calls in some cases.
This commit is contained in:
parent
6d114f0d11
commit
e3696871c9
|
|
@ -620,7 +620,7 @@ if (!class_exists('xml_cdr')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the recording details
|
//get the recording details
|
||||||
if (strlen($xml->variables->record_session) > 0) {
|
if (isset($xml->variables->record_path)) {
|
||||||
$record_path = urldecode($xml->variables->record_path);
|
$record_path = urldecode($xml->variables->record_path);
|
||||||
$record_name = urldecode($xml->variables->record_name);
|
$record_name = urldecode($xml->variables->record_name);
|
||||||
if (isset($xml->variables->record_seconds)) {
|
if (isset($xml->variables->record_seconds)) {
|
||||||
|
|
@ -635,7 +635,7 @@ if (!class_exists('xml_cdr')) {
|
||||||
$record_name = basename(urldecode($xml->variables->last_arg));
|
$record_name = basename(urldecode($xml->variables->last_arg));
|
||||||
$record_length = urldecode($xml->variables->record_seconds);
|
$record_length = urldecode($xml->variables->record_seconds);
|
||||||
}
|
}
|
||||||
elseif (strlen($xml->variables->record_name) > 0) {
|
elseif (isset($xml->variables->record_name)) {
|
||||||
if (isset($xml->variables->record_path)) {
|
if (isset($xml->variables->record_path)) {
|
||||||
$record_path = urldecode($xml->variables->record_path);
|
$record_path = urldecode($xml->variables->record_path);
|
||||||
}
|
}
|
||||||
|
|
@ -671,7 +671,6 @@ if (!class_exists('xml_cdr')) {
|
||||||
$record_name = basename($conference_recording);
|
$record_name = basename($conference_recording);
|
||||||
$record_length = urldecode($xml->variables->duration);
|
$record_length = urldecode($xml->variables->duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
elseif (strlen($xml->variables->current_application_data) > 0) {
|
elseif (strlen($xml->variables->current_application_data) > 0) {
|
||||||
$commands = explode(",", urldecode($xml->variables->current_application_data));
|
$commands = explode(",", urldecode($xml->variables->current_application_data));
|
||||||
foreach ($commands as $command) {
|
foreach ($commands as $command) {
|
||||||
|
|
@ -745,12 +744,16 @@ if (!class_exists('xml_cdr')) {
|
||||||
//echo "record_length: ".$record_length."\n";
|
//echo "record_length: ".$record_length."\n";
|
||||||
//exit;
|
//exit;
|
||||||
|
|
||||||
//add the call recording path name and length
|
//add the call record path, name and length to the database
|
||||||
if (isset($record_path) && isset($record_name) && file_exists($record_path.'/'.$record_name) && $record_length > 0) {
|
if (isset($record_path) && isset($record_name) && file_exists($record_path.'/'.$record_name)) {
|
||||||
//add to the xml cdr table
|
|
||||||
$this->array[$key]['record_path'] = $record_path;
|
$this->array[$key]['record_path'] = $record_path;
|
||||||
$this->array[$key]['record_name'] = $record_name;
|
$this->array[$key]['record_name'] = $record_name;
|
||||||
$this->array[$key]['record_length'] = $record_length;
|
if (isset($record_length)) {
|
||||||
|
$this->array[$key]['record_length'] = $record_length;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->array[$key]['record_length'] = urldecode($xml->variables->duration);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//add to the call recordings table
|
//add to the call recordings table
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue