Added cid_choice option to transfer_conference Agent API function
git-svn-id: svn://192.168.202.10@3132 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -98,10 +98,11 @@
|
||||
# 180903-1606 - Added count for waiting emails to calls_in_queue_count function
|
||||
# 180908-1433 - Added force_fronter_leave_3way function
|
||||
# 190222-1152 - Added force_fronter_audio_stop function
|
||||
# 190901-0952 - Added cid_choice option to transfer_conference function
|
||||
#
|
||||
|
||||
$version = '2.14-64';
|
||||
$build = '190222-1152';
|
||||
$version = '2.14-65';
|
||||
$build = '190901-0952';
|
||||
|
||||
$startMS = microtime();
|
||||
|
||||
@@ -244,7 +245,8 @@ if (isset($_GET["agent_debug"])) {$agent_debug=$_GET["agent_debug"];}
|
||||
elseif (isset($_POST["agent_debug"])) {$agent_debug=$_POST["agent_debug"];}
|
||||
if (isset($_GET["dial_ingroup"])) {$dial_ingroup=$_GET["dial_ingroup"];}
|
||||
elseif (isset($_POST["dial_ingroup"])) {$dial_ingroup=$_POST["dial_ingroup"];}
|
||||
|
||||
if (isset($_GET["cid_choice"])) {$cid_choice=$_GET["cid_choice"];}
|
||||
elseif (isset($_POST["cid_choice"])) {$cid_choice=$_POST["cid_choice"];}
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
@@ -368,6 +370,7 @@ if ($non_latin < 1)
|
||||
$agent_debug = preg_replace("/[^- \.\:\|\_0-9a-zA-Z]/","",$agent_debug);
|
||||
$status = preg_replace("/[^-\_0-9a-zA-Z]/","",$status);
|
||||
$dial_ingroup = preg_replace("/[^-\_0-9a-zA-Z]/","",$dial_ingroup);
|
||||
$cid_choice = preg_replace("/[^-\_0-9a-zA-Z]/","",$cid_choice);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3725,8 +3728,20 @@ if ($function == 'transfer_conference')
|
||||
exit;
|
||||
}
|
||||
}
|
||||
if (strlen($cid_choice)>1)
|
||||
{
|
||||
if (!preg_match("/CAMPAIGN|AGENT_PHONE|CUSTOMER|CUSTOM_CID/",$cid_choice))
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("cid_choice is not valid");
|
||||
$data = "$cid_choice";
|
||||
echo "$result: $result_reason - $agent_user|$data\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$external_transferconf = "$value---$ingroup_choices---$phone_number---$consultative------$group_alias---$caller_id_number---$epoch";
|
||||
$external_transferconf = "$value---$ingroup_choices---$phone_number---$consultative------$group_alias---$caller_id_number---$epoch---$cid_choice";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3766,9 +3781,20 @@ if ($function == 'transfer_conference')
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if (strlen($cid_choice)>1)
|
||||
{
|
||||
if (!preg_match("/CAMPAIGN|AGENT_PHONE|CUSTOMER|CUSTOM_CID/",$cid_choice))
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("cid_choice is not valid");
|
||||
$data = "$cid_choice";
|
||||
echo "$result: $result_reason - $agent_user|$data\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
$processed++;
|
||||
$external_transferconf = "$value------$phone_number---NO---$dial_override---$group_alias---$caller_id_number---$epoch";
|
||||
$external_transferconf = "$value------$phone_number---NO---$dial_override---$group_alias---$caller_id_number---$epoch---$cid_choice";
|
||||
$SUCCESS++;
|
||||
}
|
||||
|
||||
@@ -3801,6 +3827,7 @@ if ($function == 'transfer_conference')
|
||||
{
|
||||
$stmt="UPDATE vicidial_live_agents set external_transferconf='$external_transferconf' where user='$agent_user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$result = _QXZ("SUCCESS");
|
||||
$result_reason = _QXZ("transfer_conference function set");
|
||||
|
||||
Reference in New Issue
Block a user