diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index 3ae18b38..ce629a85 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -482,6 +482,9 @@ OTHER CHANGES: commercial(paid-for) solution. The code and documentation can be found in the "extras/KHOMP" directory of the codebase. +135. Added AMD Agent Route Options as a campaign option allowing you to set + the specific AMD responses for calls that should be routed to agents + diff --git a/agc_2-X/trunk/agi/VD_amd.agi b/agc_2-X/trunk/agi/VD_amd.agi index 17a3e907..7b257a80 100644 --- a/agc_2-X/trunk/agi/VD_amd.agi +++ b/agc_2-X/trunk/agi/VD_amd.agi @@ -60,6 +60,7 @@ # 191029-1243 - Added code for agent-selected message override # 200102-0823 - Added vmm_daily_limit campaign setting # 200205-1839 - Fix for list override message +# 200311-0041 - Added amd_agent_route_options feature # $script = 'VD_amd.agi'; @@ -311,9 +312,83 @@ if ( ($AMD_LOG == 2) || ($AMD_LOG == 3) ) } +########## FIND vicidial_auto_calls record ########## +$stmtA = "SELECT campaign_id,phone_code,phone_number,uniqueid,server_ip,status FROM vicidial_auto_calls where callerid='$callerid' order by auto_call_id desc limit 1;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArowsVAC=$sthA->rows; +if ($AGILOG) {$agi_string = "$sthArowsVAC|$stmtA|"; &agi_output;} +if ($sthArowsVAC > 0) + { + @aryA = $sthA->fetchrow_array; + $VD_campaign_id = $aryA[0]; + $VD_phone_code = $aryA[1]; + $VD_phone_number = $aryA[2]; + $VD_uniqueid = $aryA[3]; + $VD_server_ip = $aryA[4]; + $VD_status = $aryA[5]; + $sthA->finish(); + } +if ( (length($CLIcampaign_id) > 1) && (length($VD_campaign_id) < 1) ) + {$VD_campaign_id = $CLIcampaign_id;} +if ( (length($CLIphone_code) > 1) && (length($VD_phone_code) < 1) ) + {$VD_phone_code = $CLIphone_code;} +if ( (length($CLIphone_number) > 1) && (length($VD_phone_number) < 1) ) + {$VD_phone_number = $CLIphone_number;} + +$amd_agent_route_options=''; +$AMDcontainer_entry=''; +$AMD_agent_send=0; +$stmtA = "SELECT amd_agent_route_options FROM vicidial_campaigns where campaign_id='$VD_campaign_id' limit 1;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($AGILOG) {$agi_string = "$sthArows|$stmtA|"; &agi_output;} +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $amd_agent_route_options = $aryA[0]; + $sthA->finish(); + } + +if ($amd_agent_route_options =~ /ENABLED/i) + { + $stmtA = "SELECT container_entry FROM vicidial_settings_containers where container_id='AMD_AGENT_OPT_$VD_campaign_id' limit 1;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsVSC=$sthA->rows; + if ($AGILOG) {$agi_string = "$sthArowsVSC|$stmtA|"; &agi_output;} + if ($sthArowsVSC > 0) + { + @aryA = $sthA->fetchrow_array; + $AMDcontainer_entry = $aryA[0]; + $sthA->finish(); + } + if (length($AMDcontainer_entry) > 3) + { + @AMDcontainer_lines = split(/\n/,$AMDcontainer_entry); + $c=0; + foreach(@AMDcontainer_lines) + { + $AMDcontainer_lines[$c] =~ s/;.*|\r|\t| //gi; + if ( (length($AMDcontainer_lines[$c]) > 3) && ($AMDcontainer_lines[$c] =~ /,/) ) + { + @AMDline = split(/,/,$AMDcontainer_lines[$c]); + if ( ($AMDline[0] =~ /^$AMDSTATUS$/i) && ($AMDline[1] =~ /^$AMDRESPONSE$/i) ) + { + $AMD_agent_send++; + if ($AGILOG) {$agi_string = "AMD Agent send MATCH: $c|$AMDline[0]($AMDSTATUS)|$AMDline[1]($AMDRESPONSE)|"; &agi_output;} + } + } + $c++; + } + } + } + + ################################################################################## ########## AMD says it's a person so exit and go on to transfer scripts ########## -if ( ($AMDSTATUS =~ /PERSON|HUMAN|NOTSURE|HANGUP/) && ($force_playback !~ /YES/) ) +if ( ( ($AMDSTATUS =~ /PERSON|HUMAN|NOTSURE|HANGUP/) && ($force_playback !~ /YES/) && (length($AMDcontainer_entry) < 4) ) || ( ($AMD_agent_send > 0) && (length($AMDcontainer_entry) > 3) ) ) { if ($A) { @@ -331,25 +406,7 @@ else $AGI->stream_file('sip-silence'); $AGI->stream_file('sip-silence'); - - ########## FIND vicidial_auto_calls record ########## - $stmtA = "SELECT campaign_id,phone_code,phone_number,uniqueid,server_ip,status FROM vicidial_auto_calls where callerid='$callerid' order by auto_call_id desc limit 1;"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - if ($AGILOG) {$agi_string = "$sthArows|$stmtA|"; &agi_output;} - if ($sthArows > 0) - { - @aryA = $sthA->fetchrow_array; - $VD_campaign_id = $aryA[0]; - $VD_phone_code = $aryA[1]; - $VD_phone_number = $aryA[2]; - $VD_uniqueid = $aryA[3]; - $VD_server_ip = $aryA[4]; - $VD_status = $aryA[5]; - $sthA->finish(); - } - else + if ($sthArowsVAC < 1) { ########## FIND vicidial_log_extended record if no vicidial_auto_calls record found ########## $stmtA = "SELECT uniqueid,server_ip FROM vicidial_log_extended where caller_code='$callerid' order by call_date desc limit 1;"; @@ -365,12 +422,6 @@ else $sthA->finish(); } } - if ( (length($CLIcampaign_id) > 1) && (length($VD_campaign_id) < 1) ) - {$VD_campaign_id = $CLIcampaign_id;} - if ( (length($CLIphone_code) > 1) && (length($VD_phone_code) < 1) ) - {$VD_phone_code = $CLIphone_code;} - if ( (length($CLIphone_number) > 1) && (length($VD_phone_number) < 1) ) - {$VD_phone_number = $CLIphone_number;} $VD_uniqueidSQL = ''; if (length($VD_uniqueid) > 1) { diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql index 010a4c59..3197dafc 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -926,7 +926,7 @@ queuemetrics_phone_environment VARCHAR(20) default '', auto_pause_precall ENUM('Y','N') default 'N', auto_pause_precall_code VARCHAR(6) default 'PRECAL', auto_resume_precall ENUM('Y','N') default 'N', -manual_dial_cid ENUM('CAMPAIGN','AGENT_PHONE') default 'CAMPAIGN', +manual_dial_cid ENUM('CAMPAIGN','AGENT_PHONE','AGENT_PHONE_OVERRIDE') default 'CAMPAIGN', post_phone_time_diff_alert VARCHAR(30) default 'DISABLED', custom_3way_button_transfer VARCHAR(30) default 'DISABLED', available_only_tally_threshold ENUM('DISABLED','LOGGED-IN_AGENTS','NON-PAUSED_AGENTS','WAITING_AGENTS') default 'DISABLED', @@ -1038,7 +1038,8 @@ leave_vm_message_group_id VARCHAR(40) default '---NONE---', dial_timeout_lead_container VARCHAR(40) default 'DISABLED', amd_type ENUM('AMD','CPD','KHOMP') default 'AMD', vmm_daily_limit TINYINT(3) UNSIGNED default '0', -opensips_cid_name VARCHAR(15) default '' +opensips_cid_name VARCHAR(15) default '', +amd_agent_route_options ENUM('ENABLED','DISABLED','PENDING') default 'DISABLED' ) ENGINE=MyISAM; CREATE TABLE vicidial_lists ( @@ -4591,4 +4592,4 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_ UPDATE system_settings set vdc_agent_api_active='1'; -UPDATE system_settings SET db_schema_version='1587',db_schema_update_date=NOW(),reload_timestamp=NOW(); +UPDATE system_settings SET db_schema_version='1588',db_schema_update_date=NOW(),reload_timestamp=NOW(); diff --git a/agc_2-X/trunk/extras/upgrade_2.14.sql b/agc_2-X/trunk/extras/upgrade_2.14.sql index 6d20c23a..da5c56c1 100644 --- a/agc_2-X/trunk/extras/upgrade_2.14.sql +++ b/agc_2-X/trunk/extras/upgrade_2.14.sql @@ -1172,3 +1172,8 @@ UPDATE system_settings SET db_schema_version='1586',db_schema_update_date=NOW() ALTER TABLE system_settings ADD require_password_length TINYINT(3) UNSIGNED default '0'; UPDATE system_settings SET db_schema_version='1587',db_schema_update_date=NOW() where db_schema_version < 1587; + +ALTER TABLE vicidial_campaigns MODIFY manual_dial_cid ENUM('CAMPAIGN','AGENT_PHONE','AGENT_PHONE_OVERRIDE') default 'CAMPAIGN'; +ALTER TABLE vicidial_campaigns ADD amd_agent_route_options ENUM('ENABLED','DISABLED','PENDING') default 'DISABLED'; + +UPDATE system_settings SET db_schema_version='1588',db_schema_update_date=NOW() where db_schema_version < 1588; diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index deb8cd2f..dc821239 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -487,10 +487,11 @@ # 191108-0920 - Added Dial Timeout Lead override function # 200108-0947 - Added cid_group_id of NONE # 200122-1847 - Added code for CID Group auto-rotate feature +# 200310-1117 - Added manual_dial_cid AGENT_PHONE_OVERRIDE option # -$version = '2.14-380'; -$build = '200122-1847'; +$version = '2.14-381'; +$build = '200310-1117'; $php_script = 'vdc_db_query.php'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=824; @@ -4212,7 +4213,7 @@ if ($ACTION == 'manDiaLnextCaLL') ##### BEGIN if NOT preview dialing, do send the call ##### if ( (strlen($preview)<1) or ($preview == 'NO') or (strlen($dial_ingroup) > 1) ) { - $stmt = "SELECT use_custom_cid,manual_dial_hopper_check,start_call_url,manual_dial_filter,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,cid_group_id,scheduled_callbacks_auto_reschedule,dial_timeout_lead_container FROM vicidial_campaigns where campaign_id='$campaign';"; + $stmt = "SELECT use_custom_cid,manual_dial_hopper_check,start_call_url,manual_dial_filter,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,cid_group_id,scheduled_callbacks_auto_reschedule,dial_timeout_lead_container,manual_dial_cid FROM vicidial_campaigns where campaign_id='$campaign';"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00313',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -4230,6 +4231,7 @@ if ($ACTION == 'manDiaLnextCaLL') $cid_group_id = $row[7]; $scheduled_callbacks_auto_reschedule = $row[8]; $dial_timeout_lead_container = $row[9]; + $manual_dial_cid = $row[10]; } ### BEGIN check for Dial Timeout Lead Override ### @@ -4605,6 +4607,26 @@ if ($ACTION == 'manDiaLnextCaLL') } } + #### BEGIN check for manual_dial_cid == 'AGENT_PHONE_OVERRIDE' + if ($manual_dial_cid == 'AGENT_PHONE_OVERRIDE') + { + $PHONEoutbound_cid=''; + $stmt = "SELECT outbound_cid FROM phones where login='$phone_login' limit 1;"; + $rslt=mysql_to_mysqli($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($DB) {echo "$stmt\n";} + $pocid_ct = mysqli_num_rows($rslt); + if ($pocid_ct > 0) + { + $row=mysqli_fetch_row($rslt); + $PHONEoutbound_cid = $row[0]; + } + $PHONEoutbound_cid = preg_replace("/\D/",'',$PHONEoutbound_cid); + if (strlen($PHONEoutbound_cid) > 6) + {$CCID = "$PHONEoutbound_cid"; $CCID_on++;} + } + #### END check for manual_dial_cid == 'AGENT_PHONE_OVERRIDE' + if ($CCID_on) {$CIDstring = "\"$MqueryCID$EAC\" <$CCID>";} else {$CIDstring = "$MqueryCID$EAC";} @@ -5919,7 +5941,7 @@ if ($ACTION == 'manDiaLonly') { ### check for custom cid use $use_custom_cid=0; - $stmt = "SELECT use_custom_cid,manual_dial_hopper_check,cid_group_id FROM vicidial_campaigns where campaign_id='$campaign';"; + $stmt = "SELECT use_custom_cid,manual_dial_hopper_check,cid_group_id,manual_dial_cid FROM vicidial_campaigns where campaign_id='$campaign';"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00314',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -5930,6 +5952,7 @@ if ($ACTION == 'manDiaLonly') $use_custom_cid = $row[0]; $manual_dial_hopper_check = $row[1]; $cid_group_id = $row[2]; + $manual_dial_cid = $row[3]; if ($use_custom_cid == 'Y') { $temp_CID = preg_replace("/\D/",'',$security_phrase); @@ -6059,6 +6082,26 @@ if ($ACTION == 'manDiaLonly') } } + #### BEGIN check for manual_dial_cid == 'AGENT_PHONE_OVERRIDE' + if ($manual_dial_cid == 'AGENT_PHONE_OVERRIDE') + { + $PHONEoutbound_cid=''; + $stmt = "SELECT outbound_cid FROM phones where login='$phone_login' limit 1;"; + $rslt=mysql_to_mysqli($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($DB) {echo "$stmt\n";} + $pocid_ct = mysqli_num_rows($rslt); + if ($pocid_ct > 0) + { + $row=mysqli_fetch_row($rslt); + $PHONEoutbound_cid = $row[0]; + } + $PHONEoutbound_cid = preg_replace("/\D/",'',$PHONEoutbound_cid); + if (strlen($PHONEoutbound_cid) > 6) + {$CCID = "$PHONEoutbound_cid"; $CCID_on++;} + } + #### END check for manual_dial_cid == 'AGENT_PHONE_OVERRIDE' + #### BEGIN run manual_dial_hopper_check process if enabled if ($manual_dial_hopper_check == 'Y') { diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 5bc7d739..d5c9b23e 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -630,10 +630,11 @@ # 191114-0949 - Added options for enable_first_webform and recording_buttons # 191227-1227 - Fix for translation phrases gathering process # 200123-1554 - PHP7 fix for array +# 200310-1116 - Added manual_dial_cid AGENT_PHONE_OVERRIDE option # -$version = '2.14-599c'; -$build = '200123-1554'; +$version = '2.14-600c'; +$build = '200310-1116'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=91; $one_mysql_log=0; @@ -5487,7 +5488,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var manual_number = document.vicidial_form.xfernumber.value; var manual_string = manual_number.toString(); var threeway_cid='1'; - if (manual_dial_cid == 'AGENT_PHONE') + if ( (manual_dial_cid == 'AGENT_PHONE') || (manual_dial_cid == 'AGENT_PHONE_OVERRIDE') ) { cid_lock=1; threeway_cid = outbound_cid; @@ -9628,7 +9629,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) else { var call_cid = campaign_cid; - if (manual_dial_cid == 'AGENT_PHONE') + if ( (manual_dial_cid == 'AGENT_PHONE') || (manual_dial_cid == 'AGENT_PHONE_OVERRIDE') ) { cid_lock=1; call_cid = outbound_cid; @@ -9647,7 +9648,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) var temp_manual_dial_validation = manual_dial_validation; if (manual_entry_dial > 0) {temp_manual_dial_validation='N';} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + manual_dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&manual_dial_search_filter=" + manual_dial_search_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method + "&manual_dial_call_time_check=" + manual_dial_call_time_check + "&qm_extension=" + qm_extension + "&dial_ingroup=" + active_ingroup_dial + "&nocall_dial_flag=" + nocall_dial_flag + "&cid_lock=" + cid_lock + "&last_VDRP_stage=" + last_VDRP_stage + "&routing_initiated_recording=" + temp_rir + "&exten=" + recording_exten + "&recording_filename=" + LIVE_campaign_rec_filename + "&channel=" + channelrec + "&manual_dial_validation=" + manual_dial_validation; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + manual_dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&manual_dial_search_filter=" + manual_dial_search_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method + "&manual_dial_call_time_check=" + manual_dial_call_time_check + "&qm_extension=" + qm_extension + "&dial_ingroup=" + active_ingroup_dial + "&nocall_dial_flag=" + nocall_dial_flag + "&cid_lock=" + cid_lock + "&last_VDRP_stage=" + last_VDRP_stage + "&routing_initiated_recording=" + temp_rir + "&exten=" + recording_exten + "&recording_filename=" + LIVE_campaign_rec_filename + "&channel=" + channelrec + "&manual_dial_validation=" + manual_dial_validation + "&phone_login=" + phone_login; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -10559,7 +10560,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) else { var call_cid = campaign_cid; - if (manual_dial_cid == 'AGENT_PHONE') + if ( (manual_dial_cid == 'AGENT_PHONE') || (manual_dial_cid == 'AGENT_PHONE_OVERRIDE') ) { cid_lock=1; call_cid = outbound_cid; @@ -10575,7 +10576,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) if ( (script_recording_delay < 1) && (routing_initiated_recording == 'Y') && ( (LIVE_campaign_recording == 'ALLCALLS') || (LIVE_campaign_recording == 'ALLFORCE') ) ) {temp_rir='Y';} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + manual_dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + dialed_number + "&agent_dialed_type=" + dialed_label + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id + "&security=" + document.vicidial_form.security_phrase.value + "&qm_extension=" + qm_extension + "&old_CID=" + LastCallCID + "&cid_lock=" + cid_lock + "&routing_initiated_recording=" + temp_rir + "&exten=" + recording_exten + "&recording_filename=" + LIVE_campaign_rec_filename + "&channel=" + channelrec + "&vendor_lead_code=" + document.vicidial_form.search_vendor_lead_code.value + "&state=" + encodeURIComponent(document.vicidial_form.state.value); + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + manual_dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + dialed_number + "&agent_dialed_type=" + dialed_label + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id + "&security=" + document.vicidial_form.security_phrase.value + "&qm_extension=" + qm_extension + "&old_CID=" + LastCallCID + "&cid_lock=" + cid_lock + "&routing_initiated_recording=" + temp_rir + "&exten=" + recording_exten + "&recording_filename=" + LIVE_campaign_rec_filename + "&channel=" + channelrec + "&vendor_lead_code=" + document.vicidial_form.search_vendor_lead_code.value + "&phone_login=" + phone_login + "&state=" + encodeURIComponent(document.vicidial_form.state.value); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index e899f6f0..2c8fb0f6 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -2487,6 +2487,8 @@ if (isset($_GET["opensips_cid_name"])) {$opensips_cid_name=$_GET["opensips_cid elseif (isset($_POST["opensips_cid_name"])) {$opensips_cid_name=$_POST["opensips_cid_name"];} if (isset($_GET["require_password_length"])) {$require_password_length=$_GET["require_password_length"];} elseif (isset($_POST["require_password_length"])) {$require_password_length=$_POST["require_password_length"];} +if (isset($_GET["amd_agent_route_options"])) {$amd_agent_route_options=$_GET["amd_agent_route_options"];} + elseif (isset($_POST["amd_agent_route_options"])) {$amd_agent_route_options=$_POST["amd_agent_route_options"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} @@ -3168,6 +3170,7 @@ if ($non_latin < 1) $require_mgr_approval = preg_replace('/[^0-9a-zA-Z]/','',$require_mgr_approval); $mute_recordings = preg_replace('/[^0-9a-zA-Z]/','',$mute_recordings); $leave_vm_no_dispo = preg_replace('/[^0-9a-zA-Z]/','',$leave_vm_no_dispo); + $amd_agent_route_options = preg_replace('/[^0-9a-zA-Z]/','',$amd_agent_route_options); ### DIGITS and Dots $server_ip = preg_replace('/[^\.0-9]/','',$server_ip); @@ -4621,12 +4624,13 @@ else # 200204-2336 - Added opensips_cid_name settings # 200206-2154 - Added require_password_length system setting and display of password length in modify pages # 200210-1628 - Added link for KHOMP Admin Tool in admin utilities +# 200310-0946 - Added AGENT_PHONE_OVERRIDE campaign option, and amd_agent_route_options # # 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-738a'; -$build = '200210-1628'; +$admin_version = '2.14-739a'; +$build = '200310-1801'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6935,6 +6939,7 @@ if ($ADD==12) echo "
"._QXZ("COPY A CAMPAIGN")."
\n"; echo "\n"; + echo "\n"; echo "
\n"; if ($voi_count > 0) { @@ -9384,6 +9389,7 @@ if ($ADD==192111111111) + $NWB#settings_containers-container_type$NWE\n"; echo "\n"; + $amdaro_B=''; $amdaro_E=''; + if ( ($amd_agent_route_options == 'ENABLED') or ($amd_agent_route_options == 'PENDING') ) + { + $amdaro_B=""; + $amdaro_E=""; + } + echo "\n"; + echo "\n"; echo "\n"; @@ -24644,7 +24694,7 @@ if ($ADD==31) echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; @@ -36925,6 +36975,7 @@ if ($ADD==392111111111) + $NWB#settings_containers-container_type$NWE\n"; diff --git a/agc_2-X/trunk/www/vicidial/help_documentation.txt b/agc_2-X/trunk/www/vicidial/help_documentation.txt index 0d5aa3d3..a4fb7266 100644 --- a/agc_2-X/trunk/www/vicidial/help_documentation.txt +++ b/agc_2-X/trunk/www/vicidial/help_documentation.txt @@ -1,4 +1,4 @@ -# version: 20200206220601 +# version: 20200311000101 users-user User ID This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length. users-pass Password This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters. users-force_change_password Force Change Password If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage. Default is N. @@ -138,10 +138,8 @@ campaigns-auto_trim_hopper Auto Trim Hopper Setting this to Y will allow th campaigns-hopper_vlc_dup_check Hopper VLC Dup Check Setting this to Y will result in every lead being inserted into the hopper being checked by vendor_lead_code to make sure there are no duplicate leads inserted with the same vendor_lead_code. This is most useful when Auto-Alt-Dialing with MULTI_LEAD. Default is N. campaigns-manual_dial_hopper_check Manual Dial Hopper Check Setting this to Y will mean that any manually dialed campaign phone call through the agent screen will first check for a lead in the hopper with the same phone number, and if one exists it will be deleted before the manual dial call is placed. Default is N. campaigns-lead_filter_id Lead Filter This is a method of filtering your leads using a fragment of a SQL query. Use this feature with caution, it is easy to stop dialing accidentally with the slightest alteration to the SQL statement. Default is NONE. - campaigns-auto_active_list_new Auto Active List New This setting will automatically set an inactive list to active when it contains dialable NEW status leads and the campaign has less than this setting number of NEW status leads to be dialed. The order in which the next list is set to active is determined by the List Auto Active List Rank. This feature will only work if there has been calling on this campaign within the last hour. If no leads have been dialed within the last hour in this campaign, then this feature will not function. Default is DISABLED. This feature will only work if the Call Quota Lead Ranking feature is also enabled. campaigns-call_quota_lead_ranking Call Quota Lead Ranking This setting will allow you to choose a Settings Container which has the settings you want to use for Call Quota Lead Ranking. Default is DISABLED. - campaigns-call_count_limit Call Count Limit This enforces a limit on the number of call attempts for the leads dialed in this campaign. A lead may go over this limit slightly if Lead Recycling or Auto-Alt-Dialing is enabled. Default is 0 for no limit. campaigns-call_count_target Call Count Target This option is only used for reporting purposes and has no effect on leads dialed. Default is 3. campaigns-drop_lockout_time Drop Lockout Time This is a number of hours that DROP abandon calls will be prevented from being dialed, to disable set to 0. This setting is very useful in countries like the UK where there are regulations preventing the attempted calling of customers within 72 hours of an Abandon, or DROP. Default is 0. @@ -173,6 +171,7 @@ campaigns-waitforsilence_options WaitForSilence Options If Wait For Silence campaigns-am_message_wildcards AM Message Wildcards This option, if enabled, allows you to go to the AM Message Wildcard administration page where you can define wildcards that can match data in a default lead field and can play a different message based upon the data in a specific lead. Default is N for disabled. campaigns-amd_type AMD Type This setting allows you to define the type of Answering Machine Detection that should be used when routing answered outbound calls. The default is AMD, for the built-in AMD application. You should only change this setting if you have one of the listed third-party AMD solutions installed on your system and you have confirmed the proper Routing Extension to use with your system administrator. campaigns-amd_send_to_vmx AMD send to Action This option allows you to define whether a call is sent to the Answering Machine Message or CPD AMD Action when an answering machine is detected, or if it is hung up. If this is set to N, then the call will be hung up as soon as it is determined to be an answering machine. Default is N. +campaigns-amd_agent_route_options AMD Agent Route Options If enabled and you are using Asterisk AMD, this setting will allow you to define the AMD statuses and responses for calls going through AMD that will be sent to agents, overriding the default which sends all HUMAN and NOTSURE status calls to agents. To see the AMD statuses and responses for the calls that have been logged on your system, go to the AMD Log Report on the Admin Utilities page. The PENDING option for this setting will allow you to click on this option to go to the Modify Settings Container page to edit the settings without making them active yet. Default is DISABLED. The Settings Container for these options allow for multiple lines of settings, with each line containing one AMD status-response pair each separated by a comma. For example:
HUMAN,HUMAN
NOTSURE,TOOLONG
campaigns-cpd_amd_action CPD AMD Action If you are using the Sangoma ParaXip Call Progress Detection software then you will want to enable this setting either setting it to DISPO which will disposition the call as AA and hang it up if the call is being processed and has not been sent to an agent yet or MESSAGE which will send the call to the defined Answering Machine Message for this campaign. Default is DISABLED. Setting this to INGROUP will send an answering machine to an inbound group. Setting this to CALLMENU will send an answering machine to a Call Menu in the system. campaigns-cpd_unknown_action CPD Unknown Action If you are using the Sangoma ParaXip Call Progress Detection software and you want to send calls that have an Unknown result to a destination other than an agent, then you will want to enable this setting either setting it to DISPO which will disposition the call as AA and hang it up if the call is being processed and has not been sent to an agent yet or MESSAGE which will send the call to the defined Answering Machine Message for this campaign. Default is DISABLED. Setting this to INGROUP will send an answering machine to an inbound group. Setting this to CALLMENU will send an answering machine to a Call Menu in the system. campaigns-amd_inbound_group AMD Inbound Group If CPD AMD Action is set to INGROUP, then this is the Inbound Group that the call will be sent to if an answering machine is detected. @@ -337,7 +336,7 @@ campaigns-manual_dial_lead_id Manual Dial by Lead ID This allows the agent campaigns-api_manual_dial Manual Dial API This option allows you to set the Agent API to make either one call at a time, STANDARD, or the ability to queue up manual dial calls and have them dial automatically once the agent goes on pause or is available to take their next call with the option to disable the automatic dialing of these calls, QUEUE, or QUEUE_AND_AUTOCALL which is the same as QUEUE but without the option to disable the automatic dialing of these calls. If an agent has more than one call queued up for them they will see the count of how many manual dial calls are in queue right below the Pause button, or Dial Next Number button. We suggest that if QUEUE is used that you send API actions using the preview=YES option so you are not repeatedly dialing calls for the agent without notice. Also, if using QUEUE and heavily using manual dial calls in a non MANUAL dial method, we would recommend setting the Agent Pause After Each Call option to Y. Default is STANDARD. campaigns-manual_dial_call_time_check Manual Call Time Check If this option is enabled, it will check all manual dial calls to make sure they are within the call time settings set for the campaign. Default is DISABLED. campaigns-manual_dial_validation Manual Dial Validation If this option is enabled, every manual dial phone call from the agent screen that is triggered by only a click will require the agent to manually type in the phone number into a pop-up form on the agent screen to confirm the number to be dialed. This option can be forced as enabled through a system-wide setting. This feature will not affect 3way calls or transfers. Default is N for disabled. -campaigns-manual_dial_cid Manual Dial CID This defines whether an agent making manual dial calls will have the campaign callerID settings used, or their agent phone callerID settings used. Default is CAMPAIGN. If the Use Custom CID campaign option is enabled or the list Campaign CID Override setting is used, this setting will be ignored. +campaigns-manual_dial_cid Manual Dial CID This defines whether an agent making manual dial calls will have the campaign callerID settings used, or their agent phone callerID settings used. Default is CAMPAIGN. If the Use Custom CID campaign option is enabled or the list Campaign CID Override setting is used, this setting will be ignored. If the AGENT_PHONE_OVERRIDE option is used, it will override all other CID settings for manual dial calls placed from this campaign. campaigns-manual_dial_timeout Manual Dial Timeout This is an override field that, if populated, will override the campaign dial timeout setting for manual dialed calls. Default is blank for disabled. campaigns-post_phone_time_diff_alert Phone Post Time Difference Alert This manual-dial-only feature, if enabled, will display an alert if the time zone for the lead postal code, or zip code, is different from the time zone of the area code of the phone number for the lead. The OUTSIDE_CALLTIME_ONLY option will only show the alert if the two time zones are different and one of the time zones is outside of the call time selected for the campaign. OUTSIDE_CALLTIME_PHONE will only check the time zone of the phone number of the lead and alert if it is outside of the local call time. OUTSIDE_CALLTIME_POSTAL will only check the time zone of the postal code of the lead and alert if it is outside of the local call time. OUTSIDE_CALLTIME_BOTH will check the postal code and phone number for being within the local call time, even if they are in the same time zone. These alerts will show in the call log info, callbacks list info, search results info, when a lead is dialed and when a lead is previewed. Default is DISABLED. campaigns-in_group_dial In-Group Manual Dial This feature allows you to enable the ability for agents to place manual dial outbound calls that are logged as in-group calls assigned to a specific in-group. The MANUAL_DIAL option allows the placing of phone calls out through an In-Group to the agent placing the call. The NO_DIAL option allows the agent to log time on a call that does not exist, as if it were a real call, this is often used for logging email or faxing time. The BOTH option will allow both call and no-call in-group dialing. The default is DISABLED.
"._QXZ("Admin User Group").":
"._QXZ("AMD send to Action").": $NWB#campaigns-amd_send_to_vmx$NWE
$amdaro_B"._QXZ("AMD Agent Route Options")."$amdaro_E: $NWB#campaigns-amd_agent_route_options$NWE
"._QXZ("CPD AMD Action").": $NWB#campaigns-cpd_amd_action$NWE
"._QXZ("CPD Unknown Action").": $NWB#campaigns-cpd_unknown_action$NWE
"._QXZ("Manual Dial API").": $NWB#campaigns-api_manual_dial$NWE
"._QXZ("Manual Dial CID").": $NWB#campaigns-manual_dial_cid$NWE
"._QXZ("Manual Dial CID").": $NWB#campaigns-manual_dial_cid$NWE
"._QXZ("Manual Dial Timeout").": "._QXZ("in seconds")." $NWB#campaigns-manual_dial_timeout$NWE