Added did_id, did_extension, did_pattern and did_description as webform and script variables in the agent screen.

Added "CallCard Search" as a report in the reports screen, level 7 users can now search-only the CallCards
Added PIN number search to CallCard Admin
Fixed issue with AA status auto-alt-dialing

git-svn-id: svn://192.168.202.10@1505 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-08-24 01:34:50 +00:00
parent c5821a6db8
commit 4facaff6a6
10 changed files with 239 additions and 31 deletions
+3
View File
@@ -296,6 +296,9 @@ OTHER CHANGES:
63. Added Manual Dial Prefix to allow for a different dial path for manual dial
calls placed through the agent interface.
64. Added did_id, did_extension, did_pattern and did_description as webform and
script variables in the agent screen.
+5 -4
View File
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
# VD_amd.agi version 2.2.0
# VD_amd.agi version 2.4
#
# runs after a call goes through AMD in extensions.conf to send the call on to
# it's proper destination, or when agent sends to VM message
@@ -36,6 +36,7 @@
# 100205-1025 - Fixed CPD send to message
# 100327-0819 - Fixed issue with Manual dial treansfers
# 100430-1606 - Added list_id update to vicidial_log updates
# 100823-0850 - Changed vac to UPDATE for Auto-alt-dial to function properly
#
$script = 'VD_amd.agi';
@@ -332,10 +333,10 @@ else
}
$sthA->finish();
########## DELETE vicidial_auto_calls entry ##########
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' order by auto_call_id desc limit 1;";
########## UPDATE vicidial_auto_calls entry ##########
$stmtA = "UPDATE vicidial_auto_calls set status='AA' where callerid='$callerid' order by auto_call_id desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAC record deleted: |$affected_rows| |$VD_lead_id|$uniqueid|$VD_callerid"; &agi_output;}
if ($AGILOG) {$agi_string = "-- VDAC record updated: |$affected_rows| |$VD_lead_id|$uniqueid|$VD_callerid"; &agi_output;}
########## FIND AND UPDATE vicidial_log ##########
$stmtA = "SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$VD_lead_id' order by call_date desc limit 1;";
+3
View File
@@ -482,6 +482,9 @@ PHASE 6: ADDING CRONTAB ENTRIES FOR ASTGUICLIENT/VICIDIAL SCRIPTS
29 0 * * * /usr/bin/find /var/log/asterisk -maxdepth 3 -type f -mtime +2 -print | xargs rm -f
30 0 * * * /usr/bin/find / -maxdepth 1 -name "screenlog.0*" -mtime +4 -print | xargs rm -f
### remove text to speech file more than 4 days old
#20 0 * * * /usr/bin/find /var/lib/asterisk/sounds/tts/ -maxdepth 2 -type f -mtime +4 -print | xargs rm -f
- once your system starts up you can attach to the screen running asterisk by
+3
View File
@@ -2466,6 +2466,9 @@ SUBPHASE 6.5: setting up astguiclient scripts for continuous running
29 0 * * * /usr/bin/find /var/log/asterisk -maxdepth 3 -type f -mtime +2 -print | xargs rm -f
30 0 * * * /usr/bin/find / -maxdepth 1 -name "screenlog.0*" -mtime +4 -print | xargs rm -f
### remove text to speech file more than 4 days old
#20 0 * * * /usr/bin/find /var/lib/asterisk/sounds/tts/ -maxdepth 2 -type f -mtime +4 -print | xargs rm -f
@@ -379,6 +379,8 @@ Show Presets Stats||
AGENT DIAL PRESETS NAMES||
Manual Dial Prefix||
This optional field allows you to set the dial prefix to be used only when placing manual dial calls from the agent interface, such as using the MANUAL DIAL feature, or Dial Next Number when in the MANUAL dial method, or manual alt number dialing, or scheduled user-only callbacks. Default is empty for disabled, which will use the Dial Prefix defined in the field above. This option does not interfere with the 3way Dial Prefix option||
Here is a list of reserved phrases that cannot be used as menu IDs||
Call Menu ID cannot use reserved words||
AST_VICIDIAL_ingrouplist.php
+36 -6
View File
@@ -250,11 +250,12 @@
# 100624-1401 - Fix for dispo call url bug related to dialed number and label
# 100625-0915 - Fix for auto-dial bug for presets and timer actions
# 100712-1447 - Added entry_list_id field to vicidial_list to preserve link to custom fields if any
# 100803-0822 - Added CAMPLISTS_ALL for manual_dial_filter(issue #369
# 100803-0822 - Added CAMPLISTS_ALL for manual_dial_filter(issue #369)
# 100823-1612 - Added DID variables on inbound calls
#
$version = '2.4-158';
$build = '100803-0822';
$version = '2.4-159';
$build = '100823-1612';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=333;
$one_mysql_log=0;
@@ -4232,7 +4233,7 @@ if ($ACTION == 'VDADcheckINCOMING')
}
}
echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|X|X|||||$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number||||$VDCL_timer_action_destination|\n|\n";
echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|X|X|||||$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number||||$VDCL_timer_action_destination|||||\n|\n";
if (ereg('X',$dialed_label))
{
@@ -4508,9 +4509,38 @@ if ($ACTION == 'VDADcheckINCOMING')
}
}
$DID_id='';
$DID_extension='';
$DID_pattern='';
$DID_description='';
$stmt = "SELECT did_id,extension from vicidial_did_log where uniqueid='$uniqueid' order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
$VDIDL_ct = mysql_num_rows($rslt);
if ($VDIDL_ct > 0)
{
$row=mysql_fetch_row($rslt);
$DID_id = $row[0];
$DID_extension = $row[1];
$stmt = "SELECT did_pattern,did_description from vicidial_inbound_dids where did_id='$DID_id' limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
$VDIDL_ct = mysql_num_rows($rslt);
if ($VDIDL_ct > 0)
{
$row=mysql_fetch_row($rslt);
$DID_pattern = $row[0];
$DID_description = $row[1];
}
}
### if web form is set then send on to vicidial.php for override of WEB_FORM address
if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|\n";}
else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|\n";}
if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|$DID_id|$DID_extension|$DID_pattern|$DID_description|\n";}
else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|$DID_id|$DID_extension|$DID_pattern|$DID_description|\n";}
$stmt = "SELECT full_name from vicidial_users where user='$tsr';";
if ($DB) {echo "$stmt\n";}
+19 -2
View File
@@ -12,10 +12,11 @@
# 91211-1103 - Added user_custom_... variables
# 100116-0702 - Added preset variables
# 100127-1611 - Added ignore_list_script_override option
# 100823-1644 - Added DID variables
#
$version = '2.2.0-6';
$build = '100127-1611';
$version = '2.4';
$build = '100823-1644';
require("dbconnect.php");
@@ -161,6 +162,14 @@ if (isset($_GET["preset_dtmf_a"])) {$preset_dtmf_a=$_GET["preset_dtmf_a"];}
elseif (isset($_POST["preset_dtmf_a"])) {$preset_dtmf_a=$_POST["preset_dtmf_a"];}
if (isset($_GET["preset_dtmf_b"])) {$preset_dtmf_b=$_GET["preset_dtmf_b"];}
elseif (isset($_POST["preset_dtmf_b"])) {$preset_dtmf_b=$_POST["preset_dtmf_b"];}
if (isset($_GET["did_id"])) {$did_id=$_GET["did_id"];}
elseif (isset($_POST["did_id"])) {$did_id=$_POST["did_id"];}
if (isset($_GET["did_extension"])) {$did_extension=$_GET["did_extension"];}
elseif (isset($_POST["did_extension"])) {$did_extension=$_POST["did_extension"];}
if (isset($_GET["did_pattern"])) {$did_pattern=$_GET["did_pattern"];}
elseif (isset($_POST["did_pattern"])) {$did_pattern=$_POST["did_pattern"];}
if (isset($_GET["did_description"])) {$did_description=$_GET["did_description"];}
elseif (isset($_POST["did_description"])) {$did_description=$_POST["did_description"];}
if (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];}
if (isset($_GET["ignore_list_script"])) {$ignore_list_script=$_GET["ignore_list_script"];}
@@ -363,6 +372,10 @@ if (eregi("iframe src",$script_text))
$preset_number_f = eregi_replace(' ','+',$preset_number_f);
$preset_dtmf_a = eregi_replace(' ','+',$preset_dtmf_a);
$preset_dtmf_b = eregi_replace(' ','+',$preset_dtmf_b);
$did_id = eregi_replace(' ','+',$did_id);
$did_extension = eregi_replace(' ','+',$did_extension);
$did_pattern = eregi_replace(' ','+',$did_pattern);
$did_description = eregi_replace(' ','+',$did_description);
}
$script_text = eregi_replace('--A--lead_id--B--',"$lead_id",$script_text);
@@ -438,6 +451,10 @@ $script_text = eregi_replace('--A--preset_number_e--B--',"$preset_number_e",$scr
$script_text = eregi_replace('--A--preset_number_f--B--',"$preset_number_f",$script_text);
$script_text = eregi_replace('--A--preset_dtmf_a--B--',"$preset_dtmf_a",$script_text);
$script_text = eregi_replace('--A--preset_dtmf_b--B--',"$preset_dtmf_b",$script_text);
$script_text = eregi_replace('--A--did_id--B--',"$did_id",$script_text);
$script_text = eregi_replace('--A--did_extension--B--',"$did_extension",$script_text);
$script_text = eregi_replace('--A--did_pattern--B--',"$did_pattern",$script_text);
$script_text = eregi_replace('--A--did_description--B--',"$did_description",$script_text);
$script_text = eregi_replace("\n","<BR>",$script_text);
$script_text = stripslashes($script_text);
+77 -3
View File
@@ -307,10 +307,11 @@
# 100811-0810 - Added webphone_url_override option from user Groups
# 100813-0554 - Added Campaign presets
# 100815-1015 - Added manual_dial_prefix campaign option
# 100823-1605 - Added DID variables for webform and scripting
#
$version = '2.4-285';
$build = '100815-1015';
$version = '2.4-286';
$build = '100823-1605';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=66;
$one_mysql_log=0;
@@ -3056,6 +3057,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var enable_xfer_presets='<?php echo $enable_xfer_presets ?>';
var hide_xfer_number_to_dial='<?php echo $hide_xfer_number_to_dial ?>';
var Presets_HTML='';
var did_pattern='';
var did_id='';
var did_extension='';
var did_description='';
var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"./images/vdc_LB_pause.gif\" border=0 alt=\" Pause \"></a><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
var DiaLControl_auto_HTML_OFF = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
@@ -5516,6 +5521,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&preset_number_e=" + CalL_XC_e_NuMber + '' +
"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +
"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +
"&did_id=" + did_id + '' +
"&did_extension=" + did_extension + '' +
"&did_pattern=" + did_pattern + '' +
"&did_description=" + did_description + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -5615,6 +5624,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&preset_number_e=" + CalL_XC_e_NuMber + '' +
"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +
"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +
"&did_id=" + did_id + '' +
"&did_extension=" + did_extension + '' +
"&did_pattern=" + did_pattern + '' +
"&did_description=" + did_description + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -5942,6 +5955,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&preset_number_e=" + CalL_XC_e_NuMber + '' +
"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +
"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +
"&did_id=" + did_id + '' +
"&did_extension=" + did_extension + '' +
"&did_pattern=" + did_pattern + '' +
"&did_description=" + did_description + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -6041,6 +6058,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&preset_number_e=" + CalL_XC_e_NuMber + '' +
"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +
"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +
"&did_id=" + did_id + '' +
"&did_extension=" + did_extension + '' +
"&did_pattern=" + did_pattern + '' +
"&did_description=" + did_description + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -6163,6 +6184,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&preset_number_e=" + CalL_XC_e_NuMber + '' +
"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +
"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +
"&did_id=" + did_id + '' +
"&did_extension=" + did_extension + '' +
"&did_pattern=" + did_pattern + '' +
"&did_description=" + did_description + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -6561,6 +6586,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&preset_number_e=" + CalL_XC_e_NuMber + '' +
"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +
"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +
"&did_id=" + did_id + '' +
"&did_extension=" + did_extension + '' +
"&did_pattern=" + did_pattern + '' +
"&did_description=" + did_description + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -6991,6 +7020,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
CalL_XC_e_NuMber = VDIC_data_VDIG[23];
uniqueid_status_display = VDIC_data_VDIG[24];
uniqueid_status_prefix = VDIC_data_VDIG[26];
did_id = VDIC_data_VDIG[28];
did_extension = VDIC_data_VDIG[29];
did_pattern = VDIC_data_VDIG[30];
did_description = VDIC_data_VDIG[31];
var VDIC_data_VDFR=check_VDIC_array[3].split("|");
if ( (VDIC_data_VDFR[1].length > 1) && (VDCL_fronter_display == 'Y') )
{VDIC_fronter = " Fronter: " + VDIC_data_VDFR[0] + " - " + VDIC_data_VDFR[1];}
@@ -7318,6 +7352,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&preset_number_e=" + CalL_XC_e_NuMber + '' +
"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +
"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +
"&did_id=" + did_id + '' +
"&did_extension=" + did_extension + '' +
"&did_pattern=" + did_pattern + '' +
"&did_description=" + did_description + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -7417,6 +7455,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&preset_number_e=" + CalL_XC_e_NuMber + '' +
"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +
"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +
"&did_id=" + did_id + '' +
"&did_extension=" + did_extension + '' +
"&did_pattern=" + did_pattern + '' +
"&did_description=" + did_description + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -7522,6 +7564,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&preset_number_e=" + CalL_XC_e_NuMber + '' +
"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +
"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +
"&did_id=" + did_id + '' +
"&did_extension=" + did_extension + '' +
"&did_pattern=" + did_pattern + '' +
"&did_description=" + did_description + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -7710,6 +7756,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&preset_number_e=" + CalL_XC_e_NuMber + '' +
"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +
"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +
"&did_id=" + did_id + '' +
"&did_extension=" + did_extension + '' +
"&did_pattern=" + did_pattern + '' +
"&did_description=" + did_description + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -7839,6 +7889,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&preset_number_e=" + CalL_XC_e_NuMber + '' +
"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +
"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +
"&did_id=" + did_id + '' +
"&did_extension=" + did_extension + '' +
"&did_pattern=" + did_pattern + '' +
"&did_description=" + did_description + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -8682,7 +8736,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var tmp_pn = document.getElementById("phone_numberDISP");
tmp_pn.innerHTML = ' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ';
}
document.vicidial_form.phone_number.value = '';
document.vicidial_form.phone_number.value ='';
document.vicidial_form.title.value ='';
document.vicidial_form.first_name.value ='';
document.vicidial_form.middle_initial.value ='';
@@ -8733,6 +8787,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
timer_action_seconds='';
timer_action_mesage='';
timer_action_destination='';
did_pattern='';
did_id='';
did_extension='';
did_description='';
document.vicidial_form.xfername.value='';
document.vicidial_form.xfernumhidden.value='';
@@ -9685,6 +9743,10 @@ else
var SCpreset_number_e = CalL_XC_e_NuMber;
var SCpreset_dtmf_a = CalL_XC_a_Dtmf;
var SCpreset_dtmf_b = CalL_XC_b_Dtmf;
var SCdid_id = did_id;
var SCdid_extension = did_extension;
var SCdid_pattern = did_pattern;
var SCdid_description = did_description;
var SCweb_vars = LIVE_web_vars;
if (encoded.match(RGiframe))
@@ -9752,6 +9814,10 @@ else
SCpreset_number_e = SCpreset_number_e.replace(RGplus,'+');
SCpreset_dtmf_a = SCpreset_dtmf_a.replace(RGplus,'+');
SCpreset_dtmf_b = SCpreset_dtmf_b.replace(RGplus,'+');
SCdid_id = SCdid_id.replace(RGplus,'+');
SCdid_extension = SCdid_extension.replace(RGplus,'+');
SCdid_pattern = SCdid_pattern.replace(RGplus,'+');
SCdid_description = SCdid_description.replace(RGplus,'+');
SCweb_vars = SCweb_vars.replace(RGplus,'+');
}
@@ -9820,6 +9886,10 @@ else
var RGpreset_number_e = new RegExp("--A--preset_number_e--B--","g");
var RGpreset_dtmf_a = new RegExp("--A--preset_dtmf_a--B--","g");
var RGpreset_dtmf_b = new RegExp("--A--preset_dtmf_b--B--","g");
var RGdid_id = new RegExp("--A--did_id--B--","g");
var RGdid_extension = new RegExp("--A--did_extension--B--","g");
var RGdid_pattern = new RegExp("--A--did_pattern--B--","g");
var RGdid_description = new RegExp("--A--did_description--B--","g");
var RGweb_vars = new RegExp("--A--web_vars--B--","g");
encoded = encoded.replace(RGvendor_lead_code, SCvendor_lead_code);
@@ -9887,6 +9957,10 @@ else
encoded = encoded.replace(RGpreset_number_e, SCpreset_number_e);
encoded = encoded.replace(RGpreset_dtmf_a, SCpreset_dtmf_a);
encoded = encoded.replace(RGpreset_dtmf_b, SCpreset_dtmf_b);
encoded = encoded.replace(RGdid_id, SCdid_id);
encoded = encoded.replace(RGdid_extension, SCdid_extension);
encoded = encoded.replace(RGdid_pattern, SCdid_pattern);
encoded = encoded.replace(RGdid_description, SCdid_description);
encoded = encoded.replace(RGweb_vars, SCweb_vars);
}
decoded=encoded; // simple no ?
+12 -4
View File
@@ -96,7 +96,7 @@ $PHP_SELF=$_SERVER['PHP_SELF'];
$Vreports = 'NONE, Real-Time Main Report, Real-Time Campaign Summary , Inbound Report, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound DID Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Fronter - Closer Report, Export Calls Report , Agent Time Detail, Agent Status Detail, Agent Performance Detail, Single Agent Daily , User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report , Server Perforrmance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List';
$UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summary , Inbound Report, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound DID Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Fronter - Closer Report, Export Calls Report , Agent Time Detail, Agent Status Detail, Agent Performance Detail, Single Agent Daily , User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report , Server Perforrmance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Custom Reports Links';
$UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summary , Inbound Report, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound DID Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Fronter - Closer Report, Export Calls Report , Agent Time Detail, Agent Status Detail, Agent Performance Detail, Single Agent Daily , User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report , Server Perforrmance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Custom Reports Links, CallCard Search';
######################################################################################################
######################################################################################################
@@ -2499,11 +2499,12 @@ else
# 100813-0544 - Added campaign presets and option to hide xfer number to dial
# 100815-0802 - Added manual_dial_prefix campaign option
# 100817-1243 - Added checking for reserved menu_id on creation of Call Menus
# 100823-1501 - Added CallCard search as an available User Group report option
#
# 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-275';
$build = '100817-1243';
$admin_version = '2.4-276';
$build = '100823-1501';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -2551,7 +2552,7 @@ if ($force_logout)
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,auto_dial_limit,user_territories_active,allow_custom_dialplan FROM system_settings;";
$stmt = "SELECT use_non_latin,auto_dial_limit,user_territories_active,allow_custom_dialplan,callcard_enabled FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
@@ -2562,6 +2563,7 @@ if ($qm_conf_ct > 0)
$SSauto_dial_limit = $row[1];
$SSuser_territories_active = $row[2];
$SSallow_custom_dialplan = $row[3];
$SScallcard_enabled = $row[4];
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -27342,6 +27344,12 @@ if ($ADD==999999)
{
echo "<LI><a href=\"./AST_LIST_UPDATEstats.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>List Update Stats</a></FONT>\n";
}
if ($SScallcard_enabled > 0)
{
if ( (preg_match("/CallCard Search/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) )
{echo "<LI><a href=\"callcard_admin.php?action=SEARCH\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>CallCard Search</a></FONT>\n";}
}
echo "</UL>\n";
echo "</TD></TR></TABLE>\n";
+79 -12
View File
@@ -11,10 +11,11 @@
# 100311-2325 - first build
# 100525-1824 - Added generate option
# 100616-0847 - Fixed batch issue
# 100823-1342 - Added Search option and display for level 7 users, added pin number search
#
$version = '2.4-3';
$build = '100616-0847';
$version = '2.4-4';
$build = '100823-1342';
$MT[0]='';
@@ -37,6 +38,8 @@ if (isset($_GET["sequence"])) {$sequence=$_GET["sequence"];}
elseif (isset($_POST["sequence"])) {$sequence=$_POST["sequence"];}
if (isset($_GET["card_id"])) {$card_id=$_GET["card_id"];}
elseif (isset($_POST["card_id"])) {$card_id=$_POST["card_id"];}
if (isset($_GET["pin"])) {$pin=$_GET["pin"];}
elseif (isset($_POST["pin"])) {$pin=$_POST["pin"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["total"])) {$total=$_GET["total"];}
@@ -73,6 +76,9 @@ header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
$report_name = 'CallCard Search';
$SEARCHONLY=0;
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,callcard_enabled FROM system_settings;";
@@ -124,7 +130,7 @@ else
$USER = ereg_replace("[^0-9a-zA-Z]","",$USER);
$PASS = ereg_replace("[^0-9a-zA-Z]","",$PASS);
$stmt="SELECT count(*) from vicidial_users where user='$USER' and pass='$PASS' and user_level > 7 and callcard_admin='1'";
$stmt="SELECT count(*) from vicidial_users where user='$USER' and pass='$PASS' and user_level > 7 and callcard_admin='1' and active='Y';";
if ($DB) {echo "|$stmt|\n";}
if ($non_latin > 0) { $rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
@@ -133,13 +139,53 @@ else
if( (strlen($USER)<2) or (strlen($PASS)<2) or (!$auth))
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Invalid Username/Password: |$USER|$PASS|\n";
exit;
$stmt="SELECT count(*) from vicidial_users where user='$USER' and pass='$PASS' and user_level > 6 and view_reports='1' and active='Y';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$authreport=$row[0];
if ($authreport > 0)
{
$stmt="SELECT full_name,user_group from vicidial_users where user='$USER' and pass='$PASS';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$LOGfullname = $row[0];
$LOGuser_group = $row[1];
$stmt="SELECT allowed_reports from vicidial_user_groups where user_group='$LOGuser_group';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$LOGallowed_reports = $row[0];
if ( (!preg_match("/$report_name/",$LOGallowed_reports)) and (!preg_match("/ALL REPORTS/",$LOGallowed_reports)) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
echo "You are not allowed to view this report: |$PHP_AUTH_USER|$report_name|\n";
exit;
}
else
{
$SEARCHONLY=1;
}
}
else
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Invalid Username/Password: |$USER|$PASS|\n";
exit;
}
}
}
if ($SEARCHONLY > 0)
{
if ( ($action != 'SEARCH') and ($action != 'SEARCH_RESULTS') and ($action != 'CALLCARD_DETAIL') )
{$action = 'SEARCH';}
}
if (strlen($action) < 1)
{$action = 'CALLCARD_SUMMARY';}
@@ -353,10 +399,13 @@ if ($action == "CALLCARD_DETAIL")
echo "</TABLE>\n";
echo "<BR><BR><BR>\n";
echo "<a href=\"$PHP_SELF?action=CALLCARD_STATUS&status=VOID&card_id=$card_id&DB=$DB\">Void This Card ID</a><BR><BR>\n";
echo "<a href=\"$PHP_SELF?action=CALLCARD_STATUS&status=ACTIVE&card_id=$card_id&DB=$DB\">Activate This Card ID</a><BR><BR>\n";
echo "<a href=\"$PHP_SELF?action=CALLCARD_STATUS&status=RESET&card_id=$card_id&DB=$DB\">Reset Minutes on This Card ID</a>\n";
echo "<BR><BR>\n";
if ($SEARCHONLY < 1)
{
echo "<a href=\"$PHP_SELF?action=CALLCARD_STATUS&status=VOID&card_id=$card_id&DB=$DB\">Void This Card ID</a><BR><BR>\n";
echo "<a href=\"$PHP_SELF?action=CALLCARD_STATUS&status=ACTIVE&card_id=$card_id&DB=$DB\">Activate This Card ID</a><BR><BR>\n";
echo "<a href=\"$PHP_SELF?action=CALLCARD_STATUS&status=RESET&card_id=$card_id&DB=$DB\">Reset Minutes on This Card ID</a>\n";
echo "<BR><BR>\n";
}
### call log
echo "<TABLE><TR><TD>\n";
@@ -403,7 +452,10 @@ if ($action == "CALLCARD_DETAIL")
}
echo "</TABLE><BR><BR>\n";
echo "<a href=\"admin.php?ADD=720000000000000&category=CALLCARD&stage=$card_id&DB=$DB\">Admin Log for this Card ID</a><BR><BR>\n";
if ($SEARCHONLY < 1)
{
echo "<a href=\"admin.php?ADD=720000000000000&category=CALLCARD&stage=$card_id&DB=$DB\">Admin Log for this Card ID</a><BR><BR>\n";
}
}
else
{
@@ -749,6 +801,20 @@ if ($action == "GENERATE")
### BEGIN search results
if ($action == "SEARCH_RESULTS")
{
if (strlen($pin) > 1)
{
$searchSQL = "pin='$pin'";
$stmt = "SELECT card_id FROM callcard_accounts where $searchSQL;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$vt_ct = mysql_num_rows($rslt);
if ($vt_ct > 0)
{
$row=mysql_fetch_row($rslt);
$card_id = $row[0];
}
}
if (strlen($card_id) > 1)
{$searchSQL = "card_id='$card_id'";}
if (strlen($run) > 1)
@@ -851,6 +917,7 @@ if ($action == "SEARCH")
echo "<input type=hidden name=action value=SEARCH_RESULTS>\n";
echo "<input type=hidden name=DB value=$DB>\n";
echo "<center><TABLE width=$section_width cellspacing=3>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>PIN: </td><td align=left><input type=text name=pin size=20 maxlength=20></td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Card ID: </td><td align=left><input type=text name=card_id size=20 maxlength=20></td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Run: </td><td align=left><input type=text name=run size=5 maxlength=4></td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Batch: </td><td align=left><input type=text name=batch size=6 maxlength=5></td></tr>\n";