Get caller ID from the same call flow -> caller profile
This is the same place we get caller ID from in the XML CDR Details page.
This commit is contained in:
parent
d52695b29f
commit
2cd382ec38
|
|
@ -298,11 +298,22 @@ if (!class_exists('xml_cdr')) {
|
|||
//process data if the call detail record is not a duplicate
|
||||
if ($duplicate_uuid == false && is_uuid($uuid)) {
|
||||
|
||||
//get the caller ID
|
||||
if (isset($xml->variables->caller_id_name)) {
|
||||
//get the caller ID from call flow caller profile
|
||||
$i = 0;
|
||||
foreach ($xml->callflow as $row) {
|
||||
if ($i == 0) {
|
||||
$caller_id_name = urldecode($row->caller_profile->caller_id_name);
|
||||
$caller_id_number = urldecode($row->caller_profile->caller_id_number);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
unset($i);
|
||||
|
||||
//get the caller ID from variables
|
||||
if (!isset($caller_id_number) && isset($xml->variables->caller_id_name)) {
|
||||
$caller_id_name = urldecode($xml->variables->caller_id_name);
|
||||
}
|
||||
if (isset($xml->variables->caller_id_number)) {
|
||||
if (!isset($caller_id_number) && isset($xml->variables->caller_id_number)) {
|
||||
$caller_id_number = urldecode($xml->variables->caller_id_number);
|
||||
}
|
||||
if (!isset($caller_id_number) && isset($xml->variables->sip_from_user)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue