From 6ce8ceeb2fa2b8f37c133cb88452fdee327ba80e Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 12 Apr 2018 03:19:07 +0000 Subject: [PATCH] Added Dispo URL Filter feature git-svn-id: svn://192.168.202.10@2964 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/UPGRADE | 3 + agc_2-X/trunk/docs/CALL_URL_FEATURES.txt | 85 ++++++++++-- agc_2-X/trunk/www/agc/vdc_db_query.php | 163 +++++++++++++++++++++-- agc_2-X/trunk/www/vicidial/admin.php | 9 +- 4 files changed, 235 insertions(+), 25 deletions(-) diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index 5125fec8..c8481e44 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -298,6 +298,9 @@ OTHER CHANGES: their agent screen. Manager approves by entering their login credentials into a window on the agent's screen. +80. Added DISPO_FILTER Settings Container option allowing for match-and-replace + function in Dispo Call URLs. See CALL_URL_FEATURES.txt doc for details. + diff --git a/agc_2-X/trunk/docs/CALL_URL_FEATURES.txt b/agc_2-X/trunk/docs/CALL_URL_FEATURES.txt index aea6ec27..5158a9e5 100644 --- a/agc_2-X/trunk/docs/CALL_URL_FEATURES.txt +++ b/agc_2-X/trunk/docs/CALL_URL_FEATURES.txt @@ -5,6 +5,9 @@ Call URL features(start call url, dispo call url, etc...) Details on the Call URL and webform-type fields and dynamic URL construction: +################################################################################ +# WEB FORM +################################################################################ Web Form - This is where you can set the custom web page that will be opened when the user clicks on the WEB FORM button. To customize the @@ -27,6 +30,10 @@ http://10.0.1.2:8080/agc/test.php. This allows you to still use absolute links in both webforms and script IFRAMES to avoid issues with using relative links. +################################################################################ +# START CALL URL +################################################################################ + Start Call URL - This web URL address is not seen by the agent, but it is called every time a call is sent to an agent if it is populated. Uses the same variables as the web form fields and scripts. This URL @@ -34,17 +41,50 @@ can NOT be a relative path. The Start URL does not work for Manual dial calls. Default is blank. +################################################################################ +# DISPO CALL URL +################################################################################ + Dispo Call URL - This web URL address is not seen by the agent, but it is called every time a call is dispositioned by an agent if it is populated. Uses the same variables as the web form fields and scripts. -dispo, talk_time, call_notes, callback_lead_status and callback_datetime are the -extra variables you can use with this specific function. 'dispo' is the actual -agent-defined status disposition for the call, callback_lead_status is the -agent-selected status when a scheduled callback status has been selected by the -agent, and callback_datetime is the agent selected date and time for a callback. -The actual talk time in seconds of the call is talk_time. This URL can NOT be a -relative path. It is always called from the webserver. Default is blank. +You can set the Dispo Call URL on a per-campaign and per-in-group basis. You can +also set more than one Dispo Call URL by entering "ALT" into the Dispo Call URL +field for a campaign or in-groupand submitting the page, then a link to a new +page will be shown where you can go to configure many Dispo Call URLs. In this +Alternate dispo URL page, you will have additional options, like being able to +specify that the URL be called only for specific statuses or specific lists. + +These are the extra variables you can use with this specific function: +- 'dispo' is the actual agent-defined status disposition for the call +- 'talk_time' is the actual talk time in seconds of the call +- 'call_notes' is the agent-entered call notes for the call, if enabled +- 'callback_lead_status' is the agent-selected status when a scheduled callback + status has been selected by the agent +- 'callback_datetime' is the agent selected date and time for a callback + +With Dispo Call URLs you can also use a DISPO_FILTER Settings Container to +define replacements for specific field values before they are sent out. For +example, you can replace a blank 'state' field with 'NA' when sending out the +Dispo Call URL that contains --A--state--B-- in it, just by including the +following line in a DISPO_FILTER settings container: "state,,NA". The second +field is case-sensitive, so of you want to allow for a matching 'state' in both +upper case and lower case you would need to include four lines in your settings +container: "state,MC,MI", "state,mc,MI", "state,mC,MI", "state,Mc,MI" +The above example would change a 'state' of "MC" to "MI" in the Dispo Call URL. +To enable this feature for a Dispo Call URL, just include +'dispo_filter_container=' in your URL with the Settings Container ID at the end: +"&dispo_filter_container=TEST_NA" + +The Dispo Call URL can NOT be a relative path, it must be an absolute URL +The Dispo Call URL is always called from the webserver. +Default is blank. + + +################################################################################ +# ADD LEAD URL +################################################################################ Add Lead URL - This web URL address is not seen by the agent, but it is called every time a lead is added to the system through the inbound process. Default @@ -56,6 +96,10 @@ did_extension, did_pattern, did_description, uniqueid, call_id. This feature is only available for In-Groups. +################################################################################ +# NO AGENT CALL URL +################################################################################ + No Agent Call URL - This is similar to Dispo Call URL, but it is for calls that are not sent to agents such as DROPs, No Answers, Busys and timeouts. This option is available for Campaigns and In-Groups. This feature will only work for @@ -64,6 +108,10 @@ specific in-group that a call was sent to needs to have the No Agent Call URL field filled in or this function will not run for that call. +################################################################################ +# CRM POPUP LOGIN/ADDRESS +################################################################################ + CRM Popup Login - If set to Y, the CRM Popup Address is used to open a new window on agent login to this campaign. Default is N. @@ -75,6 +123,10 @@ populated just like the web form address, with the VAR in the front and using +################################################################################ +# AVAILABLE FIELDS +################################################################################ + You can have lead information be auto-populated in the URL options(webform, webform2, start_call_url, dispo_call_url, crm_popup_url) using "--A--field--B--" where field is one of the following fieldnames: @@ -89,12 +141,21 @@ group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id, dialed_number, dialed_label, rank, owner, camp_script, in_script, script_width, script_height, recording_filename, recording_id, user_custom_one, user_custom_two, -user_custom_three, user_custom_four, user_custom_five, -preset_number_a, preset_number_b, preset_number_c, preset_number_d, -preset_number_e, preset_number_f, preset_dtmf_a, preset_dtmf_b, -did_id, did_extension, did_pattern, did_description, closecallid, -xfercallid, agent_log_id, entry_list_id, call_id, user_group, list_name. +user_custom_three, user_custom_four, user_custom_five, list_description, +preset_number_a, preset_number_b, preset_number_c, preset_number_d, agent_email, +preset_number_e, preset_number_f, preset_dtmf_a, preset_dtmf_b, entry_date, +did_id, did_extension, did_pattern, did_description, closecallid, called_count, +xfercallid, agent_log_id, entry_list_id, call_id, user_group, list_name, +did_custom_one, did_custom_two, did_custom_three, did_custom_four, +did_custom_five +For most of the functions above, you can also reference custom list fields using +the standard --A-- and --B-- around the custom field ID + + +################################################################################ +# EXAMPLES +################################################################################ For examples(and sample result URL): 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 b7534232..dcadb8eb 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -452,13 +452,14 @@ # 180216-1350 - Fix for callback alt dial isssue #1066 # 180228-0726 - Fix for LogiNCamPaigns function, removed unnecesary onfocus trigger, issue #1074 # 180410-1630 - Added Pause Code manager approval feature, Added switch_lead logging +# 180411-1833 - Added Dispo URL Filter feature # -$version = '2.14-346'; -$build = '180410-1630'; +$version = '2.14-347'; +$build = '180411-1833'; $php_script = 'vdc_db_query.php'; $mel=1; # Mysql Error Log enabled = 1 -$mysql_log_count=712; +$mysql_log_count=719; $one_mysql_log=0; $DB=0; $VD_login=0; @@ -4272,7 +4273,7 @@ if ($ACTION == 'manDiaLnextCaLL') { $stmt = "SELECT cid_group_type FROM vicidial_cid_groups where cid_group_id='$cid_group_id';"; $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 ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00714',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} $cidg_ct = mysqli_num_rows($rslt); if ($cidg_ct > 0) @@ -4296,7 +4297,7 @@ if ($ACTION == 'manDiaLnextCaLL') $stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id' and areacode IN('$temp_state') and active='Y' order by call_count_today desc limit 100000;"; } $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 ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00715',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} $vcca_ct = mysqli_num_rows($rslt); $act=0; @@ -4312,7 +4313,7 @@ if ($ACTION == 'manDiaLnextCaLL') $stmt="UPDATE vicidial_campaign_cid_areacodes set call_count_today=(call_count_today + 1) where campaign_id='$cid_group_id' and areacode='$temp_ac' and outbound_cid='$temp_vcca';"; if ($format=='debug') {echo "\n";} $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 ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00716',$user,$server_ip,$session_name,$one_mysql_log);} } } $temp_CID = preg_replace("/\D/",'',$temp_vcca); @@ -5617,7 +5618,7 @@ if ($ACTION == 'manDiaLonly') { $stmt = "SELECT cid_group_type FROM vicidial_cid_groups where cid_group_id='$cid_group_id';"; $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 ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00717',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} $cidg_ct = mysqli_num_rows($rslt); if ($cidg_ct > 0) @@ -5641,7 +5642,7 @@ if ($ACTION == 'manDiaLonly') $stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id' and areacode IN('$temp_state') and active='Y' order by call_count_today desc limit 100000;"; } $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 ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00718',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} $vcca_ct = mysqli_num_rows($rslt); $act=0; @@ -5657,7 +5658,7 @@ if ($ACTION == 'manDiaLonly') $stmt="UPDATE vicidial_campaign_cid_areacodes set call_count_today=(call_count_today + 1) where campaign_id='$cid_group_id' and areacode='$temp_ac' and outbound_cid='$temp_vcca';"; if ($format=='debug') {echo "\n";} $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 ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00719',$user,$server_ip,$session_name,$one_mysql_log);} } } $temp_CID = preg_replace("/\D/",'',$temp_vcca); @@ -12839,6 +12840,134 @@ if ($ACTION == 'updateDISPO') } } + ##### Check for a dispo filter in the URL + $dispo_filter_enabled=0; + if (preg_match('/dispo_filter_container=/i',$dispo_call_urlARY[$j])) + { + $df_fields='|'; + $temp_filter = explode('dispo_filter_container=',$dispo_call_urlARY[$j]); + $temp_filter[1] = preg_replace("/&.*/",'',$temp_filter[1]); + $filter_container = $temp_filter[1]; + + ### Gather container entry (example: "first_name,,TEST") + $stmt = "SELECT container_entry from vicidial_settings_containers where container_id='$filter_container' limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_to_mysqli($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00713',$user,$server_ip,$session_name,$one_mysql_log);} + $VSC_ct = mysqli_num_rows($rslt); + if ($VSC_ct > 0) + { + $row=mysqli_fetch_row($rslt); + $container_entry = $row[0]; + if (strlen($container_entry) > 4) + { + $dispo_filter_enabled++; + $container_entry = preg_replace("/\r|\t/",'',$container_entry); + $dispo_filters = explode("\n",$container_entry); + $dispo_filters_ct = count($dispo_filters); + if ($DB) {echo "DF-Debug 1: $dispo_filters_ct|$dispo_filter_enabled|$container_entry|\n";} + $dct=0; + while ($dispo_filters_ct > $dct) + { + $temp_df = explode(',',$dispo_filters[$dct]); + $df_fields .= "$temp_df[0]|"; + $lm=0; + + if ( (preg_match("/^lead_id$/i",$temp_df[0])) and ($lead_id == $temp_df[1]) ) {$lead_id = $temp_df[2]; $lm++;} + if ( (preg_match("/^vendor_id$/i",$temp_df[0])) and ($vendor_id == $temp_df[1]) ) {$vendor_id = $temp_df[2]; $lm++;} + if ( (preg_match("/^vendor_lead_code$/i",$temp_df[0])) and ($vendor_lead_code == $temp_df[1]) ) {$vendor_lead_code = $temp_df[2]; $lm++;} + if ( (preg_match("/^list_id$/i",$temp_df[0])) and ($list_id == $temp_df[1]) ) {$list_id = $temp_df[2]; $lm++;} + if ( (preg_match("/^list_name$/i",$temp_df[0])) and ($list_name == $temp_df[1]) ) {$list_name = $temp_df[2]; $lm++;} + if ( (preg_match("/^list_description$/i",$temp_df[0])) and ($list_description == $temp_df[1]) ) {$list_description = $temp_df[2]; $lm++;} + if ( (preg_match("/^gmt_offset_now$/i",$temp_df[0])) and ($gmt_offset_now == $temp_df[1]) ) {$gmt_offset_now = $temp_df[2]; $lm++;} + if ( (preg_match("/^phone_code$/i",$temp_df[0])) and ($phone_code == $temp_df[1]) ) {$phone_code = $temp_df[2]; $lm++;} + if ( (preg_match("/^phone_number$/i",$temp_df[0])) and ($phone_number == $temp_df[1]) ) {$phone_number = $temp_df[2]; $lm++;} + if ( (preg_match("/^title$/i",$temp_df[0])) and ($title == $temp_df[1]) ) {$title = $temp_df[2]; $lm++;} + if ( (preg_match("/^first_name$/i",$temp_df[0])) and ($first_name == $temp_df[1]) ) {$first_name = $temp_df[2]; $lm++;} + if ( (preg_match("/^middle_initial$/i",$temp_df[0])) and ($middle_initial == $temp_df[1]) ) {$middle_initial = $temp_df[2]; $lm++;} + if ( (preg_match("/^last_name$/i",$temp_df[0])) and ($last_name == $temp_df[1]) ) {$last_name = $temp_df[2]; $lm++;} + if ( (preg_match("/^address1$/i",$temp_df[0])) and ($address1 == $temp_df[1]) ) {$address1 = $temp_df[2]; $lm++;} + if ( (preg_match("/^address2$/i",$temp_df[0])) and ($address2 == $temp_df[1]) ) {$address2 = $temp_df[2]; $lm++;} + if ( (preg_match("/^address3$/i",$temp_df[0])) and ($address3 == $temp_df[1]) ) {$address3 = $temp_df[2]; $lm++;} + if ( (preg_match("/^city$/i",$temp_df[0])) and ($city == $temp_df[1]) ) {$city = $temp_df[2]; $lm++;} + if ( (preg_match("/^state$/i",$temp_df[0])) and ($state == $temp_df[1]) ) {$state = $temp_df[2]; $lm++;} + if ( (preg_match("/^province$/i",$temp_df[0])) and ($province == $temp_df[1]) ) {$province = $temp_df[2]; $lm++;} + if ( (preg_match("/^postal_code$/i",$temp_df[0])) and ($postal_code == $temp_df[1]) ) {$postal_code = $temp_df[2]; $lm++;} + if ( (preg_match("/^country_code$/i",$temp_df[0])) and ($country_code == $temp_df[1]) ) {$country_code = $temp_df[2]; $lm++;} + if ( (preg_match("/^gender$/i",$temp_df[0])) and ($gender == $temp_df[1]) ) {$gender = $temp_df[2]; $lm++;} + if ( (preg_match("/^date_of_birth$/i",$temp_df[0])) and ($date_of_birth == $temp_df[1]) ) {$date_of_birth = $temp_df[2]; $lm++;} + if ( (preg_match("/^alt_phone$/i",$temp_df[0])) and ($alt_phone == $temp_df[1]) ) {$alt_phone = $temp_df[2]; $lm++;} + if ( (preg_match("/^email$/i",$temp_df[0])) and ($email == $temp_df[1]) ) {$email = $temp_df[2]; $lm++;} + if ( (preg_match("/^security_phrase$/i",$temp_df[0])) and ($security_phrase == $temp_df[1]) ) {$security_phrase = $temp_df[2]; $lm++;} + if ( (preg_match("/^comments$/i",$temp_df[0])) and ($comments == $temp_df[1]) ) {$comments = $temp_df[2]; $lm++;} + if ( (preg_match("/^user$|^closer$/i",$temp_df[0])) and ($user == $temp_df[1]) ) {$user = $temp_df[2]; $lm++;} + if ( (preg_match("/^pass$/i",$temp_df[0])) and ($orig_pass == $temp_df[1]) ) {$orig_pass = $temp_df[2]; $lm++;} + if ( (preg_match("/^campaign$/i",$temp_df[0])) and ($campaign == $temp_df[1]) ) {$campaign = $temp_df[2]; $lm++;} + if ( (preg_match("/^phone_login$/i",$temp_df[0])) and ($phone_login == $temp_df[1]) ) {$phone_login = $temp_df[2]; $lm++;} + if ( (preg_match("/^original_phone_login$/i",$temp_df[0])) and ($original_phone_login == $temp_df[1]) ) {$original_phone_login = $temp_df[2]; $lm++;} + if ( (preg_match("/^phone_pass$/i",$temp_df[0])) and ($phone_pass == $temp_df[1]) ) {$phone_pass = $temp_df[2]; $lm++;} + if ( (preg_match("/^fronter$/i",$temp_df[0])) and ($fronter == $temp_df[1]) ) {$fronter = $temp_df[2]; $lm++;} + if ( (preg_match("/^group$|^channel_group$/i",$temp_df[0])) and ($VDADchannel_group == $temp_df[1]) ) {$VDADchannel_group = $temp_df[2]; $lm++;} + if ( (preg_match("/^SQLdate$/i",$temp_df[0])) and ($SQLdate == $temp_df[1]) ) {$SQLdate = $temp_df[2]; $lm++;} + if ( (preg_match("/^epoch$/i",$temp_df[0])) and ($epoch == $temp_df[1]) ) {$epoch = $temp_df[2]; $lm++;} + if ( (preg_match("/^uniqueid$/i",$temp_df[0])) and ($uniqueid == $temp_df[1]) ) {$uniqueid = $temp_df[2]; $lm++;} + if ( (preg_match("/^customer_zap_channel$/i",$temp_df[0])) and ($customer_zap_channel == $temp_df[1]) ) {$customer_zap_channel = $temp_df[2]; $lm++;} + if ( (preg_match("/^customer_server_ip$/i",$temp_df[0])) and ($customer_server_ip == $temp_df[1]) ) {$customer_server_ip = $temp_df[2]; $lm++;} + if ( (preg_match("/^server_ip$/i",$temp_df[0])) and ($server_ip == $temp_df[1]) ) {$server_ip = $temp_df[2]; $lm++;} + if ( (preg_match("/^SIPexten$/i",$temp_df[0])) and ($exten == $temp_df[1]) ) {$exten = $temp_df[2]; $lm++;} + if ( (preg_match("/^session_id$/i",$temp_df[0])) and ($conf_exten == $temp_df[1]) ) {$conf_exten = $temp_df[2]; $lm++;} + if ( (preg_match("/^phone$/i",$temp_df[0])) and ($phone_number == $temp_df[1]) ) {$phone_number = $temp_df[2]; $lm++;} + if ( (preg_match("/^parked_by$/i",$temp_df[0])) and ($parked_by == $temp_df[1]) ) {$parked_by = $temp_df[2]; $lm++;} + if ( (preg_match("/^dispo$/i",$temp_df[0])) and ($dispo == $temp_df[1]) ) {$dispo = $temp_df[2]; $lm++;} + if ( (preg_match("/^dispo_name$/i",$temp_df[0])) and ($dispo_name == $temp_df[1]) ) {$dispo_name = $temp_df[2]; $lm++;} + if ( (preg_match("/^dialed_number$/i",$temp_df[0])) and ($dialed_number == $temp_df[1]) ) {$dialed_number = $temp_df[2]; $lm++;} + if ( (preg_match("/^dialed_label$/i",$temp_df[0])) and ($dialed_label == $temp_df[1]) ) {$dialed_label = $temp_df[2]; $lm++;} + if ( (preg_match("/^source_id$/i",$temp_df[0])) and ($source_id == $temp_df[1]) ) {$source_id = $temp_df[2]; $lm++;} + if ( (preg_match("/^rank$/i",$temp_df[0])) and ($rank == $temp_df[1]) ) {$rank = $temp_df[2]; $lm++;} + if ( (preg_match("/^owner$/i",$temp_df[0])) and ($owner == $temp_df[1]) ) {$owner = $temp_df[2]; $lm++;} + if ( (preg_match("/^camp_script$/i",$temp_df[0])) and ($camp_script == $temp_df[1]) ) {$camp_script = $temp_df[2]; $lm++;} + if ( (preg_match("/^in_script$/i",$temp_df[0])) and ($in_script == $temp_df[1]) ) {$in_script = $temp_df[2]; $lm++;} + if ( (preg_match("/^fullname$/i",$temp_df[0])) and ($fullname == $temp_df[1]) ) {$fullname = $temp_df[2]; $lm++;} + if ( (preg_match("/^user_custom_one$/i",$temp_df[0])) and ($user_custom_one == $temp_df[1]) ) {$user_custom_one = $temp_df[2]; $lm++;} + if ( (preg_match("/^user_custom_two$/i",$temp_df[0])) and ($user_custom_two == $temp_df[1]) ) {$user_custom_two = $temp_df[2]; $lm++;} + if ( (preg_match("/^user_custom_three$/i",$temp_df[0])) and ($user_custom_three == $temp_df[1]) ) {$user_custom_three = $temp_df[2]; $lm++;} + if ( (preg_match("/^user_custom_four$/i",$temp_df[0])) and ($user_custom_four == $temp_df[1]) ) {$user_custom_four = $temp_df[2]; $lm++;} + if ( (preg_match("/^user_custom_five$/i",$temp_df[0])) and ($user_custom_five == $temp_df[1]) ) {$user_custom_five = $temp_df[2]; $lm++;} + if ( (preg_match("/^talk_time$/i",$temp_df[0])) and ($talk_time == $temp_df[1]) ) {$talk_time = $temp_df[2]; $lm++;} + if ( (preg_match("/^talk_time_ms$/i",$temp_df[0])) and ($talk_time_ms == $temp_df[1]) ) {$talk_time_ms = $temp_df[2]; $lm++;} + if ( (preg_match("/^talk_time_min$/i",$temp_df[0])) and ($talk_time_min == $temp_df[1]) ) {$talk_time_min = $temp_df[2]; $lm++;} + if ( (preg_match("/^agent_log_id$/i",$temp_df[0])) and ($CALL_agent_log_id == $temp_df[1]) ) {$CALL_agent_log_id = $temp_df[2]; $lm++;} + if ( (preg_match("/^entry_list_id$/i",$temp_df[0])) and ($entry_list_id == $temp_df[1]) ) {$entry_list_id = $temp_df[2]; $lm++;} + if ( (preg_match("/^did_id$/i",$temp_df[0])) and ($DID_id == $temp_df[1]) ) {$DID_id = $temp_df[2]; $lm++;} + if ( (preg_match("/^did_extension$/i",$temp_df[0])) and ($DID_extension == $temp_df[1]) ) {$DID_extension = $temp_df[2]; $lm++;} + if ( (preg_match("/^did_pattern$/i",$temp_df[0])) and ($DID_pattern == $temp_df[1]) ) {$DID_pattern = $temp_df[2]; $lm++;} + if ( (preg_match("/^did_description$/i",$temp_df[0])) and ($DID_description == $temp_df[1]) ) {$DID_description = $temp_df[2]; $lm++;} + if ( (preg_match("/^closecallid$/i",$temp_df[0])) and ($INclosecallid == $temp_df[1]) ) {$INclosecallid = $temp_df[2]; $lm++;} + if ( (preg_match("/^xfercallid$/i",$temp_df[0])) and ($INxfercallid == $temp_df[1]) ) {$INxfercallid = $temp_df[2]; $lm++;} + if ( (preg_match("/^call_id$/i",$temp_df[0])) and ($MDnextCID == $temp_df[1]) ) {$MDnextCID = $temp_df[2]; $lm++;} + if ( (preg_match("/^user_group$/i",$temp_df[0])) and ($user_group == $temp_df[1]) ) {$user_group = $temp_df[2]; $lm++;} + if ( (preg_match("/^call_notes$/i",$temp_df[0])) and ($url_call_notes == $temp_df[1]) ) {$url_call_notes = $temp_df[2]; $lm++;} + if ( (preg_match("/^recording_id$/i",$temp_df[0])) and ($recording_id == $temp_df[1]) ) {$recording_id = $temp_df[2]; $lm++;} + if ( (preg_match("/^recording_filename$/i",$temp_df[0])) and ($recording_filename == $temp_df[1]) ) {$recording_filename = $temp_df[2]; $lm++;} + if ( (preg_match("/^entry_date$/i",$temp_df[0])) and ($entry_date == $temp_df[1]) ) {$entry_date = $temp_df[2]; $lm++;} + if ( (preg_match("/^did_custom_one$/i",$temp_df[0])) and ($DID_custom_one == $temp_df[1]) ) {$DID_custom_one = $temp_df[2]; $lm++;} + if ( (preg_match("/^did_custom_two$/i",$temp_df[0])) and ($DID_custom_two == $temp_df[1]) ) {$DID_custom_two = $temp_df[2]; $lm++;} + if ( (preg_match("/^did_custom_three$/i",$temp_df[0])) and ($DID_custom_three == $temp_df[1]) ) {$DID_custom_three = $temp_df[2]; $lm++;} + if ( (preg_match("/^did_custom_four$/i",$temp_df[0])) and ($DID_custom_four == $temp_df[1]) ) {$DID_custom_four = $temp_df[2]; $lm++;} + if ( (preg_match("/^did_custom_five$/i",$temp_df[0])) and ($DID_custom_five == $temp_df[1]) ) {$DID_custom_five = $temp_df[2]; $lm++;} + if ( (preg_match("/^agent_email$/i",$temp_df[0])) and ($agent_email == $temp_df[1]) ) {$agent_email = $temp_df[2]; $lm++;} + if ( (preg_match("/^callback_lead_status$/i",$temp_df[0])) and ($CallBackLeadStatus == $temp_df[1]) ) {$CallBackLeadStatus = $temp_df[2]; $lm++;} + if ( (preg_match("/^callback_datetime$/i",$temp_df[0])) and ($CallBackDatETimE == $temp_df[1]) ) {$CallBackDatETimE = $temp_df[2]; $lm++;} + if ( (preg_match("/^called_count$/i",$temp_df[0])) and ($called_count == $temp_df[1]) ) {$called_count = $temp_df[2]; $lm++;} + + if ($DB) {echo "DF-Debug 2: $dct|$lm|$temp_df[0]|$temp_df[1]|$temp_df[2]|\n";} + $dct++; + } + } + } + } + + $dispo_call_urlARY[$j] = preg_replace('/^VAR/','',$dispo_call_urlARY[$j]); $dispo_call_urlARY[$j] = preg_replace('/--A--lead_id--B--/i',"$lead_id",$dispo_call_urlARY[$j]); $dispo_call_urlARY[$j] = preg_replace('/--A--vendor_id--B--/i',"$vendor_id",$dispo_call_urlARY[$j]); @@ -13004,6 +13133,22 @@ if ($ACTION == 'updateDISPO') } } $form_field_value = urlencode(trim("$row[$o]")); + + ### Check for dispo filter, run if enabled and field matches + if ( ($dispo_filter_enabled > 0) and (preg_match("/\|$field_name_id\|/",$df_fields)) ) + { + $dct=0; + while ($dispo_filters_ct > $dct) + { + $temp_df = explode(',',$dispo_filters[$dct]); + $lm=0; + + if ( (preg_match("/^$field_name_id$/i",$temp_df[0])) and ($form_field_value == $temp_df[1]) ) {$form_field_value = $temp_df[2]; $lm++;} + + if ($DB) {echo "DF-Debug 3: $dct|$lm|$temp_df[0]($field_name_id)|$temp_df[1]($form_field_value)|$temp_df[2]|\n";} + $dct++; + } + } $dispo_call_urlARY[$j] = preg_replace("/$field_name_tag/i","$form_field_value",$dispo_call_urlARY[$j]); $o++; } diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 74b637a5..aa61254d 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -4336,12 +4336,13 @@ else # 180330-1425 - Added download of CID Group records feature # 180331-1715 - Added update_did non-agent API function # 180410-1600 - Added pause code manager approval settings +# 180411-1647 - Added DISPO_FILTER as Settings Container type # # 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-668a'; -$build = '180410-1600'; +$admin_version = '2.14-669a'; +$build = '180411-1647'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -8889,7 +8890,7 @@ if ($ADD==192111111111) echo ""._QXZ("Container ID").": $NWB#settings_containers-container_id$NWE\n"; echo ""._QXZ("Container Notes").": $NWB#settings_containers-container_notes$NWE\n"; - echo ""._QXZ("Container Type").": $NWB#settings_containers-container_type$NWE\n"; echo ""._QXZ("Admin User Group").": $NWB#settings_containers-container_notes$NWE\n"; - echo ""._QXZ("Container Type").": $NWB#settings_containers-container_type$NWE\n"; echo ""._QXZ("Admin User Group").":