diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index 5c63dfce..b2093bb1 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -703,6 +703,15 @@ OTHER CHANGES: more efficient dialing on outbound campaigns. Must have more than one agent server and phone aliases enabled for this feature to work. +162. Added DID remote agent extension override entries allowing for inbound + calls that are routed to remote agents being able to have DID-specific + extensions that a call would be routed to instead of the remote agent + extension. Multiple entries allowed per DID/Remote-Agent as well as + per DID for all agents(---ALL---). Must be enabled in System Settings. + +163. Added 9 new User permissions to allow access to specific Admin sections + like Vociemail Music-on-hold and 7 others individually. + diff --git a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi index 148f533e..9fac8103 100644 --- a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi +++ b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi @@ -157,6 +157,7 @@ # 110801-0841 - Added on_hook_cid option and group_calldate field # 110822-1256 - Added optional did_agent_log logging # 110920-1426 - Small fix for rare remote agent recording issue +# 110922-2149 - Added compatibility with DID remote agent extension overrides # $script = 'agi-VDAD_ALL_inbound.agi'; @@ -1512,7 +1513,7 @@ if ($call_handle_method =~ /CLOSER|DIGITID$/) ############################################# ##### START SYSTEM SETTINGS LOOKUP ##### -$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,queuemetrics_pe_phone_append,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db FROM system_settings;"; +$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,queuemetrics_pe_phone_append,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_ra_extensions_enabled FROM system_settings;"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; @@ -1534,6 +1535,7 @@ if ($sthArows > 0) $alt_log_login = $aryA[11]; $alt_log_pass = $aryA[12]; $tables_use_alt_log_db = $aryA[13]; + $did_ra_extensions_enabled = $aryA[14]; } $sthA->finish(); ##### END SYSTEM SETTINGS LOOKUP ##### @@ -2199,7 +2201,48 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) ) $extension_group_order = $aryA[1]; } $sthA->finish(); - if ( (length($extension_group) > 0) and ($extension_group !~ /^NONE/) ) + + ### BEGIN check for did remote agent extension override ### + $DRAE_did_id=''; + $DRAE_extension=''; + if ($did_ra_extensions_enabled > 0) + { + $stmtA = "SELECT did_id FROM vicidial_did_log where uniqueid='$uniqueid' order by call_date desc limit 1;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $DRAE_did_id = $aryA[0]; + $sthA->finish(); + if ($AGILOG) {$agi_string = "-- ORIGINAL DID FOUND : |$DRAE_did_id|$uniqueid|"; &agi_output;} + + $stmtA = "SELECT extension FROM vicidial_did_ra_extensions where did_id='$DRAE_did_id' and user_start IN('$ARra_user[$ragp]','---ALL---') and active='Y' order by call_count_today limit 1;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $DRAE_extension = $aryA[0]; + $sthA->finish(); + if ($AGILOG) {$agi_string = "-- DRAE EXTENSION FOUND : |$DRAE_extension|$ARra_user[$ragp]|"; &agi_output;} + + $stmtA = "UPDATE vicidial_did_ra_extensions set call_count_today=(call_count_today + 1) where extension='$DRAE_extension' and did_id='$DRAE_did_id' and user_start IN('$ARra_user[$ragp]','---ALL---') limit 1;"; + $DRAEaffected_rows = $dbhA->do($stmtA); + $dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$DRAEaffected_rows; &mysql_error_logging; + + $ARconf_exten[$ragp] = $DRAE_extension; + $ARdialplan_number[$ragp] = $DRAE_extension; + } + } + } + ### END check for did remote agent extension override ### + + if ( (length($extension_group) > 0) and ($extension_group !~ /^NONE/) and (length($DRAE_extension) < 1) ) { $extension_group_orderSQL = 'order by last_call_time'; if ($extension_group_order =~ /RANK/) @@ -2551,7 +2594,47 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) ) $extension_campaign_id = $aryA[2]; } $sthA->finish(); - if ( (length($extension_group) > 0) and ($extension_group !~ /^NONE/) ) + + ### BEGIN check for did remote agent extension override ### + $DRAE_did_id=''; + $DRAE_extension=''; + if ($did_ra_extensions_enabled > 0) + { + $stmtA = "SELECT did_id FROM vicidial_did_log where uniqueid='$uniqueid' order by call_date desc limit 1;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $DRAE_did_id = $aryA[0]; + $sthA->finish(); + if ($AGILOG) {$agi_string = "-- ORIGINAL DID FOUND : |$DRAE_did_id|$uniqueid|"; &agi_output;} + + $stmtA = "SELECT extension FROM vicidial_did_ra_extensions where did_id='$DRAE_did_id' and user_start IN('$ra_user','---ALL---') and active='Y' order by call_count_today limit 1;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $DRAE_extension = $aryA[0]; + $sthA->finish(); + if ($AGILOG) {$agi_string = "-- DRAE EXTENSION FOUND : |$DRAE_extension|$ra_user|"; &agi_output;} + + $stmtA = "UPDATE vicidial_did_ra_extensions set call_count_today=(call_count_today + 1) where extension='$DRAE_extension' and did_id='$DRAE_did_id' and user_start IN('$ra_user','---ALL---') limit 1;"; + $DRAEaffected_rows = $dbhA->do($stmtA); + $dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$DRAEaffected_rows; &mysql_error_logging; + + $VDADconf_exten = $DRAE_extension; + } + } + } + ### END check for did remote agent extension override ### + + if ( (length($extension_group) > 0) and ($extension_group !~ /^NONE/) and (length($DRAE_extension) < 1) ) { $extension_group_orderSQL = 'order by last_call_time'; if ($extension_group_order =~ /RANK/) diff --git a/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl b/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl index 3043cbe5..630379bf 100644 --- a/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl +++ b/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl @@ -65,6 +65,7 @@ # 110725-2356 - Added new voicemail time zone option and menu gather # 110829-1601 - Added multiple invalid option to Call Menus # 110911-1452 - Added resets for extension groups and areacode cid tables +# 110922-2148 - Added reset for vicidial_did_ra_extensions # $DB=0; # Debug flag @@ -801,6 +802,20 @@ if ($timeclock_end_of_day_NOW > 0) if ($DB) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";} $sthA->finish(); + $stmtA = "update vicidial_did_ra_extensions SET call_count_today=0;"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $affected_rows = $dbhA->do($stmtA); + if($DB){print STDERR "\n|$affected_rows vicidial_did_ra_extensions call counts reset|\n";} + + $stmtA = "optimize table vicidial_did_ra_extensions;"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + @aryA = $sthA->fetchrow_array; + if ($DB) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";} + $sthA->finish(); + $stmtA = "update vicidial_extension_groups SET call_count_today=0;"; if($DBX){print STDERR "\n|$stmtA|\n";} $affected_rows = $dbhA->do($stmtA); 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 c67592f8..fe903f32 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -576,7 +576,16 @@ agent_choose_blended ENUM('0','1') default '1', realtime_block_user_info ENUM('0','1') default '0', custom_fields_modify ENUM('0','1') default '0', force_change_password ENUM('Y','N') default 'N', -agent_lead_search_override ENUM('NOT_ACTIVE','ENABLED','DISABLED') default 'NOT_ACTIVE' +agent_lead_search_override ENUM('NOT_ACTIVE','ENABLED','DISABLED') default 'NOT_ACTIVE', +modify_shifts ENUM('1','0') default '0', +modify_phones ENUM('1','0') default '0', +modify_carriers ENUM('1','0') default '0', +modify_labels ENUM('1','0') default '0', +modify_statuses ENUM('1','0') default '0', +modify_voicemail ENUM('1','0') default '0', +modify_audiostore ENUM('1','0') default '0', +modify_moh ENUM('1','0') default '0', +modify_tts ENUM('1','0') default '0' ); CREATE UNIQUE INDEX user ON vicidial_users (user); @@ -1433,7 +1442,8 @@ alt_log_pass VARCHAR(50) default '', tables_use_alt_log_db VARCHAR(2000) default '', did_agent_log ENUM('Y','N') default 'N', campaign_cid_areacodes_enabled ENUM('0','1') default '1', -pllb_grouping_limit SMALLINT(5) default '100' +pllb_grouping_limit SMALLINT(5) default '100', +did_ra_extensions_enabled ENUM('0','1') default '0' ); CREATE TABLE vicidial_campaigns_list_mix ( @@ -2489,6 +2499,19 @@ index (areacode) CREATE UNIQUE INDEX campareacode on vicidial_campaign_cid_areacodes (campaign_id, areacode, outbound_cid); +CREATE TABLE vicidial_did_ra_extensions ( +did_id INT(9) UNSIGNED NOT NULL, +user_start VARCHAR(20), +extension VARCHAR(50) default '', +description VARCHAR(50), +active ENUM('Y','N','') default '', +call_count_today MEDIUMINT(7) default '0', +index (did_id), +index (user_start) +); + +CREATE UNIQUE INDEX didraexten on vicidial_did_ra_extensions (did_id, user_start, extension); + ALTER TABLE vicidial_campaign_server_stats ENGINE=MEMORY; @@ -2641,7 +2664,7 @@ CREATE TABLE vicidial_log_noanswer_archive LIKE vicidial_log_noanswer; CREATE TABLE vicidial_did_agent_log_archive LIKE vicidial_did_agent_log; CREATE UNIQUE INDEX vdala on vicidial_did_agent_log_archive (uniqueid,call_date,did_route); -UPDATE system_settings SET db_schema_version='1296',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1297',db_schema_update_date=NOW(); GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/agc_2-X/trunk/extras/upgrade_2.4.sql b/agc_2-X/trunk/extras/upgrade_2.4.sql index eff4f94e..cb11fb90 100644 --- a/agc_2-X/trunk/extras/upgrade_2.4.sql +++ b/agc_2-X/trunk/extras/upgrade_2.4.sql @@ -1032,3 +1032,30 @@ ALTER TABLE vicidial_campaigns ADD pllb_grouping ENUM('DISABLED','ONE_SERVER_ONL ALTER TABLE vicidial_campaigns ADD pllb_grouping_limit SMALLINT(5) default '50'; UPDATE system_settings SET db_schema_version='1296',db_schema_update_date=NOW() where db_schema_version < 1296; + +CREATE TABLE vicidial_did_ra_extensions ( +did_id INT(9) UNSIGNED NOT NULL, +user_start VARCHAR(20), +extension VARCHAR(50) default '', +description VARCHAR(50), +active ENUM('Y','N','') default '', +call_count_today MEDIUMINT(7) default '0', +index (did_id), +index (user_start) +); + +CREATE UNIQUE INDEX didraexten on vicidial_did_ra_extensions (did_id, user_start, extension); + +ALTER TABLE system_settings ADD did_ra_extensions_enabled ENUM('0','1') default '0'; + +ALTER TABLE vicidial_users ADD modify_shifts ENUM('1','0') default '0'; +ALTER TABLE vicidial_users ADD modify_phones ENUM('1','0') default '0'; +ALTER TABLE vicidial_users ADD modify_carriers ENUM('1','0') default '0'; +ALTER TABLE vicidial_users ADD modify_labels ENUM('1','0') default '0'; +ALTER TABLE vicidial_users ADD modify_statuses ENUM('1','0') default '0'; +ALTER TABLE vicidial_users ADD modify_voicemail ENUM('1','0') default '0'; +ALTER TABLE vicidial_users ADD modify_audiostore ENUM('1','0') default '0'; +ALTER TABLE vicidial_users ADD modify_moh ENUM('1','0') default '0'; +ALTER TABLE vicidial_users ADD modify_tts ENUM('1','0') default '0'; + +UPDATE system_settings SET db_schema_version='1297',db_schema_update_date=NOW() where db_schema_version < 1297; diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt index 2076f771..9a950a4a 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt +++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt @@ -725,6 +725,19 @@ Phone Login Load Balancing Grouping, only allowed if there are multiple agent se PLLB Grouping Limit|| Phone Login Load Balancing Grouping Limit. If PLLB Grouping is set to CASCADING then this setting will determine the number of agents acceptable in each server for this campaign. Default is 50|| Phone Login Load Balancing Grouping Limit. If PLLB Grouping is set to CASCADING at the campaign level then this setting will determine the number of agents acceptable on each server across all campaigns. Default is 100|| +Modify DID RA Extension Overrides|| +DID REMOTE AGENT EXTENSION OVERRIDE NOT ADDED|| +there is already an entry for this DID with this RA EXTENSION|| +DID REMOTE AGENT EXTENSION OVERRIDE ADDED|| +DID REMOTE AGENT EXTENSION OVERRIDE NOT DELETED|| +DID REMOTE AGENT EXTENSION OVERRIDE MODIFIED|| +MODIFY THIS DID|| +Enable Remote Agent Extension Overrides|| +This setting enables DIDs to have extension overrides for remote agent routed calls through in-groups. Default is 0 for disabled|| +REMOTE AGENT EXTENSION OVERRIDES FOR THIS DID|| +REMOTE AGENT EXTENSION OVERRIDE LISTINGS|| +DID Remote Agent Extension Overrides|| +This section allows you to enable DIDs to have extension overrides for remote agent routed calls through in-groups. The User Start must be a valid Remote Agent User Start or if you want the Extension Override entry to work for all calls then you can use ---ALL--- in the User Start field. If there are multiple entries for the same DID and User Start then the active entries will be used in a round robin method|| lead_report_export.php diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 096d26d7..4691bcc7 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -1625,6 +1625,28 @@ if (isset($_GET["pllb_grouping"])) {$pllb_grouping=$_GET["pllb_grouping"];} elseif (isset($_POST["pllb_grouping"])) {$pllb_grouping=$_POST["pllb_grouping"];} if (isset($_GET["pllb_grouping_limit"])) {$pllb_grouping_limit=$_GET["pllb_grouping_limit"];} elseif (isset($_POST["pllb_grouping_limit"])) {$pllb_grouping_limit=$_POST["pllb_grouping_limit"];} +if (isset($_GET["description"])) {$description=$_GET["description"];} + elseif (isset($_POST["description"])) {$description=$_POST["description"];} +if (isset($_GET["did_ra_extensions_enabled"])) {$did_ra_extensions_enabled=$_GET["did_ra_extensions_enabled"];} + elseif (isset($_POST["did_ra_extensions_enabled"])) {$did_ra_extensions_enabled=$_POST["did_ra_extensions_enabled"];} +if (isset($_GET["modify_shifts"])) {$modify_shifts=$_GET["modify_shifts"];} + elseif (isset($_POST["modify_shifts"])) {$modify_shifts=$_POST["modify_shifts"];} +if (isset($_GET["modify_phones"])) {$modify_phones=$_GET["modify_phones"];} + elseif (isset($_POST["modify_phones"])) {$modify_phones=$_POST["modify_phones"];} +if (isset($_GET["modify_carriers"])) {$modify_carriers=$_GET["modify_carriers"];} + elseif (isset($_POST["modify_carriers"])) {$modify_carriers=$_POST["modify_carriers"];} +if (isset($_GET["modify_labels"])) {$modify_labels=$_GET["modify_labels"];} + elseif (isset($_POST["modify_labels"])) {$modify_labels=$_POST["modify_labels"];} +if (isset($_GET["modify_statuses"])) {$modify_statuses=$_GET["modify_statuses"];} + elseif (isset($_POST["modify_statuses"])) {$modify_statuses=$_POST["modify_statuses"];} +if (isset($_GET["modify_voicemail"])) {$modify_voicemail=$_GET["modify_voicemail"];} + elseif (isset($_POST["modify_voicemail"])) {$modify_voicemail=$_POST["modify_voicemail"];} +if (isset($_GET["modify_audiostore"])) {$modify_audiostore=$_GET["modify_audiostore"];} + elseif (isset($_POST["modify_audiostore"])) {$modify_audiostore=$_POST["modify_audiostore"];} +if (isset($_GET["modify_moh"])) {$modify_moh=$_GET["modify_moh"];} + elseif (isset($_POST["modify_moh"])) {$modify_moh=$_POST["modify_moh"];} +if (isset($_GET["modify_tts"])) {$modify_tts=$_GET["modify_tts"];} + elseif (isset($_POST["modify_tts"])) {$modify_tts=$_POST["modify_tts"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} @@ -1638,7 +1660,7 @@ if (strlen($dial_status) > 0) ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### -$stmt = "SELECT use_non_latin,enable_queuemetrics_logging,enable_vtiger_integration,qc_features_active,outbound_autodial_active,sounds_central_control_active,enable_second_webform,user_territories_active,custom_fields_enabled,admin_web_directory,webphone_url,first_login_trigger,hosted_settings,default_phone_registration_password,default_phone_login_password,default_server_password,test_campaign_calls,active_voicemail_server,voicemail_timezones,default_voicemail_timezone,default_local_gmt,campaign_cid_areacodes_enabled,pllb_grouping_limit FROM system_settings;"; +$stmt = "SELECT use_non_latin,enable_queuemetrics_logging,enable_vtiger_integration,qc_features_active,outbound_autodial_active,sounds_central_control_active,enable_second_webform,user_territories_active,custom_fields_enabled,admin_web_directory,webphone_url,first_login_trigger,hosted_settings,default_phone_registration_password,default_phone_login_password,default_server_password,test_campaign_calls,active_voicemail_server,voicemail_timezones,default_voicemail_timezone,default_local_gmt,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); @@ -1668,6 +1690,7 @@ if ($qm_conf_ct > 0) $SSdefault_local_gmt = $row[20]; $SScampaign_cid_areacodes_enabled = $row[21]; $SSpllb_grouping_limit = $row[22]; + $SSdid_ra_extensions_enabled = $row[23]; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -1774,7 +1797,6 @@ if ($non_latin < 1) $telnet_port = ereg_replace("[^0-9]","",$telnet_port); $updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled); $user_level = ereg_replace("[^0-9]","",$user_level); - $user_start = ereg_replace("[^0-9]","",$user_start); $user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled); $VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call); $VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension); @@ -1879,6 +1901,16 @@ if ($non_latin < 1) $campaign_cid_areacodes_enabled = ereg_replace("[^0-9]","",$campaign_cid_areacodes_enabled); $areacode = ereg_replace("[^0-9]","",$areacode); $pllb_grouping_limit = ereg_replace("[^0-9]","",$pllb_grouping_limit); + $did_ra_extensions_enabled = ereg_replace("[^0-9]","",$did_ra_extensions_enabled); + $modify_shifts = ereg_replace("[^0-9]","",$modify_shifts); + $modify_phones = ereg_replace("[^0-9]","",$modify_phones); + $modify_carriers = ereg_replace("[^0-9]","",$modify_carriers); + $modify_labels = ereg_replace("[^0-9]","",$modify_labels); + $modify_statuses = ereg_replace("[^0-9]","",$modify_statuses); + $modify_voicemail = ereg_replace("[^0-9]","",$modify_voicemail); + $modify_audiostore = ereg_replace("[^0-9]","",$modify_audiostore); + $modify_moh = ereg_replace("[^0-9]","",$modify_moh); + $modify_tts = ereg_replace("[^0-9]","",$modify_tts); $drop_call_seconds = ereg_replace("[^-0-9]","",$drop_call_seconds); @@ -2258,6 +2290,7 @@ if ($non_latin < 1) $default_voicemail_timezone = ereg_replace("[^-_0-9a-zA-Z]","",$default_voicemail_timezone); $on_hook_cid = ereg_replace("[^-_0-9a-zA-Z]","",$on_hook_cid); $pllb_grouping = ereg_replace("[^-_0-9a-zA-Z]","",$pllb_grouping); + $user_start = ereg_replace("[^-_0-9a-zA-Z]","",$user_start); ### ALPHA-NUMERIC and underscore and dash and slash and dot $menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt); @@ -2301,7 +2334,7 @@ if ($non_latin < 1) $uniqueid_status_prefix = ereg_replace("[^-\,\_0-9a-zA-Z]","",$uniqueid_status_prefix); ### ALPHA-NUMERIC and dots - $sounds_web_server = ereg_replace("[^\.0-9a-zA-Z]","",$sounds_web_server); + $sounds_web_server = ereg_replace("[^-\.0-9a-zA-Z]","",$sounds_web_server); ### ALPHA-NUMERIC and spaces $lead_order = ereg_replace("[^ 0-9a-zA-Z]","",$lead_order); ### ALPHA-NUMERIC and spaces and dashes and underscores @@ -2397,6 +2430,7 @@ if ($non_latin < 1) $label_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$label_name); $default_local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$default_local_gmt); $cid_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$cid_description); + $description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$description); ### ALPHA-NUMERIC and underscore and dash and slash and at and dot $call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); @@ -2859,12 +2893,13 @@ else # 110829-2129 - Added survey recording option # 110831-2038 - Added Campaign Areacode CID features # 110920-1344 - Added pllb_grouping_limit settings +# 110922-1218 - Added new User admin permissions, Added DID Remote Agent extension override section # # 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.4-335a'; -$build = '110920-1344'; +$admin_version = '2.4-336a'; +$build = '110922-1218'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -2978,7 +3013,7 @@ if ( ($auth > 0) or ($reports_auth > 0) ) { $office_no=strtoupper($PHP_AUTH_USER); $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,callcard_admin,force_change_password from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW';"; + $stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,callcard_admin,force_change_password,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfull_name =$row[3]; @@ -3016,6 +3051,16 @@ if ( ($auth > 0) or ($reports_auth > 0) ) $LOGdelete_from_dnc =$row[65]; $LOGcallcard_admin =$row[70]; $LOGforce_change_password =$row[71]; + $LOGmodify_shifts =$row[72]; + $LOGmodify_phones =$row[73]; + $LOGmodify_carriers =$row[74]; + $LOGmodify_labels =$row[75]; + $LOGmodify_statuses =$row[76]; + $LOGmodify_voicemail =$row[77]; + $LOGmodify_audiostore =$row[78]; + $LOGmodify_moh =$row[79]; + $LOGmodify_tts =$row[80]; + $stmt="SELECT allowed_campaigns,allowed_reports from vicidial_user_groups where user_group='$LOGuser_group';"; $rslt=mysql_query($stmt, $link); @@ -3231,6 +3276,7 @@ if ($ADD==302) {$hh='campaigns'; $sh='accid'; echo "Campaign Areacode CID";} if ($ADD==311) {$hh='lists'; echo "Modify List";} if ($ADD==3111) {$hh='ingroups'; echo "Modify In-Group";} if ($ADD==3311) {$hh='ingroups'; echo "Modify DID";} +if ($ADD==3321) {$hh='ingroups'; echo "Modify DID RA Extension Overrides";} if ($ADD==3511) {$hh='ingroups'; echo "Modify Call Menu";} if ($ADD==3711) {$hh='ingroups'; echo "Modify Filter Phone Group";} if ($ADD==31111) {$hh='remoteagent'; echo "Modify Remote Agents";} @@ -6012,6 +6058,14 @@ if ($ADD==99999) +
+ +
+ DID Remote Agent Extension Overrides -
This section allows you to enable DIDs to have extension overrides for remote agent routed calls through in-groups. The User Start must be a valid Remote Agent User Start or if you want the Extension Override entry to work for all calls then you can use ---ALL--- in the User Start field. If there are multiple entries for the same DID and User Start then the active entries will be used in a round robin method. + + + +



