Added Agent API function switch_lead to switch the active call lead_id while
the agent is on a live inbound phone call. git-svn-id: svn://192.168.202.10@2673 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -90,6 +90,9 @@ OTHER CHANGES:
|
||||
12. Added web lead loader duplicate check options to check for leads loaded only
|
||||
within the last 90-days. Also added to Non-Agent API add_lead function.
|
||||
|
||||
13. Added Agent API function switch_lead to switch the active call lead_id while
|
||||
the agent is on a live inbound phone call.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
AGENT API DOCUMENT Started: 2008-07-03 Updated: 2017-02-09
|
||||
AGENT API DOCUMENT Started: 2008-07-03 Updated: 2017-02-20
|
||||
|
||||
This document describes the functions of an API(Application Programming Interface)
|
||||
for the VICIDIAL Agent screen. This functionality will be rather limited at first
|
||||
@@ -33,6 +33,7 @@ webphone_url - display the webphone url for the current agent's session
|
||||
call_agent - send a call to connect the agent to their session
|
||||
pause_code - set a pause code if the agent is paused
|
||||
audio_playback - basic play/pause/resume/stop/restart audio in agent session
|
||||
switch_lead - for inbound calls, switches lead_id of live inbound call on agent screen
|
||||
|
||||
|
||||
New scripts:
|
||||
@@ -827,6 +828,37 @@ SUCCESS: audio_playback function sent - ss-noservice|PLAY|6666
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
switch_lead -
|
||||
|
||||
DESCRIPTION:
|
||||
For agents on a live inbound call, switches lead_id of live inbound call on agent screen including associated logs. You can define a lead_id or a vendor_lead_code to switch to. Works like the SELECT function of the LEAD SEARCH feature in the agent screen.
|
||||
|
||||
VALUES:
|
||||
lead_id -
|
||||
Any valid lead_id from the system(either lead_id or vendor_lead_code are required) if both are defined, lead_id will override vendor_lead_code
|
||||
vendor_lead_code -
|
||||
OPTIONAL, any valid Vendor lead code
|
||||
|
||||
EXAMPLE URLS:
|
||||
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=switch_lead&lead_id=12345
|
||||
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=switch_lead&vendor_lead_code=1234567890
|
||||
|
||||
RESPONSES:
|
||||
ERROR: switch_lead not valid - ||6666
|
||||
ERROR: no user found - 6666
|
||||
ERROR: agent_user is not logged in - 6666
|
||||
ERROR: agent_user does not have a live call - 6666
|
||||
ERROR: agent call is not inbound - 6666|V2012367890123456789
|
||||
ERROR: campaign not found - 6666|TESTCAMP
|
||||
ERROR: campaign does not allow inbound lead search - 6666|TESTCAMP
|
||||
ERROR: switch-to lead not found - 6666|12345|123456789
|
||||
SUCCESS: switch_lead function set - 6666|12345|1234567890|TESTCAMP|12346
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
pause_code -
|
||||
|
||||
@@ -855,7 +887,6 @@ SUCCESS: pause_code function sent - 6666
|
||||
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Other information:
|
||||
|
||||
|
||||
@@ -431,6 +431,7 @@ external_recording VARCHAR(20) default '',
|
||||
external_pause_code VARCHAR(6) default '',
|
||||
pause_code VARCHAR(6) default '',
|
||||
preview_lead_id INT(9) UNSIGNED default '0',
|
||||
external_lead_id INT(9) UNSIGNED default '0',
|
||||
index (random_id),
|
||||
index (last_call_time),
|
||||
index (last_update_time),
|
||||
@@ -3857,4 +3858,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version';
|
||||
|
||||
UPDATE system_settings set vdc_agent_api_active='1';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1488',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1489',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -53,3 +53,7 @@ UPDATE system_settings SET db_schema_version='1487',db_schema_update_date=NOW()
|
||||
ALTER TABLE vicidial_campaigns ADD dead_to_dispo ENUM('ENABLED','DISABLED') default 'DISABLED';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1488',db_schema_update_date=NOW() where db_schema_version < 1488;
|
||||
|
||||
ALTER TABLE vicidial_live_agents ADD external_lead_id INT(9) UNSIGNED default '0';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1489',db_schema_update_date=NOW() where db_schema_version < 1489;
|
||||
|
||||
@@ -88,10 +88,11 @@
|
||||
# 161102-1042 - Fixed QM partition problem
|
||||
# 161103-1729 - Added agent_debug to audio playing
|
||||
# 170209-1222 - Added URL and IP logging
|
||||
# 170220-1303 - Added switch_lead function
|
||||
#
|
||||
|
||||
$version = '2.14-54';
|
||||
$build = '170209-1222';
|
||||
$version = '2.14-55';
|
||||
$build = '170220-1303';
|
||||
|
||||
$startMS = microtime();
|
||||
|
||||
@@ -3783,6 +3784,161 @@ if ($function == 'transfer_conference')
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
### BEGIN - switch_lead - for inbound calls, switches lead_id of live inbound call on agent screen
|
||||
################################################################################
|
||||
if ($function == 'switch_lead')
|
||||
{
|
||||
if ( ( ( (strlen($lead_id)<1) or ($lead_id < 1) ) and (strlen($vendor_lead_code)<1) ) or ( (strlen($agent_user)<1) and (strlen($alt_user)<2) ) )
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("switch_lead not valid");
|
||||
echo "$result: $result_reason - $lead_id|$vendor_lead_code|$agent_user\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( (!preg_match("/ $function /",$VUapi_allowed_functions)) and (!preg_match("/ALL_FUNCTIONS/",$VUapi_allowed_functions)) )
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("auth USER DOES NOT HAVE PERMISSION TO USE THIS FUNCTION");
|
||||
echo "$result: $result_reason - $lead_id|$user|$function|$VUuser_group\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
$processed=0;
|
||||
$SUCCESS=0;
|
||||
if (strlen($alt_user)>1)
|
||||
{
|
||||
$stmt = "select count(*) from vicidial_users where custom_three='$alt_user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$stmt = "select user from vicidial_users where custom_three='$alt_user' order by user;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$agent_user = $row[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("no user found");
|
||||
echo "$result: $result_reason - $alt_user\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
}
|
||||
$stmt = "select count(*) from vicidial_live_agents where user='$agent_user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$stmt = "select lead_id,callerid,campaign_id from vicidial_live_agents where user='$agent_user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$current_lead_id = $row[0];
|
||||
$callerid = $row[1];
|
||||
$campaign_id = $row[2];
|
||||
|
||||
if ( ($current_lead_id > 0) and (strlen($callerid)>15) )
|
||||
{
|
||||
if (preg_match("/^Y/",$callerid))
|
||||
{
|
||||
$stmt = "SELECT agent_lead_search from vicidial_campaigns where campaign_id='$campaign_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$camp_ct = mysqli_num_rows($rslt);
|
||||
if ($camp_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$agent_lead_search = $row[0];
|
||||
|
||||
if ( ($agent_lead_search == 'LIVE_CALL_INBOUND') or ($agent_lead_search == 'LIVE_CALL_INBOUND_AND_MANUAL') )
|
||||
{
|
||||
### search for defined lead ###
|
||||
$searchSQL = "lead_id='$lead_id'";
|
||||
if (strlen($vendor_lead_code)>0) {$searchSQL = "vendor_lead_code='$vendor_lead_code' order by lead_id desc limit 1";}
|
||||
$stmt = "SELECT lead_id,vendor_lead_code from vicidial_list where $searchSQL;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$sl_ct = mysqli_num_rows($rslt);
|
||||
if ($sl_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$new_lead_id = $row[0];
|
||||
$new_vendor_lead_code = $row[1];
|
||||
|
||||
$stmt="UPDATE vicidial_live_agents set external_lead_id='$new_lead_id' where user='$agent_user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$result = _QXZ("SUCCESS");
|
||||
$result_reason = _QXZ("switch_lead function set");
|
||||
$data = "$new_lead_id|$new_vendor_lead_code|$campaign_id|$current_lead_id";
|
||||
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);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("switch-to lead not found");
|
||||
echo "$result: $result_reason - $agent_user|$lead_id|$vendor_lead_code\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("campaign does not allow inbound lead search");
|
||||
echo "$result: $result_reason - $agent_user|$campaign_id\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("campaign not found");
|
||||
echo "$result: $result_reason - $agent_user|$campaign_id\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("agent call is not inbound");
|
||||
echo "$result: $result_reason - $agent_user|$callerid";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("agent_user does not have a live call");
|
||||
echo "$result: $result_reason - $agent_user\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("agent_user is not logged in");
|
||||
echo "$result: $result_reason - $agent_user\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
}
|
||||
}
|
||||
################################################################################
|
||||
### END - switch_lead
|
||||
################################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
### BEGIN - pause_code - set a pause code for an agent that is already paused
|
||||
################################################################################
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# conf_exten_check.php version 2.14
|
||||
#
|
||||
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2017 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# This script is designed purely to send whether the meetme conference has live channels connected and which they are
|
||||
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
|
||||
@@ -75,10 +75,11 @@
|
||||
# 160326-0942 - Fixed issue #933, variables
|
||||
# 161029-2216 - Formatting and additional agent debug logging
|
||||
# 161217-0822 - Addded agent debug logging of dead call trigger
|
||||
# 170220-1307 - Added external_lead_id trigger for switch_lead API function
|
||||
#
|
||||
|
||||
$version = '2.14-50';
|
||||
$build = '161217-0822';
|
||||
$version = '2.14-51';
|
||||
$build = '170220-1307';
|
||||
$php_script = 'conf_exten_check.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=44;
|
||||
@@ -596,8 +597,8 @@ if ($ACTION == 'refresh')
|
||||
##### END DEAD logging section #####
|
||||
}
|
||||
|
||||
### grab the API hangup and API dispo fields in vicidial_live_agents
|
||||
$stmt="SELECT external_hangup,external_status,external_pause,external_dial,external_update_fields,external_update_fields_data,external_timer_action,external_timer_action_message,external_timer_action_seconds,external_dtmf,external_transferconf,external_park,external_timer_action_destination,external_recording,external_pause_code from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
|
||||
### grab the API hangup, API dispo and other Agent API fields in vicidial_live_agents
|
||||
$stmt="SELECT external_hangup,external_status,external_pause,external_dial,external_update_fields,external_update_fields_data,external_timer_action,external_timer_action_message,external_timer_action_seconds,external_dtmf,external_transferconf,external_park,external_timer_action_destination,external_recording,external_pause_code,external_lead_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03010',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -617,6 +618,7 @@ if ($ACTION == 'refresh')
|
||||
$timer_action_destination = $row[12];
|
||||
$external_recording = $row[13];
|
||||
$external_pause_code = $row[14];
|
||||
$external_lead_id = $row[15];
|
||||
|
||||
$MDQ_count=0;
|
||||
if ( ($api_manual_dial=='QUEUE') or ($api_manual_dial=='QUEUE_AND_AUTOCALL') )
|
||||
@@ -837,7 +839,7 @@ if ($ACTION == 'refresh')
|
||||
$external_pause='';
|
||||
}
|
||||
|
||||
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . '|APIdtmf: ' . $external_dtmf . '|APItransferconf: ' . $external_transferconf . '|APIpark: ' . $external_park . '|APITimerDestination: ' . $timer_action_destination . '|APIManualDialQueue: ' . $MDQ_count . '|APIRecording: ' . $external_recording . '|APIPaUseCodE: ' . $external_pause_code . '|WaitinGChats: ' . $WaitinGChats . '|WaitinGEmails: ' . $WaitinGEmails . '|LivEAgentCommentS: ' . $live_agents_comments . "\n";
|
||||
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . '|APIdtmf: ' . $external_dtmf . '|APItransferconf: ' . $external_transferconf . '|APIpark: ' . $external_park . '|APITimerDestination: ' . $timer_action_destination . '|APIManualDialQueue: ' . $MDQ_count . '|APIRecording: ' . $external_recording . '|APIPaUseCodE: ' . $external_pause_code . '|WaitinGChats: ' . $WaitinGChats . '|WaitinGEmails: ' . $WaitinGEmails . '|LivEAgentCommentS: ' . $live_agents_comments . '|LeadIDSwitch: ' . $external_lead_id . "\n";
|
||||
|
||||
if (strlen($timer_action) > 3)
|
||||
{
|
||||
|
||||
@@ -1733,6 +1733,7 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
echo "NeWSessioN|$exten|\n";
|
||||
echo "|$stmtG|\n";
|
||||
|
||||
$stage .= "|OLD $session_id|NEW $exten|";
|
||||
if ($SSagent_debug_logging > 0) {vicidial_ajax_log($NOW_TIME,$startMS,$link,$ACTION,$php_script,$user,$stage,$lead_id,$session_name,$stmt);}
|
||||
exit;
|
||||
}
|
||||
@@ -1741,6 +1742,7 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
$channel_liveX=0;
|
||||
echo _QXZ("Cannot find empty vicidial_conference on %1s, Redirect command not inserted",0,'',$server_ip)."\n|$stmt|";
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename)) {$DBout .= "Cannot find empty conference on $server_ip";}
|
||||
$stage .= "|ERROR $server_ip|";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1948,6 +1950,7 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
echo "NeWSessioN|$exten|\n";
|
||||
echo "|$stmtB|\n";
|
||||
|
||||
$stage .= "|OLD $session_id|NEW $exten|";
|
||||
if ($SSagent_debug_logging > 0) {vicidial_ajax_log($NOW_TIME,$startMS,$link,$ACTION,$php_script,$user,$stage,$lead_id,$session_name,$stmt);}
|
||||
exit;
|
||||
}
|
||||
@@ -1956,6 +1959,7 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
$channel_liveX=0;
|
||||
echo "Cannot find empty vicidial_conference on $server_ip, Redirect command not inserted\n|$stmt|";
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename)) {$DBout .= "Cannot find empty conference on $server_ip";}
|
||||
$stage .= "|ERROR $server_ip|";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9323,7 +9323,7 @@ if ($ACTION == 'LeaDSearcHSelecTUpdatE')
|
||||
$original_phone_number = $phone_number;
|
||||
|
||||
### update the agent lead_id to the new lead_id in vicidial_live_agents
|
||||
$stmt = "UPDATE vicidial_live_agents set lead_id='$lead_id' where user='$user' and server_ip='$server_ip';";
|
||||
$stmt = "UPDATE vicidial_live_agents set lead_id='$lead_id',external_lead_id=0 where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00448',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -10018,6 +10018,7 @@ if ($ACTION == 'LeaDSearcHSelecTUpdatE')
|
||||
exit;
|
||||
}
|
||||
}
|
||||
$stage .= "|$lead_id|$agent_log_id|";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -539,10 +539,11 @@
|
||||
# 170201-2215 - Fixes for pause-while-call-coming-in issues
|
||||
# 170207-1314 - Added user option api_only_user
|
||||
# 170217-1359 - Added dead_to_dispo campaign option
|
||||
# 170220-1306 - Added external_lead_id trigger for switch_lead API function
|
||||
#
|
||||
|
||||
$version = '2.14-509c';
|
||||
$build = '170217-1359';
|
||||
$version = '2.14-510c';
|
||||
$build = '170220-1306';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=87;
|
||||
$one_mysql_log=0;
|
||||
@@ -4488,6 +4489,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var pause_resume_click_epoch=0;
|
||||
var previous_agent_log_id='<?php echo $agent_log_id ?>';
|
||||
var alert_box_close_counter=0;
|
||||
var api_switch_lead_triggered=0;
|
||||
var DiaLControl_auto_HTML = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready','','','','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_paused.gif") ?>\" border=\"0\" alt=\"You are paused\" /></a>";
|
||||
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause','','','','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_active.gif") ?>\" border=\"0\" alt=\"You are active\" /></a>";
|
||||
var DiaLControl_auto_HTML_OFF = "<img src=\"./images/<?php echo _QXZ("vdc_LB_blank_OFF.gif") ?>\" border=\"0\" alt=\"pause button disabled\" />";
|
||||
@@ -5457,6 +5459,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
var api_recording = APIRecording_array[1];
|
||||
var APIPauseCode_array = check_time_array[26].split("APIPaUseCodE: ");
|
||||
var api_pause_code = APIPauseCode_array[1];
|
||||
var APILeadSwitch_array = check_time_array[30].split("LeadIDSwitch: ");
|
||||
var api_switch_lead = APILeadSwitch_array[1];
|
||||
var APIdtmf_array = check_time_array[20].split("APIdtmf: ");
|
||||
api_dtmf = APIdtmf_array[1];
|
||||
var APItransfercond_array = check_time_array[21].split("APItransferconf: ");
|
||||
@@ -5471,6 +5475,14 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
var APIpark_array = check_time_array[22].split("APIpark: ");
|
||||
api_parkcustomer = APIpark_array[1];
|
||||
|
||||
if ( (api_switch_lead.length > 0) && (api_switch_lead > 0) )
|
||||
{
|
||||
if (api_switch_lead_triggered < 1)
|
||||
{
|
||||
api_switch_lead_triggered++;
|
||||
LeaDSearcHSelecT(api_switch_lead);
|
||||
}
|
||||
}
|
||||
if (api_pause_code.length > 0)
|
||||
{
|
||||
if (VDRP_stage == 'PAUSED')
|
||||
@@ -7846,6 +7858,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
{
|
||||
window.open(TEMP_VDIC_web_form_address_three, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
|
||||
}
|
||||
api_switch_lead_triggered=0;
|
||||
|
||||
if (useIE > 0)
|
||||
{
|
||||
|
||||
@@ -124,7 +124,7 @@ $UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summa
|
||||
|
||||
$Vtables = 'NONE,log_noanswer,did_agent_log,contact_information';
|
||||
|
||||
$APIfunctions = 'ALL_FUNCTIONS add_group_alias add_lead add_list add_phone add_phone_alias add_user agent_ingroup_info agent_stats_export agent_status audio_playback blind_monitor call_agent callid_info change_ingroups check_phone_number did_log_export external_add_lead external_dial external_hangup external_pause external_status in_group_status logout moh_list park_call pause_code preview_dial_action ra_call_control recording recording_lookup send_dtmf server_refresh set_timer_action sounds_list st_get_agent_active_lead st_login_log transfer_conference update_fields update_lead update_list update_log_entry update_phone update_phone_alias update_user user_group_status vm_list webphone_url webserver logged_in_agents update_campaigns lead_field_info phone_number_log';
|
||||
$APIfunctions = 'ALL_FUNCTIONS add_group_alias add_lead add_list add_phone add_phone_alias add_user agent_ingroup_info agent_stats_export agent_status audio_playback blind_monitor call_agent callid_info change_ingroups check_phone_number did_log_export external_add_lead external_dial external_hangup external_pause external_status in_group_status logout moh_list park_call pause_code preview_dial_action ra_call_control recording recording_lookup send_dtmf server_refresh set_timer_action sounds_list st_get_agent_active_lead st_login_log transfer_conference update_fields update_lead update_list update_log_entry update_phone update_phone_alias update_user user_group_status vm_list webphone_url webserver logged_in_agents update_campaigns lead_field_info phone_number_log switch_lead';
|
||||
|
||||
######################################################################################################
|
||||
######################################################################################################
|
||||
@@ -3923,12 +3923,13 @@ else
|
||||
# 170207-1317 - Added phone_number_log API function, added api_only_user User option
|
||||
# 170211-1041 - Moved api_only_user option in User Modify screen
|
||||
# 170217-1350 - Added dead_to_dispo campaign setting
|
||||
# 170220-1209 - Added switch_lead Agent API function
|
||||
#
|
||||
|
||||
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
|
||||
|
||||
$admin_version = '2.14-589a';
|
||||
$build = '170217-1350';
|
||||
$admin_version = '2.14-590a';
|
||||
$build = '170220-1209';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -21110,11 +21111,8 @@ if ($ADD==31)
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Dead Call Max Status").": </td><td align=left><input type=text name=dead_max_dispo size=7 maxlength=6 value=\"$dead_max_dispo\">$NWB#campaigns-dead_max_dispo$NWE</td></tr>\n";
|
||||
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Dead Call to Dispo Only").": </td><td align=left><select size=1 name=dead_to_dispo><option value='ENABLED'>"._QXZ("ENABLED")."</option><option value='DISABLED'>"._QXZ("DISABLED")."</option><option SELECTED>$dead_to_dispo</option></select>$NWB#campaigns-dead_to_dispo$NWE</td></tr>\n";
|
||||
|
||||
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Dispo Call Max Seconds").": </td><td align=left><input type=text name=dispo_max size=5 maxlength=4 value=\"$dispo_max\">$NWB#campaigns-dispo_max$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Dispo Call Max Status").": </td><td align=left><input type=text name=dispo_max_dispo size=7 maxlength=6 value=\"$dispo_max_dispo\">$NWB#campaigns-dispo_max_dispo$NWE</td></tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user