diff --git a/UPGRADE b/UPGRADE index 25caf8c0..679dab36 100644 --- a/UPGRADE +++ b/UPGRADE @@ -794,6 +794,16 @@ OTHER CHANGES: crontab after-hours to gather the statistics (this example is 7:01am): 1 7 * * * /usr/share/astguiclient/AST_dialer_inventory_snapshot.pl -q --override-24hours +182. Separated the auto-generated dialplan into different contexts to allow for + easier segmentation of dialing permissions using the Phone Context and + custom Call Menus. Here is a list of the new contexts that are now below + the vicidial-auto context: + vicidial-auto-system-setting-custom + vicidial-auto-server-custom + vicidial-auto-external + vicidial-auto-internal + vicidial-auto-phones + diff --git a/bin/ADMIN_keepalive_ALL.pl b/bin/ADMIN_keepalive_ALL.pl index 597137f2..6c54e600 100644 --- a/bin/ADMIN_keepalive_ALL.pl +++ b/bin/ADMIN_keepalive_ALL.pl @@ -69,6 +69,7 @@ # 111004-2333 - Added Call Menu option for update of fields # 111221-1454 - Added resetting of max stats records at timeclock end of day # 120124-1032 - Added Answer to all call menus at the top +# 120209-1525 - Separated all vicidial-auto dialplan contexts into their own contexts to allow for more control of dialing access through phones # $DB=0; # Debug flag @@ -2514,16 +2515,48 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r print ext "; WARNING- THIS FILE IS AUTO-GENERATED BY VICIDIAL, ANY EDITS YOU MAKE WILL BE LOST\n"; print ext "$ext\n"; print ext "$call_menu_ext\n"; + print ext "\n"; + if (length($SScustom_dialplan_entry)>5) + { + print ext "[vicidial-auto-system-setting-custom]\n"; + print ext 'exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})'; + print ext "\n"; + print ext "; System Setting Custom Dialplan\n$SScustom_dialplan_entry\n\n"; + } + if (length($SERVERcustom_dialplan_entry)>5) + { + print ext "[vicidial-auto-server-custom]\n"; + print ext 'exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})'; + print ext "\n"; + print ext "; Server Custom Dialplan\n$SERVERcustom_dialplan_entry\n\n"; + } + print ext "[vicidial-auto-external]\n"; + print ext 'exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})'; + print ext "\n"; + print ext "$Lext\n"; + + print ext "[vicidial-auto-internal]\n"; + print ext 'exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})'; + print ext "\n"; + print ext "$Vext\n"; + + print ext "[vicidial-auto-phones]\n"; + print ext 'exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})'; + print ext "\n"; + print ext "$Pext\n"; + print ext "[vicidial-auto]\n"; print ext 'exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})'; print ext "\n"; + print ext "\n"; if (length($SScustom_dialplan_entry)>5) - {print ext "; System Setting Custom Dialplan\n$SScustom_dialplan_entry\n\n";} + {print ext "include => vicidial-auto-system-setting-custom\n";} if (length($SERVERcustom_dialplan_entry)>5) - {print ext "; Server Custom Dialplan\n$SERVERcustom_dialplan_entry\n\n";} - print ext "$Lext\n"; - print ext "$Vext\n"; - print ext "$Pext\n"; + {print ext "include => vicidial-auto-server-custom\n";} + print ext "include => vicidial-auto-external\n"; + print ext "include => vicidial-auto-internal\n"; + print ext "include => vicidial-auto-phones\n"; + print ext "\n"; print ext "\n; END OF FILE\n"; print iax "; WARNING- THIS FILE IS AUTO-GENERATED BY VICIDIAL, ANY EDITS YOU MAKE WILL BE LOST\n"; diff --git a/docs/QUEUEMETRICS.txt b/docs/QUEUEMETRICS.txt index d92f23d2..5a0b23a5 100644 --- a/docs/QUEUEMETRICS.txt +++ b/docs/QUEUEMETRICS.txt @@ -23,6 +23,9 @@ As of 2009-11-23, DID and IVR logging through QueueMetrics queue_log is now part As of 2010-03-09, queuemetrics_loginout system settings option was added to allow for slightly different logging of logins and logouts. STANDARD will use standard AGENTLOGIN AGENTLOGOFF, CALLBACK will use AGENTCALLBACKLOGIN and AGENTCALLBACKLOGOFF that QM will parse differently. +NOTE: having a large number of calls in queue can lead to significant load issues on the QM database server + + Entries you should have in your crontab on one server: ### fix the vicidial_agent_log once every hour and the full day run at night diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 4536c050..51db931a 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -2721,8 +2721,10 @@ INSERT INTO vicidial_drop_rate_groups SET group_id='110'; INSERT INTO vicidial_process_triggers SET trigger_id='LOAD_LEADS',server_ip='10.10.10.15',trigger_name='Load Leads',trigger_time='2009-01-01 00:00:00',trigger_run='0',trigger_lines='/usr/share/astguiclient/VICIDIAL_IN_new_leads_file.pl'; INSERT INTO vicidial_call_menu SET menu_id='defaultlog',menu_name='logging of all outbound calls from agent phones',menu_prompt='sip-silence',menu_timeout='20',menu_timeout_prompt='NONE',menu_invalid_prompt='NONE',menu_repeat='0',menu_time_check='0',call_time_id='',track_in_vdac='0',custom_dialplan_entry='exten => _X.,1,AGI(agi-NVA_recording.agi,BOTH------Y---Y---Y)\nexten => _X.,n,Goto(default,${EXTEN},1)',tracking_group=''; +INSERT INTO vicidial_call_menu SET menu_id='default---agent',menu_name='agent phones restricted to only internal extensions',menu_prompt='sip-silence',menu_timeout='20',menu_timeout_prompt='NONE',menu_invalid_prompt='NONE',menu_repeat='0',menu_time_check='0',call_time_id='',track_in_vdac='0',custom_dialplan_entry='include => vicidial-auto-internal\ninclude => vicidial-auto-phones\n',tracking_group=''; INSERT INTO vicidial_call_menu_options SET menu_id='defaultlog',option_value='TIMEOUT',option_description='hangup',option_route='HANGUP',option_route_value='vm-goodbye',option_route_value_context=''; +INSERT INTO vicidial_call_menu_options SET menu_id='default---agent',option_value='TIMEOUT',option_description='hangup',option_route='HANGUP',option_route_value='vm-goodbye',option_route_value_context=''; INSERT INTO vicidial_scripts (script_id,script_name,script_comments,active,script_text) values('CALLNOTES','Call Notes and Appointment Setting','','Y',''); diff --git a/www/vicidial/admin_phones_bulk_insert.php b/www/vicidial/admin_phones_bulk_insert.php index d6c4fb2c..343c084a 100644 --- a/www/vicidial/admin_phones_bulk_insert.php +++ b/www/vicidial/admin_phones_bulk_insert.php @@ -9,10 +9,11 @@ # 101230-0501 - First Build # 110712-0932 - Added extension suffix exception for non-SIP/IAX phones, added HELP # 120104-2023 - Added webphone options +# 120209-1545 - Added phone context option # -$admin_version = '2.4-3'; -$build = '120104-2023'; +$admin_version = '2.4-4'; +$build = '120209-1545'; require("dbconnect.php"); @@ -50,6 +51,8 @@ if (isset($_GET["webphone_auto_answer"])) {$webphone_auto_answer=$_GET["webpho elseif (isset($_POST["webphone_auto_answer"])) {$webphone_auto_answer=$_POST["webphone_auto_answer"];} if (isset($_GET["use_external_server_ip"])) {$use_external_server_ip=$_GET["use_external_server_ip"];} elseif (isset($_POST["use_external_server_ip"])){$use_external_server_ip=$_POST["use_external_server_ip"];} +if (isset($_GET["phone_context"])) {$phone_context=$_GET["phone_context"];} + elseif (isset($_POST["phone_context"])) {$phone_context=$_POST["phone_context"];} if (strlen($action) < 2) @@ -71,11 +74,12 @@ if ($non_latin < 1) $alias_option = ereg_replace("[^-_0-9a-zA-Z]","",$alias_option); $alias_suffix = ereg_replace("[^0-9a-zA-Z]","",$alias_suffix); $protocol = ereg_replace("[^-_0-9a-zA-Z]","",$protocol); - $local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt); + $local_gmt = ereg_replace("[^- \.\,\_0-9a-zA-Z]","",$local_gmt); $is_webphone = ereg_replace("[^NY]","",$is_webphone); $webphone_dialpad = ereg_replace("[^-_0-9a-zA-Z]","",$webphone_dialpad); $webphone_auto_answer = ereg_replace("[^NY]","",$webphone_auto_answer); $use_external_server_ip = ereg_replace("[^NY]","",$use_external_server_ip); + $phone_context = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_context); } # end of non_latin else { @@ -215,6 +219,11 @@ if ($action == "HELP") Local GMT - This is the time zone that all of the phones will be created with.