VICIDIAL_CALL MENU TABLE

@@ -7663,6 +7717,11 @@ if ($ADD==99999)
Enable Campaign Areacode CID - This setting enables the ability to set specific outbound callerid numbers to be used per campaign. Default is 1 for enabled. +
+
+
+ Enable Remote Agent Extension Overrides - This setting enables DIDs to have extension overrides for remote agent routed calls through in-groups. Default is 0 for disabled. +

@@ -9645,7 +9704,7 @@ if ($ADD==1111111111) if ($ADD==131111111) { - if ($LOGmodify_call_times==1) + if ( ($LOGmodify_call_times==1) or ($LOGmodify_shifts==1) ) { echo "
\n"; echo ""; @@ -9685,7 +9744,7 @@ if ($ADD==131111111) if ($ADD==11111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { ##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value ##### $stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='phones' and active='1';"; @@ -9751,7 +9810,7 @@ if ($ADD==11111111111) if ($ADD==12111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { echo "
\n"; echo ""; @@ -9782,7 +9841,7 @@ if ($ADD==12111111111) if ($ADD==13111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { echo "
\n"; echo ""; @@ -9874,7 +9933,7 @@ if ($ADD==131111111111) if ($ADD==141111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_carriers==1) ) { echo "
\n"; echo ""; @@ -9930,7 +9989,7 @@ if ($ADD==141111111111) if ($ADD==140111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_carriers==1) ) { echo "
\n"; echo ""; @@ -9980,7 +10039,7 @@ if ($ADD==140111111111) if ($ADD==151111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_tts==1) ) { echo "
\n"; echo ""; @@ -10010,7 +10069,7 @@ if ($ADD==151111111111) if ($ADD==161111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_moh==1) ) { echo "
\n"; echo ""; @@ -10040,7 +10099,7 @@ if ($ADD==161111111111) if ($ADD==171111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_moh==1) ) { echo "
\n"; echo ""; @@ -10072,7 +10131,7 @@ if ($ADD==171111111111) if ($ADD==181111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_labels==1) ) { echo "
\n"; echo ""; @@ -10527,7 +10586,7 @@ if ($ADD=="2A") $stmt="UPDATE system_settings SET auto_user_add_value='$user';"; $rslt=mysql_query($stmt, $link); } - $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override) SELECT \"$user\",\"$pass\",\"$full_name\",user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override from vicidial_users where user=\"$source_user_id\";"; + $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts) SELECT \"$user\",\"$pass\",\"$full_name\",user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts from vicidial_users where user=\"$source_user_id\";"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_inbound_group_agents (user,group_id,group_rank,group_weight,calls_today) SELECT \"$user\",group_id,group_rank,group_weight,\"0\" from vicidial_inbound_group_agents where user=\"$source_user_id\";"; @@ -13053,7 +13112,7 @@ if ($ADD=="4A") } echo "
USER MODIFIED - ADMIN: $user\n"; - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',add_timeclock_log='$add_timeclock_log',modify_timeclock_log='$modify_timeclock_log',delete_timeclock_log='$delete_timeclock_log',alter_custphone_override='$alter_custphone_override',vdc_agent_api_access='$vdc_agent_api_access',modify_inbound_dids='$modify_inbound_dids',delete_inbound_dids='$delete_inbound_dids',active='$active',download_lists='$download_lists',agent_shift_enforcement_override='$agent_shift_enforcement_override',manager_shift_enforcement_override='$manager_shift_enforcement_override',export_reports='$export_reports',delete_from_dnc='$delete_from_dnc',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts',agent_choose_territories='$agent_choose_territories',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five',voicemail_id='$voicemail_id',agent_call_log_view_override='$agent_call_log_view_override',callcard_admin='$callcard_admin',agent_choose_blended='$agent_choose_blended',realtime_block_user_info='$realtime_block_user_info',custom_fields_modify='$custom_fields_modify',force_change_password='$force_change_password',agent_lead_search_override='$agent_lead_search' where user='$user';"; + $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',add_timeclock_log='$add_timeclock_log',modify_timeclock_log='$modify_timeclock_log',delete_timeclock_log='$delete_timeclock_log',alter_custphone_override='$alter_custphone_override',vdc_agent_api_access='$vdc_agent_api_access',modify_inbound_dids='$modify_inbound_dids',delete_inbound_dids='$delete_inbound_dids',active='$active',download_lists='$download_lists',agent_shift_enforcement_override='$agent_shift_enforcement_override',manager_shift_enforcement_override='$manager_shift_enforcement_override',export_reports='$export_reports',delete_from_dnc='$delete_from_dnc',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts',agent_choose_territories='$agent_choose_territories',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five',voicemail_id='$voicemail_id',agent_call_log_view_override='$agent_call_log_view_override',callcard_admin='$callcard_admin',agent_choose_blended='$agent_choose_blended',realtime_block_user_info='$realtime_block_user_info',custom_fields_modify='$custom_fields_modify',force_change_password='$force_change_password',agent_lead_search_override='$agent_lead_search',modify_shifts='$modify_shifts',modify_phones='$modify_phones',modify_carriers='$modify_carriers',modify_labels='$modify_labels',modify_statuses='$modify_statuses',modify_voicemail='$modify_voicemail',modify_audiostore='$modify_audiostore',modify_moh='$modify_moh',modify_tts='$modify_tts' where user='$user';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -15666,7 +15725,7 @@ if ($ADD==4111111111) if ($ADD==431111111) { - if ($LOGmodify_call_times==1) + if ( ($LOGmodify_call_times==1) or ($LOGmodify_shifts==1) ) { echo ""; @@ -15717,7 +15776,7 @@ if ($ADD==431111111) if ($ADD==41111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { echo ""; @@ -15765,7 +15824,7 @@ if ($ADD==41111111111) if ($ADD==42111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { echo ""; @@ -15805,7 +15864,7 @@ if ($ADD==42111111111) if ($ADD==43111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { echo ""; @@ -15999,7 +16058,7 @@ if ($ADD==431111111111) if ($ADD==441111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_carriers==1) ) { echo ""; @@ -16039,7 +16098,7 @@ if ($ADD==441111111111) if ($ADD==451111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_tts==1) ) { echo ""; @@ -16076,7 +16135,7 @@ if ($ADD==451111111111) if ($ADD==461111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_moh==1) ) { echo ""; @@ -16177,7 +16236,7 @@ if ($ADD==461111111111) if ($ADD==471111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_voicemail==1) ) { echo ""; @@ -16222,7 +16281,7 @@ if ($ADD==471111111111) if ($ADD==481111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_labels==1) ) { echo ""; @@ -16360,7 +16419,7 @@ if ($ADD==411111111111111) } $tables_use_alt_log_db = preg_replace("/,$/","",$new_altlog_value); - $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',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysql_real_escape_string($webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',custom_dialplan_entry='$custom_dialplan_entry',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db',webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit';"; + $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',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysql_real_escape_string($webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',custom_dialplan_entry='$custom_dialplan_entry',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db',webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled';"; $rslt=mysql_query($stmt, $link); if ($reload_dialplan_on_servers > 0) @@ -16392,7 +16451,7 @@ if ($ADD==411111111111111) if ($ADD==421111111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_statuses==1) ) { echo ""; @@ -16463,7 +16522,7 @@ if ($ADD==421111111111111) if ($ADD==431111111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_statuses==1) ) { echo ""; @@ -18938,7 +18997,7 @@ if ($ADD==3) echo "\n"; echo "\n"; echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; @@ -19718,7 +19798,7 @@ if ($ADD==31) else {$camp_preset_color=$campaigns_color;} if ($SUB==202) {$camp_accid_color=$subcamp_color;} else {$camp_accid_color=$campaigns_color;} - echo " $row[0]:
"; + echo " $campaign_id:
"; echo "
\n"; echo ""; - $stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override from vicidial_users where user='$user';"; + $stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts from vicidial_users where user='$user';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $user_id = $row[0]; @@ -19023,6 +19082,16 @@ if ($ADD==3) $custom_fields_modify = $row[81]; $force_change_password = $row[82]; $agent_lead_search_override = $row[83]; + $modify_shifts = $row[84]; + $modify_phones = $row[85]; + $modify_carriers = $row[86]; + $modify_labels = $row[87]; + $modify_statuses = $row[88]; + $modify_voicemail = $row[89]; + $modify_audiostore = $row[90]; + $modify_moh = $row[91]; + $modify_tts = $row[92]; + if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) { @@ -19216,6 +19285,17 @@ if ($ADD==3) echo "
Modify Call Times: $NWB#vicidial_users-modify_call_times$NWE
Delete Call Times: $NWB#vicidial_users-delete_call_times$NWE
Modify Servers: $NWB#vicidial_users-modify_sections$NWE
Modify Shifts: $NWB#vicidial_users-modify_sections$NWE
Modify Phones: $NWB#vicidial_users-modify_sections$NWE
Modify Carriers: $NWB#vicidial_users-modify_sections$NWE
Modify Labels: $NWB#vicidial_users-modify_sections$NWE
Modify Statuses: $NWB#vicidial_users-modify_sections$NWE
Modify Voicemail: $NWB#vicidial_users-modify_sections$NWE
Modify Audio Store: $NWB#vicidial_users-modify_sections$NWE
Modify Music On Hold: $NWB#vicidial_users-modify_sections$NWE
Modify TTS: $NWB#vicidial_users-modify_sections$NWE
CallCard Access: $NWB#vicidial_users-modify_sections$NWE
Agent API Access: $NWB#vicidial_users-vdc_agent_api_access$NWE
\n"; echo ""; echo ""; @@ -19749,7 +19829,7 @@ if ($ADD==31) { echo "\n"; } - echo "\n"; + echo "\n"; echo "
  Basic Detail Real-Time Real-Time
\n"; echo "
\n"; @@ -19765,7 +19845,7 @@ if ($ADD==31) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -21405,7 +21485,7 @@ if ($ADD==31) } echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; $o++; } @@ -21610,14 +21690,14 @@ if ($ADD==34) if ($SUB==29) {$camp_listmix_color=$subcamp_color;} else {$camp_listmix_color=$campaigns_color;} echo "
Campaign ID: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
Campaign ID: $campaign_id$NWB#vicidial_campaigns-campaign_id$NWE
Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
Campaign Description: $NWB#vicidial_campaigns-campaign_description$NWE
Campaign Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
  $Xcall_count_today[$o]   DELETE
  DELETE
\n"; - echo ""; + echo ""; echo ""; echo ""; if ($SSoutbound_autodial_active > 0) { echo ""; } - echo "\n"; + echo "\n"; echo "\n"; if ($SSoutbound_autodial_active < 1) { @@ -21634,7 +21714,7 @@ if ($ADD==34) echo "\n"; echo "\n"; echo "
$row[0]: $campaign_id: Basic View Detail View List Mix Real-Time Screen Real-Time Screen  
\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -24230,7 +24310,6 @@ if ($ADD==3111) ### list of agent rank or skill-level for this inbound group - # ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ echo "
\n"; echo "
AGENT RANKS FOR THIS INBOUND GROUP:
\n"; echo "
Campaign ID: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
Campaign ID: $campaign_id$NWB#vicidial_campaigns-campaign_id$NWE
Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
Campaign Description: $row[57]$NWB#vicidial_campaigns-campaign_description$NWE
Campaign Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
\n"; @@ -24742,11 +24821,6 @@ if ($ADD==3311) echo "$NWB#vicidial_inbound_dids-campaign_id$NWE\n"; echo "\n"; - - - - - echo "\n"; echo "
Filter In-Group Phone Code: $NWB#vicidial_inbound_dids-phone_code$NWE
\n"; echo "

\n"; @@ -24772,6 +24846,308 @@ if ($ADD==3311) + +###################### +# ADD=1320 display did remote agent extension override summary +###################### +if ($ADD==1320) + { + echo "
\n"; + echo ""; + + echo "
REMOTE AGENT EXTENSION OVERRIDE LISTINGS:\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT did_id,did_pattern,did_description from vicidial_inbound_dids order by did_id"; + $rslt=mysql_query($stmt, $link); + $dids_to_print = mysql_num_rows($rslt); + + $o=0; + while ($dids_to_print > $o) + { + $row=mysql_fetch_row($rslt); + $dids_id_list[$o] = $row[0]; + $did_pattern_list[$o] = $row[1]; + $did_description_list[$o] = $row[2]; + $o++; + } + + $o=0; + $k=0; + while ($dids_to_print > $o) + { + if (eregi("1$|3$|5$|7$|9$", $k)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo ""; + echo "\n"; + + $k++; + $o++; + } + + echo "
DIDNAMERA-EXTENSMODIFY
$did_pattern_list[$o] $did_description_list[$o] "; + + $stmt="SELECT count(*) from vicidial_did_ra_extensions where did_id='$dids_id_list[$o]';"; + $rslt=mysql_query($stmt, $link); + $didstatus_to_print = mysql_num_rows($rslt); + $p=0; + while ( ($didstatus_to_print > $p) and ($p < 10) ) + { + $row=mysql_fetch_row($rslt); + echo "$row[0] "; + $p++; + } + echo "MODIFY RA-EXTENS
\n"; + } + + + + +###################### +# ADD=3321 modify did remote agent extension override entries in the system +###################### + +if ($ADD==3321) + { + if ( ($LOGmodify_dids==1) and ($SSdid_ra_extensions_enabled > 0) ) + { + echo ""; + + ##### BEGIN Add/Delete/Modify DID Remote Agent Extensions section ##### + if ($stage == 'ADD') + { + $stmt="SELECT count(*) from vicidial_did_ra_extensions where did_id='$did_id' and user_start='$user_start' and extension='$extension';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
DID REMOTE AGENT EXTENSION OVERRIDE NOT ADDED - there is already an entry for this DID with this RA EXTENSION
\n";} + else + { + if ( (strlen($did_id) < 1) or (strlen($user_start) < 2) or (strlen($extension) < 4) ) + { + echo "
DID REMOTE AGENT EXTENSION OVERRIDE NOT ADDED - Please go back and look at the data you entered
\n"; + } + else + { + echo "
DID REMOTE AGENT EXTENSION OVERRIDE ADDED: $did_id - $user_start - $extension
\n"; + + $stmt="INSERT INTO vicidial_did_ra_extensions(did_id,user_start,extension,description,active) values('$did_id','$user_start','$extension','$description','Y');"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='DID_RA-EXTEN', event_type='ADD', record_id='$did_id', event_code='ADMIN ADD DID RA EXTEN', event_sql=\"$SQL_log\", event_notes='DID: $user_start - $extension';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + if ($stage == 'DELETE') + { + $stmt="SELECT count(*) from vicidial_did_ra_extensions where did_id='$did_id' and user_start='$user_start' and extension='$extension';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] < 1) + {echo "
DID REMOTE AGENT EXTENSION OVERRIDE NOT DELETED - this entry does not exist
\n";} + else + { + if ( (strlen($did_id) < 1) or (strlen($user_start) < 2) or (strlen($extension) < 4) ) + { + echo "
DID REMOTE AGENT EXTENSION OVERRIDE NOT DELETED - Please go back and look at the data you entered
\n"; + } + else + { + echo "
DID REMOTE AGENT EXTENSION OVERRIDE DELETED: $did_id - $user_start - $extension
\n"; + + $stmt="DELETE FROM vicidial_did_ra_extensions where did_id='$did_id' and user_start='$user_start' and extension='$extension';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='DID_RA-EXTEN', event_type='DELETE', record_id='$did_id', event_code='ADMIN DELETE DID RA EXTEN', event_sql=\"$SQL_log\", event_notes='DID: $user_start - $extension';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + if ($stage == 'MODIFY') + { + $stmt="SELECT user_start,extension,active,description,call_count_today from vicidial_did_ra_extensions where did_id='$did_id' order by user_start,extension"; + $rslt=mysql_query($stmt, $link); + $raextens_to_print = mysql_num_rows($rslt); + $o=0; + while ($raextens_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $Xuser_start[$o] = $rowx[0]; + $Xextension[$o] = $rowx[1]; + $Xactive[$o] = $rowx[2]; + $Xdescription[$o] = $rowx[3]; + $Xcall_count_today[$o] = $rowx[4]; + $o++; + } + + $o=0; + while ($raextens_to_print > $o) + { + $Factive_value=''; + $Fdescription_value=''; + $Factive = "active_$Xuser_start[$o]_$Xextension[$o]"; + $Fdescription = "description_$Xuser_start[$o]_$Xextension[$o]"; + + if (isset($_GET[$Factive])) {$Factive_value=$_GET[$Factive];} + elseif (isset($_POST[$Factive])) {$Factive_value=$_POST[$Factive];} + if (isset($_GET[$Fdescription])) {$Fdescription_value=$_GET[$Fdescription];} + elseif (isset($_POST[$Fdescription])) {$Fdescription_value=$_POST[$Fdescription];} + $Fdescription_value = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$Fdescription_value); + $Factive_value = ereg_replace("[^A-Z]","",$Factive_value); + + # echo "$did_id - $Xuser_start[$o] - $Xextension[$o] - $Factive($Factive_value|$Xactive[$o]) - $Fdescription($Fdescription_value|$Xdescription[$o])
"; + + if ( ($Factive_value == $Xactive[$o]) and ($Fdescription_value == $Xdescription[$o]) ) + { + # echo "
DID REMOTE AGENT EXTENSION OVERRIDE NOT MODIFIED - Please go back and look at the data you entered
\n"; + } + else + { + echo "DID REMOTE AGENT EXTENSION OVERRIDE MODIFIED: $Xuser_start[$o] - $Xextension[$o]
\n"; + + $stmt="UPDATE vicidial_did_ra_extensions SET active='$Factive_value',description='$Fdescription_value' WHERE did_id='$did_id' and user_start='$Xuser_start[$o]' and extension='$Xextension[$o]';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='DID_RA-EXTEN', event_type='MODIFY', record_id='$did_id', event_code='ADMIN MODIFY DID RA EXTEN', event_sql=\"$SQL_log\", event_notes='DID: $user_start - $extension';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } + $o++; + } + } + ##### END Add/Delete/Modify DID Remote Agent Extensions section ##### + + + if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) + { + $modify_url = "$PHP_SELF?ADD=3321&did_id=$did_id"; + $modify_footer_refresh=1; + } + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; @@ -28016,7 +28395,7 @@ if ($ADD==311111111111111) if ($ADD==321111111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_statuses==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { @@ -28147,7 +28526,7 @@ if ($ADD==321111111111111) if ($ADD==331111111111111) { - if ($LOGmodify_servers==1) + if ( ($LOGmodify_servers==1) or ($LOGmodify_statuses==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { @@ -30076,7 +30455,9 @@ if ($ADD==720000000000000) $sectionSQL = "event_section='$category'"; if (preg_match("/CAMPAIGNS/",$category)) - {$sectionSQL = "event_section IN('CAMPAIGNS','CAMPAIGN_SURVEY','CAMPAIGN_LISTMIX','CAMPAIGN_PRESET','CAMPAIGN_QC','CAMPAIGN_PAUSECODE','CAMPAIGN_RECYCLE','CAMPAIGN_HOTKEY','CAMPAIGN_STATUS','CAMPAIGN_DIALSTATUSES','CAMPAIGN_DIALSTATUS')";} + {$sectionSQL = "event_section IN('CAMPAIGNS','CAMPAIGN_SURVEY','CAMPAIGN_LISTMIX','CAMPAIGN_PRESET','CAMPAIGN_QC','CAMPAIGN_PAUSECODE','CAMPAIGN_RECYCLE','CAMPAIGN_HOTKEY','CAMPAIGN_STATUS','CAMPAIGN_DIALSTATUSES','CAMPAIGN_DIALSTATUS','CAMPAIGN_AC-CID')";} + if (preg_match("/DIDS/",$category)) + {$sectionSQL = "event_section IN('DIDS','DID_RA-EXTEN')";} $stmt="SELECT admin_log_id,event_date,user,ip_address,event_section,event_type,record_id,event_code from vicidial_admin_log where $sectionSQL and record_id='$stage' order by event_date desc limit 10000;"; $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/trunk/www/vicidial/admin_header.php b/agc_2-X/trunk/www/vicidial/admin_header.php index ee09deea..c98c282f 100644 --- a/agc_2-X/trunk/www/vicidial/admin_header.php +++ b/agc_2-X/trunk/www/vicidial/admin_header.php @@ -32,6 +32,7 @@ # 110322-1228 - Added user ID logged in as next to Logout link # 110624-1439 - Added Screen Labels sub-section to Admin # 110831-2048 - Added AC-CID to campaign submenu +# 110922-1707 - Added RA-EXTEN to campaign submenu # @@ -1228,19 +1229,31 @@ $SScustom_fields_enabled = $row[3]; >>>>>>>>>>>
\n"; + echo ""; + echo "

REMOTE AGENT EXTENSION OVERRIDES FOR THIS DID:   $NWB#vicidial_did_ra_extensions$NWE
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + + $stmt="SELECT user_start,extension,active,description,call_count_today from vicidial_did_ra_extensions where did_id='$did_id' order by user_start,extension"; + $rslt=mysql_query($stmt, $link); + $raextens_to_print = mysql_num_rows($rslt); + $o=0; + while ($raextens_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $Xuser_start[$o] = $rowx[0]; + $Xextension[$o] = $rowx[1]; + $Xactive[$o] = $rowx[2]; + $Xdescription[$o] = $rowx[3]; + $Xcall_count_today[$o] = $rowx[4]; + $o++; + } + + $o=0; + while ($raextens_to_print > $o) + { + $ct = ($o + 1); + if ($ct == '1') + { + $bgcolor='bgcolor="#9BB9FB"'; + $bgac = $Xuser_start[$o]; + } + else + { + if ($Xuser_start[$o] != $bgac) + { + if (eregi("1$|3$|5$|7$|9$", $bgct)) + {$bgcolor='bgcolor="#9BB9FB"';} + else + {$bgcolor='bgcolor="#B9CBFD"';} + $bgct++; + $bgac = $Xuser_start[$o]; + } + } + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + $o++; + } + + echo "
#USER STARTEXTENSIONDESCRIPTIONACTIVECALLSDELETE
  $ct   $Xuser_start[$o]   $Xextension[$o]\n"; + if ($Xactive[$o] == 'Y') + { + echo ""; + } + else + { + echo ""; + } + echo "   $Xcall_count_today[$o]   DELETE
\n"; + echo "

\n"; + + echo "
ADD NEW REMOTE AGENT EXTENSION OVERRIDE
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "User Start: \n"; + echo "Extension:
\n"; + echo "Description: \n"; + echo "
\n"; + + echo "

\n"; + + +# ZZZZZZZZZZZZZZZZZZZZ + echo "

MODIFY THIS DID\n"; + + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin changes to this DID
\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } + } + + + + + ###################### # ADD=3511 modify call menu info in the system ###################### @@ -26137,7 +26513,7 @@ if ($ADD==3111111111) if ($ADD==331111111) { - if ($LOGmodify_call_times==1) + if ( ($LOGmodify_call_times==1) or ($LOGmodify_shifts==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { @@ -26254,7 +26630,7 @@ if ($ADD==331111111) if ($ADD==31111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { @@ -26426,7 +26802,7 @@ if ($ADD==31111111111) if ($ADD==32111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { @@ -26503,7 +26879,7 @@ if ($ADD==32111111111) if ($ADD==33111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { @@ -26992,7 +27368,7 @@ if ($ADD==331111111111) if ($ADD==341111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_carriers==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { @@ -27081,7 +27457,7 @@ if ($ADD==341111111111) if ($ADD==351111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_tts==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { @@ -27139,7 +27515,7 @@ if ($ADD==351111111111) if ($ADD==361111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_moh==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { @@ -27222,7 +27598,7 @@ if ($ADD==361111111111) if ($ADD==371111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_voicemail==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { @@ -27304,7 +27680,7 @@ if ($ADD==371111111111) ###################### if ($ADD==381111111111) { - if ($LOGast_admin_access==1) + if ( ($LOGast_admin_access==1) or ($LOGmodify_labels==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { @@ -27566,7 +27942,7 @@ if ($ADD==311111111111111) $row=mysql_fetch_row($rslt); $vicidial_nanpa_prefix_codes_count = $row[0]; - $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,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,custom_fields_enabled,slave_db_server,reports_use_slave_db,webphone_systemkey,first_login_trigger,default_phone_registration_password,default_phone_login_password,default_server_password,admin_modify_refresh,nocache_admin,generate_cross_server_exten,queuemetrics_addmember_enabled,queuemetrics_dispo_pause,label_hide_field_logs,queuemetrics_pe_phone_append,test_campaign_calls,agents_calls_reset,default_voicemail_timezone,default_local_gmt,noanswer_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_agent_log,campaign_cid_areacodes_enabled,pllb_grouping_limit 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,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,custom_fields_enabled,slave_db_server,reports_use_slave_db,webphone_systemkey,first_login_trigger,default_phone_registration_password,default_phone_login_password,default_server_password,admin_modify_refresh,nocache_admin,generate_cross_server_exten,queuemetrics_addmember_enabled,queuemetrics_dispo_pause,label_hide_field_logs,queuemetrics_pe_phone_append,test_campaign_calls,agents_calls_reset,default_voicemail_timezone,default_local_gmt,noanswer_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_agent_log,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled from system_settings;"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $version = $row[0]; @@ -27671,6 +28047,7 @@ if ($ADD==311111111111111) $did_agent_log = $row[99]; $campaign_cid_areacodes_enabled = $row[100]; $pllb_grouping_limit = $row[101]; + $did_ra_extensions_enabled = $row[102]; echo "
MODIFY VICIDIAL SYSTEM SETTINGS
\n"; echo "\n"; @@ -27844,6 +28221,8 @@ if ($ADD==311111111111111) echo "
Enable Campaign Areacode CID: $NWB#settings-campaign_cid_areacodes_enabled$NWE
Enable Remote Agent Extension Overrides: $NWB#settings-did_ra_extensions_enabled$NWE
First Login Trigger: $first_login_trigger   $NWB#settings-first_login_trigger$NWE
Default Phone Registration Password: $NWB#settings-default_phone_registration_password$NWE     Strength:
  > Add A New In-Group
  - > Copy In-Group
+ > Copy In-Group +
  > Show DIDs
  > Add A New DID
  - > Copy DID
+ > Copy DID + 0) + { + ?> +
  + >RA Extensions + +
  > Show Call Menus
  > Add A New Call Menu
  - > Copy Call Menu
+ > Copy Call Menu +
  > Filter Phone Groups
  diff --git a/agc_2-X/trunk/www/vicidial/audio_store.php b/agc_2-X/trunk/www/vicidial/audio_store.php index 1a8e7bcb..6c9548e6 100644 --- a/agc_2-X/trunk/www/vicidial/audio_store.php +++ b/agc_2-X/trunk/www/vicidial/audio_store.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2011 Matt Florell LICENSE: AGPLv2 # # Central Audio Storage script # @@ -9,10 +9,11 @@ # 90511-1325 - First build # 90618-0640 - Fix for users going through proxy or tunnel # 100401-1037 - remove spaces and special characters from filenames, admin log uploads +# 110922-2331 - Added modify_audiostore user option for access # -$version = '2.2.0-3'; -$build = '100401-1037'; +$version = '2.4-4'; +$build = '110922-2331'; $MT[0]=''; @@ -126,7 +127,7 @@ if ( (!preg_match("/\|$ip\|/", $server_ips)) and ($formIPvalid < 1) ) $PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_campaigns='1'"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and ( (modify_campaigns='1') or (modify_audiostore='1') )"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt);