diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index 352d7912..2802760a 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -70,6 +70,9 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom script is only for multi-server systems and is started from new ADMIN_keepalive_ALL.pl script with option 7 in astguiclient.conf +12. Added the ability to restrict agent logins by user group to a specific set + of campaigns. This is definable in the USER GROUPS section of admin.php + diff --git a/agc_2-X/trunk/docs/BASE_INSTALL.txt b/agc_2-X/trunk/docs/BASE_INSTALL.txt index 4cf64d04..77777b45 100644 --- a/agc_2-X/trunk/docs/BASE_INSTALL.txt +++ b/agc_2-X/trunk/docs/BASE_INSTALL.txt @@ -72,20 +72,16 @@ cd ../asterisk-1.2.12.1 wget http://www.eflo.net/files/amd2.conf mkdir /etc/asterisk mv amd2.conf /etc/asterisk/amd.conf - *OPTIONAL*(1.2.12.1) apply the meetme volume control patch + *OPTIONAL*(1.2.12.1 and 1.2.13) apply the meetme volume control patch wget http://www.eflo.net/files/meetmeadmin_volume_control.patch patch -p1 < ./meetmeadmin_volume_control.patch - - File to patch: app_meetme.c.c + - File to patch: app_meetme.c cd ../ (1.2 tree) apply the cli delimiter patch wget http://www.eflo.net/files/cli_chan_concise_delimiter.patch patch -p1 < ./cli_chan_concise_delimiter.patch - File to patch: cli.c - (1.2.12 only, not for 1.2.12.1) - channel.c bug fix - **THERE IS NO FIX FOR ASTERISK 1.2.11** - wget http://www.eflo.net/files/channel.c-42600.patch - patch -p1 < ./channel.c-42600.patch - - File to patch: channel.c make clean make @@ -256,6 +252,8 @@ insert into phones (extension, dialplan_number, voicemail_id, phone_ip, computer insert into vicidial_users (user,pass,full_name,user_level,user_group,load_leads,campaign_detail,ast_admin_access) values('6666','1234','Admin','9','ADMIN','1','1','1'); +insert into vicidial_user_groups (user_group,group_name,allowed_campaigns) values('ADMIN','Administrators',' -ALL-CAMPAIGNS- - -'); + insert into conferences values('8600001','10.10.10.15',''); insert into conferences values('8600002','10.10.10.15',''); insert into conferences values('8600003','10.10.10.15',''); diff --git a/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt b/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt index f029e32d..476ec5c5 100644 --- a/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt +++ b/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt @@ -829,20 +829,16 @@ with the following patch: - wget http://www.eflo.net/files/amd2.conf - mkdir /etc/asterisk - mv amd2.conf /etc/asterisk/amd.conf - -*OPTIONAL*(1.2.12.1) apply the meetme volume control patch + -*OPTIONAL*(1.2.12.1 or 1.2.14) apply the meetme volume control patch - wget http://www.eflo.net/files/meetmeadmin_volume_control.patch - patch -p1 < ./meetmeadmin_volume_control.patch - - File to patch: app_meetme.c.c + - File to patch: app_meetme.c - cd ../ -(1.2 tree) apply the cli delimiter patch - wget http://www.eflo.net/files/cli_chan_concise_delimiter.patch - patch -p1 < ./cli_chan_concise_delimiter.patch - File to patch: cli.c - -(1.2.12) - channel.c bug fix - **THERE IS NO FIX FOR ASTERISK 1.2.11** - - wget http://www.eflo.net/files/channel.c-42600.patch - - patch -p1 < ./channel.c-42600.patch - - File to patch: channel.c - make clean - make @@ -1598,6 +1594,8 @@ insert into phones (extension, dialplan_number, voicemail_id, phone_ip, computer insert into vicidial_users (user,pass,full_name,user_level,user_group,load_leads,campaign_detail,ast_admin_access) values('6666','1234','Admin','9','ADMIN','1','1','1'); +insert into vicidial_user_groups (user_group,group_name,allowed_campaigns) values('ADMIN','Administrators',' -ALL-CAMPAIGNS- - -'); + insert into conferences values('8600001','10.10.10.15',''); insert into conferences values('8600002','10.10.10.15',''); insert into conferences values('8600003','10.10.10.15',''); 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 356c8eed..5b81c4cc 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -431,7 +431,8 @@ index (user) CREATE TABLE vicidial_user_groups ( user_group VARCHAR(20) NOT NULL, -group_name VARCHAR(40) NOT NULL +group_name VARCHAR(40) NOT NULL, +allowed_campaigns TEXT ); CREATE TABLE vicidial_campaigns ( diff --git a/agc_2-X/trunk/extras/upgrade_2.0.2.sql b/agc_2-X/trunk/extras/upgrade_2.0.2.sql index f8d014f3..5968ee20 100644 --- a/agc_2-X/trunk/extras/upgrade_2.0.2.sql +++ b/agc_2-X/trunk/extras/upgrade_2.0.2.sql @@ -29,3 +29,8 @@ ALTER TABLE vicidial_auto_calls ADD last_update_time TIMESTAMP; ALTER TABLE vicidial_auto_calls ADD index (last_update_time); ALTER TABLE vicidial_auto_calls MODIFY call_type ENUM('IN','OUT','OUTBALANCE') default 'OUT'; + +ALTER TABLE vicidial_user_groups ADD allowed_campaigns TEXT; + +UPDATE vicidial_user_groups SET allowed_campaigns=' -ALL-CAMPAIGNS- - -'; + diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.2.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.2.txt index 24b16642..88de3b0b 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.2.txt +++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.2.txt @@ -3,6 +3,7 @@ VICIDIAL Server Trunks allows you to restrict the outgoing lines that are used on this server for campaign dialing on a per-campaign basis. You have the option to reserve a specific number of lines to be used by only one campaign as well as allowing that campaign to run over its reserved lines into whatever lines remain open, as long at the total lines used by vicidial on this server is less than the Max VICIDIAL Trunks setting. Not having any of these records will allow the campaign that dials the line first to have as many lines as it can get under the Max VICIDIAL Trunks setting|| VICIDIAL Balance Dialing -<\/B> Setting this field to Y will allow the server to place balance calls for campaigns in VICIDIAL so that the defined dial level can be met even if there are no agents logged into that campaign on this server. Default is N|| VICIDIAL Balance Offlimits -<\/B> This setting defines the number of trunks to not allow VICIDIAL balance dialing to use. For example if you have 40 max vicidial trunks and balance offlimits is set to 10 you will only be able to use 30 trunk lines for VICIDIAL balance dialing. Default is 0|| +Allowed Campaigns -<\/B> This is a selectable list of Campaigns to which members of this user group can log in to. The ALL-CAMPAIGNS option allows the users in this group to see and log in to any campaign on the system|| VICIDIAL SERVER TRUNK RECORD NOT ADDED|| there is already a server-trunk record for this campaign|| the number of vicidial trunks is too high|| @@ -28,7 +29,9 @@ VDAC NOT CLEARED FOR CAMPAIGN|| LAST VDAC RECORD CLEARED FOR CAMPAIGN|| VDAC CLEAR CONFIRMATION|| Click here to delete the oldest LIVE record in VDAC for|| - +Allowed Campaigns|| +USERS CAN VIEW ANY CAMPAIGN|| +Campaign Not Allowed|| ############################################################ CLIENT @@ -38,7 +41,7 @@ VOLUME|| ############################################################ MANAGER Manual Add notes on balance dialing in Multi-server setups - +Add notes for user groups ############################################################ AGENT Manual diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 083ef00b..794049fb 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -127,6 +127,7 @@ # 60906-1152 - Added Previous CallBack info display span # 60906-1715 - Allow for Local phone extension conferences # 61004-1729 - Add ability to control volume per channel in "calls in this session" +# 61122-1341 - Added vicidial_user_groups allowed_campaigns restrictions # require("dbconnect.php"); @@ -172,8 +173,8 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $forever_stop=0; -$version = '2.0.100'; -$build = '61004-1729'; +$version = '2.0.101'; +$build = '61122-1341'; if ($force_logout) { @@ -442,7 +443,7 @@ $VDloginDISPLAY=0; $login=strtoupper($VD_login); $password=strtoupper($VD_pass); ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; @@ -455,6 +456,7 @@ $VDloginDISPLAY=0; $VU_vicidial_recording=$row[7]; $VU_vicidial_transfers=$row[8]; $VU_closer_default_blended=$row[9]; + $VU_user_group=$row[10]; if ($WeBRooTWritablE > 0) { fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); @@ -464,6 +466,34 @@ $VDloginDISPLAY=0; while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} + $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$VU_user_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGallowed_campaigns =$row[0]; + + if ( (!eregi("$VD_campaign",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) + { + echo "
| \n"; + echo "\n"; + echo " |