Added logging and notification of 3-way call hung up in agent screen, Issue #1024

git-svn-id: svn://192.168.202.10@2787 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2017-07-09 15:58:24 +00:00
parent 805da0ff7b
commit a6fc7886bf
5 changed files with 50 additions and 9 deletions
+2
View File
@@ -175,6 +175,8 @@ OTHER CHANGES:
39. Changed password fields to allow up to 100 character passwords. Also changed
password recommendations to emphasize length over complexity.
40. Added logging and notification of 3-way call hung up in agent screen.
+3 -1
View File
@@ -2148,6 +2148,8 @@ preset_name VARCHAR(40) default '',
campaign_id VARCHAR(20) default '',
customer_hungup ENUM('BEFORE_CALL','DURING_CALL','') default '',
customer_hungup_seconds SMALLINT(5) UNSIGNED default '0',
xfer_hungup VARCHAR(20) default '',
xfer_hungup_datetime DATETIME,
index (user),
index (call_date),
index (group_alias_id)
@@ -4008,4 +4010,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='1508',db_schema_update_date=NOW(),reload_timestamp=NOW();
UPDATE system_settings SET db_schema_version='1509',db_schema_update_date=NOW(),reload_timestamp=NOW();
+5
View File
@@ -286,3 +286,8 @@ ALTER TABLE system_settings MODIFY default_phone_login_password VARCHAR(100) def
ALTER TABLE system_settings MODIFY default_server_password VARCHAR(100) default 'test';
UPDATE system_settings SET db_schema_version='1508',db_schema_update_date=NOW() where db_schema_version < 1508;
ALTER TABLE user_call_log ADD xfer_hungup VARCHAR(20) default '';
ALTER TABLE user_call_log ADD xfer_hungup_datetime DATETIME;
UPDATE system_settings SET db_schema_version='1509',db_schema_update_date=NOW() where db_schema_version < 1509;
+28 -5
View File
@@ -77,13 +77,14 @@
# 161217-0822 - Addded agent debug logging of dead call trigger
# 170220-1307 - Added external_lead_id trigger for switch_lead API function
# 170526-2228 - Added additional variable filtering
# 170709-1017 - Added xfer dead call checking process
#
$version = '2.14-52';
$build = '170526-2228';
$version = '2.14-53';
$build = '170709-1017';
$php_script = 'conf_exten_check.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=44;
$mysql_log_count=46;
$one_mysql_log=0;
$DB=0;
$VD_login=0;
@@ -128,6 +129,8 @@ if (isset($_GET["customer_chat_id"])) {$customer_chat_id=$_GET["customer_chat_
elseif (isset($_POST["customer_chat_id"])) {$customer_chat_id=$_POST["customer_chat_id"];}
if (isset($_GET["live_call_seconds"])) {$live_call_seconds=$_GET["live_call_seconds"];}
elseif (isset($_POST["live_call_seconds"])) {$live_call_seconds=$_POST["live_call_seconds"];}
if (isset($_GET["xferchannel"])) {$xferchannel=$_GET["xferchannel"];}
elseif (isset($_POST["xferchannel"])) {$xferchannel=$_POST["xferchannel"];}
if ($bcrypt == 'OFF')
{$bcrypt=0;}
@@ -842,8 +845,28 @@ if ($ACTION == 'refresh')
$Alogin='API_LOGOUT';
$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 . '|LeadIDSwitch: ' . $external_lead_id . "\n";
//Check if xferchannel is active
$DEADxfer=0;
if(strlen($xferchannel) > 2)
{
$stmt="SELECT count(*) FROM live_channels where channel ='$xferchannel' 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,'03045',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysqli_fetch_row($rslt);
$live_channelCOUNT=$row[0];
if($live_channelCOUNT == 0)
{
$DEADxfer++;
$stmt="UPDATE user_call_log SET xfer_hungup='XFER_3WAYHangup', xfer_hungup_datetime=NOW() where lead_id='$Alead_id' and user='$user' and call_type LIKE \"%3WAY%\" order by user_call_log_id desc limit 1;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03046',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
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 .'|DEADxfer: '.$DEADxfer. "\n";
if (strlen($timer_action) > 3)
{
+12 -3
View File
@@ -557,10 +557,11 @@
# 170601-2017 - Added more agent events
# 170609-1711 - Added 'commit' function to force immediate submission of Customer Information changes to database
# 170629-1831 - Added some new agent_events entries
# 170709-1116 - Added Xfer Hung Up notification
#
$version = '2.14-527c';
$build = '170629-1831';
$version = '2.14-528c';
$build = '170709-1116';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=87;
$one_mysql_log=0;
@@ -5377,7 +5378,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
if (xmlhttprequestcheckconf)
{
checkconf_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&client=vdc&conf_exten=" + taskconfnum + "&auto_dial_level=" + auto_dial_level + "&campagentstdisp=" + campagentstdisp + "&customer_chat_id=" + document.vicidial_form.customer_chat_id.value + "&live_call_seconds=" + VD_live_call_secondS +"&clicks=" + button_click_log;
checkconf_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&client=vdc&conf_exten=" + taskconfnum + "&auto_dial_level=" + auto_dial_level + "&campagentstdisp=" + campagentstdisp + "&customer_chat_id=" + document.vicidial_form.customer_chat_id.value + "&live_call_seconds=" + VD_live_call_secondS + "&xferchannel=" + document.vicidial_form.xferchannel.value + "&clicks=" + button_click_log;
button_click_log='';
xmlhttprequestcheckconf.open('POST', 'conf_exten_check.php');
xmlhttprequestcheckconf.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
@@ -5526,6 +5527,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
var api_pause_code = APIPauseCode_array[1];
var APILeadSwitch_array = check_time_array[30].split("LeadIDSwitch: ");
var api_switch_lead = APILeadSwitch_array[1];
var DEADxfer_array = check_time_array[31].split("DEADxfer: ");
var DEADxfer = DEADxfer_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: ");
@@ -5540,6 +5543,12 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
var APIpark_array = check_time_array[22].split("APIpark: ");
api_parkcustomer = APIpark_array[1];
if(DEADxfer > 0)
{
button_click_log = button_click_log + "" + SQLdate + "-----XferHungUp---" + document.vicidial_form.xferchannel.value + "|";
xfercall_send_hangup('YES');
alert_box("XFER LINE HUNG UP");
}
if ( (api_switch_lead.length > 0) && (api_switch_lead > 0) )
{
if (api_switch_lead_triggered < 1)