+ +
+ Phone Context - This is the dial plan context that this phone will use to dial out. If you are running a call center and you do not want your agents to be able to dial out outside of the ViciDial applicaiton for example, then you would set this field to a dialplan context that does not exist, something like agent-nodial. default is default. +

+

@@ -306,6 +315,7 @@ if ($action == "BLANK") echo "Alias Suffix: $NWB#alias_suffix$NWE \n"; echo "Client Protocol: $NWB#protocol$NWE \n"; echo "Local GMT: (Do NOT Adjust for DST) $NWB#gmt$NWE \n"; + echo "Phone Context: $NWB#phone_context$NWE \n"; echo "Set As Webphone: $NWB#is_webphone$NWE\n"; echo "Webphone Dialpad: $NWB#webphone_dialpad$NWE\n"; echo "Webphone Auto-Answer: $NWB#webphone_auto_answer$NWE\n"; @@ -424,6 +434,8 @@ if ($action == "ADD_PHONES_SUBMIT") {$dialplan_number = "$dialplan_prefix$PN[$p]";} else {$dialplan_number = "$PN[$p]";} + if (strlen($phone_context) < 1) + {$phone_context = 'default';} $dialplan_number = preg_replace('/\D/', '', $dialplan_number); $voicemail_id = $PN[$p]; $voicemail_id = preg_replace('/\D/', '', $voicemail_id); $phone_server_ip = $SN[$s]; @@ -431,7 +443,7 @@ if ($action == "ADD_PHONES_SUBMIT") $phone_type = "CCagent"; $fullname = "ext $PN[$p]"; - $stmt = "INSERT INTO phones (extension,dialplan_number,voicemail_id,server_ip,login,pass,status,active,phone_type,fullname,protocol,local_gmt,outbound_cid,conf_secret,is_webphone,webphone_dialpad,webphone_auto_answer,use_external_server_ip) values('$extension','$dialplan_number','$voicemail_id','$phone_server_ip','$login','$pass','ACTIVE','Y','$phone_type','$fullname','$protocol','$local_gmt','0000000000','$conf_secret','$is_webphone','$webphone_dialpad','$webphone_auto_answer','$use_external_server_ip');"; + $stmt = "INSERT INTO phones (extension,dialplan_number,voicemail_id,server_ip,login,pass,status,active,phone_type,fullname,protocol,local_gmt,outbound_cid,conf_secret,is_webphone,webphone_dialpad,webphone_auto_answer,use_external_server_ip,phone_context) values('$extension','$dialplan_number','$voicemail_id','$phone_server_ip','$login','$pass','ACTIVE','Y','$phone_type','$fullname','$protocol','$local_gmt','0000000000','$conf_secret','$is_webphone','$webphone_dialpad','$webphone_auto_answer','$use_external_server_ip','$phone_context');"; $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); if ($DB > 0) {echo "$s|$p|$SN[$s]|$PN[$p]|$affected_rows|$stmt\n
";}