diff --git a/extras/upgrade_2.2.0.sql b/extras/upgrade_2.2.0.sql index 80c31eb7..46d800c4 100644 --- a/extras/upgrade_2.2.0.sql +++ b/extras/upgrade_2.2.0.sql @@ -80,3 +80,10 @@ ALTER TABLE vicidial_inbound_dids ADD menu_id VARCHAR(50) default ''; UPDATE system_settings SET db_schema_version='1140'; + + + + +ALTER TABLE system_settings ADD agentonly_callback_campaign_lock ENUM('0','1') default '1'; + +UPDATE system_settings SET db_schema_version='1141'; diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt index 2d5db598..d9a079a0 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt @@ -102,6 +102,8 @@ Show Call Menus|| Add A New Call Menu|| Copy Call Menu|| To delete an Option, just set the Route to REMOVE and the option will be deleted when you click the SUBMIT button|| +Agent Only Callback Campaign Lock|| +This option defines whether AGENTONLY callbacks are locked to the campaign that the agent originally created them under. Setting this to 1 means that the agent can only dial them from the campaign they were set under, 0 means that the agent can access them no matter what campaign they are logged into. Default is 1|| ############################################################ CLIENT diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php index 42d85810..9ae00d88 100644 --- a/www/agc/vdc_db_query.php +++ b/www/agc/vdc_db_query.php @@ -198,10 +198,11 @@ # 90327-1348 - Changed Vtiger status populate to use status name # 90408-0021 - Added API vtiger specific callback activity record ability # 90508-0726 - Changed to PHP long tags +# 90511-0923 - Added agentonly_callback_campaign_lock option # -$version = '2.2.0-109'; -$build = '90508-0726'; +$version = '2.2.0-110'; +$build = '90511-0923'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=212; $one_mysql_log=0; @@ -388,7 +389,7 @@ $agents='@agents'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### -$stmt = "SELECT use_non_latin,timeclock_end_of_day FROM system_settings;"; +$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00001',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -397,8 +398,9 @@ $i=0; while ($i < $qm_conf_ct) { $row=mysql_fetch_row($rslt); - $non_latin = $row[0]; - $timeclock_end_of_day = $row[1]; + $non_latin = $row[0]; + $timeclock_end_of_day = $row[1]; + $agentonly_callback_campaign_lock = $row[2]; $i++; } ##### END SETTINGS LOOKUP ##### @@ -4318,7 +4320,11 @@ echo " Pause Code has been updated to $status for $agent_log_id\n"; ################################################################################ if ($ACTION == 'CalLBacKLisT') { -$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and campaign_id='$campaign' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; +if ($agentonly_callback_campaign_lock > 0) + {$campaignCBsql = "and campaign_id='$campaign'";} +else + {$campaignCBsql = '';} +$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' $campaignCBsql and status NOT IN('INACTIVE','DEAD') order by callback_time;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00178',$user,$server_ip,$session_name,$one_mysql_log);} @@ -4358,7 +4364,11 @@ $loop_count=0; ################################################################################ if ($ACTION == 'CalLBacKCounT') { -$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and campaign_id='$campaign' and status NOT IN('INACTIVE','DEAD');"; +if ($agentonly_callback_campaign_lock > 0) + {$campaignCBsql = "and campaign_id='$campaign'";} +else + {$campaignCBsql = '';} +$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' $campaignCBsql and status NOT IN('INACTIVE','DEAD');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00180',$user,$server_ip,$session_name,$one_mysql_log);} diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 23a4817e..91e3dd81 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -1010,7 +1010,8 @@ if (isset($_GET["track_in_vdac"])) {$track_in_vdac=$_GET["track_in_vdac"];} elseif (isset($_POST["track_in_vdac"])) {$track_in_vdac=$_POST["track_in_vdac"];} if (isset($_GET["source_menu"])) {$source_menu=$_GET["source_menu"];} elseif (isset($_POST["source_menu"])) {$source_menu=$_POST["source_menu"];} - +if (isset($_GET["agentonly_callback_campaign_lock"])) {$agentonly_callback_campaign_lock=$_GET["agentonly_callback_campaign_lock"];} + elseif (isset($_POST["agentonly_callback_campaign_lock"])) {$agentonly_callback_campaign_lock=$_POST["agentonly_callback_campaign_lock"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} @@ -1199,6 +1200,7 @@ $menu_timeout = ereg_replace("[^0-9]","",$menu_timeout); $menu_time_check = ereg_replace("[^0-9]","",$menu_time_check); $track_in_vdac = ereg_replace("[^0-9]","",$track_in_vdac); $menu_repeat = ereg_replace("[^0-9]","",$menu_repeat); +$agentonly_callback_campaign_lock = ereg_replace("[^0-9]","",$agentonly_callback_campaign_lock); ### DIGITS and COLONS $shift_length = ereg_replace("[^\:0-9]","",$shift_length); @@ -1740,11 +1742,12 @@ $dialplan_entry = ereg_replace(";","",$dialplan_entry); # 90429-0542 - Added 3rd&4th options to SURVEY campaigns # 90430-0154 - Added RANDOM and LAST CALL TIME options to lead order for campaigns # 90504-0901 - Added Call Menu feature, changed script to use long PHP tags +# 90511-0910 - Added agentonly_callback_campaign_lock to system_settings # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-182'; -$build = '90504-0901'; +$admin_version = '2.2.0-183'; +$build = '90511-0910'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -5164,6 +5167,11 @@ FR_SPAC 00 00 00 00 00 - France space separated phone number

Agent interface API Access Active - This option allows you to enable or disable the agent interface API. Default is 0. +
+ +
+Agent Only Callback Campaign Lock - This option defines whether AGENTONLY callbacks are locked to the campaign that the agent originally created them under. Setting this to 1 means that the agent can only dial them from the campaign they were set under, 0 means that the agent can access them no matter what campaign they are logged into. Default is 1. +

@@ -11511,7 +11519,7 @@ if ($ADD==411111111111111) echo "
VICIDIAL SYSTEM SETTINGS MODIFIED\n"; - $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second';"; + $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -18819,7 +18827,7 @@ if ($ADD==311111111111111) echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n";
\n"; echo ""; - $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second from system_settings;"; + $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,agentonly_callback_campaign_lock from system_settings;"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $version = $row[0]; @@ -18856,6 +18864,7 @@ if ($ADD==311111111111111) $qc_features_active = $row[31]; $outbound_autodial_active = $row[32]; $outbound_calls_per_second = $row[33]; + $agentonly_callback_campaign_lock = $row[34]; echo "
MODIFY VICIDIAL SYSTEM SETTINGS
\n"; echo "\n"; @@ -18912,6 +18921,7 @@ if ($ADD==311111111111111) echo "\n"; echo "$NWB#settings-vdc_header_phone_format$NWE
Agent API Active: $NWB#settings-vdc_agent_api_active$NWE
Agent Only Callback Campaign Lock: $NWB#settings-agentonly_callback_campaign_lock$NWE
QC Features Active: $NWB#settings-qc_features_active$NWE
Outbound Auto-Dial Active: $NWB#settings-outbound_autodial_active$NWE