diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index a8418bf8..1cd670eb 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -315,6 +315,12 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom click submit. Manager must have the ability to Change Agent Campaign in their user settings. +75. Added Recording Filename and Recording ID as Script variables. If you use + either or both of these the script content will load twice if you have + auto-launch set to SCRIPT. Only works with recording set to ALLCALLS or + ALLFORCE for script on auto-launch. Also, added a refresh link for the + script tab to reload content at will. + 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 91c3f5f0..2017a29b 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -1833,6 +1833,23 @@ index (user), index (event_date) ); +CREATE TABLE vicidial_grab_call_log ( +auto_call_id INT(9) UNSIGNED NOT NULL, +user VARCHAR(20), +event_date DATETIME, +call_time DATETIME, +campaign_id VARCHAR(20), +uniqueid VARCHAR(20), +phone_number VARCHAR(20), +lead_id INT(9) UNSIGNED, +queue_priority TINYINT(2) default '0', +call_type ENUM('IN','OUT','OUTBALANCE') default 'OUT', +index (auto_call_id), +index (event_date), +index (user), +index (campaign_id) +); + ALTER TABLE vicidial_campaign_server_stats ENGINE=HEAP; @@ -1961,7 +1978,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number); CREATE INDEX date_user on vicidial_closer_log (call_date,user); CREATE INDEX comment_a on live_inbound_log (comment_a); -UPDATE system_settings SET db_schema_version='1183',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1184',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.2.0.sql b/agc_2-X/trunk/extras/upgrade_2.2.0.sql index 5878ac60..22ff2359 100644 --- a/agc_2-X/trunk/extras/upgrade_2.2.0.sql +++ b/agc_2-X/trunk/extras/upgrade_2.2.0.sql @@ -626,3 +626,22 @@ ALTER TABLE vicidial_live_agents ADD external_igb_set_user VARCHAR(20) default ' ALTER TABLE vicidial_user_closer_log ADD manager_change VARCHAR(20) default ''; UPDATE system_settings SET db_schema_version='1183',db_schema_update_date=NOW(); + +CREATE TABLE vicidial_grab_call_log ( +auto_call_id INT(9) UNSIGNED NOT NULL, +user VARCHAR(20), +event_date DATETIME, +call_time DATETIME, +campaign_id VARCHAR(20), +uniqueid VARCHAR(20), +phone_number VARCHAR(20), +lead_id INT(9) UNSIGNED, +queue_priority TINYINT(2) default '0', +call_type ENUM('IN','OUT','OUTBALANCE') default 'OUT', +index (auto_call_id), +index (event_date), +index (user), +index (campaign_id) +); + +UPDATE system_settings SET db_schema_version='1184',db_schema_update_date=NOW(); diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index 0a6e3e68..597d5589 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -222,10 +222,11 @@ # 91108-2120 - Fixed QM log issue with PAUSEREASON entries # 91112-1107 - Changed ENTERQUEUE to CALLOUTBOUND for QM logging # 91123-1801 - Added outbound_autodial field +# 91204-1937 - Added logging of agent grab calls # -$version = '2.2.0-131'; -$build = '91123-1801'; +$version = '2.2.0-132'; +$build = '91204-1937'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=256; $one_mysql_log=0; @@ -907,12 +908,25 @@ if ($ACTION == 'manDiaLnextCaLL') if ($vla_cc_ct > 0) { $row=mysql_fetch_row($rslt); - $calls_today =$row[0]; + $calls_today = $row[0]; } else {$calls_today ='0';} $calls_today++; + $script_recording_delay=0; + ##### find if script contains recording fields + $stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_campaigns vc WHERE campaign_id='$campaign' and vs.script_id=vc.campaign_script and script_text LIKE \"%--A--recording_%\";"; + $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);} + if ($DB) {echo "$stmt\n";} + $vs_vc_ct = mysql_num_rows($rslt); + if ($vs_vc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $script_recording_delay = $row[0]; + } + ### check if this is a callback, if it is, skip the grabbing of a new lead and mark the callback as INACTIVE if ( (strlen($callback_id)>0) and (strlen($lead_id)>0) ) { @@ -1794,6 +1808,33 @@ if ($ACTION == 'manDiaLnextCaLL') } + ##### find if script contains recording fields + $stmt="SELECT count(*) FROM vicidial_lists WHERE list_id='$list_id' and agent_script_override!='' and agent_script_override IS NOT NULL and agent_script_override!='NONE';"; + $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);} + if ($DB) {echo "$stmt\n";} + $vls_vc_ct = mysql_num_rows($rslt); + if ($vls_vc_ct > 0) + { + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $script_recording_delay=0; + ##### find if script contains recording fields + $stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_lists vls WHERE list_id='$list_id' and vs.script_id=vls.agent_script_override and script_text LIKE \"%--A--recording_%\";"; + $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);} + if ($DB) {echo "$stmt\n";} + $vs_vc_ct = mysql_num_rows($rslt); + if ($vs_vc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $script_recording_delay = $row[0]; + } + } + } + + $comments = eregi_replace("\r",'',$comments); $comments = eregi_replace("\n",'!N',$comments); @@ -1834,6 +1875,8 @@ if ($ACTION == 'manDiaLnextCaLL') $LeaD_InfO .= $source_id . "\n"; $LeaD_InfO .= $rank . "\n"; $LeaD_InfO .= $owner . "\n"; + $LeaD_InfO .= "\n"; + $LeaD_InfO .= $script_recording_delay . "\n"; echo $LeaD_InfO; } @@ -3564,6 +3607,19 @@ if ($ACTION == 'VDADcheckINCOMING') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00113',$user,$server_ip,$session_name,$one_mysql_log);} + $script_recording_delay=0; + ##### grab number of calls today in this campaign and increment + $stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_campaigns vc WHERE campaign_id='$campaign' and vs.script_id=vc.campaign_script and script_text LIKE \"%--A--recording_%\";"; + $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);} + if ($DB) {echo "$stmt\n";} + $vs_vc_ct = mysql_num_rows($rslt); + if ($vs_vc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $script_recording_delay = $row[0]; + } + $stmt = "SELECT campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group from vicidial_campaigns where campaign_id='$campaign';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -3629,6 +3685,19 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_front_VDlog =$row[0]; } + $script_recording_delay=0; + ##### find if script contains recording fields + $stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_inbound_groups vig WHERE group_id='$VDADchannel_group' and vs.script_id=vig.ingroup_script and script_text LIKE \"%--A--recording_%\";"; + $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);} + if ($DB) {echo "$stmt\n";} + $vs_vc_ct = mysql_num_rows($rslt); + if ($vs_vc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $script_recording_delay = $row[0]; + } + $stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two from vicidial_inbound_groups where group_id='$VDADchannel_group';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -3662,8 +3731,6 @@ if ($ACTION == 'VDADcheckINCOMING') if ($VDIG_cidOR_ct > 0) { $row=mysql_fetch_row($rslt); - if ( ( (ereg('NONE',$VDCL_ingroup_script)) and (strlen($VDCL_ingroup_script) < 5) ) or (strlen($VDCL_ingroup_script) < 1) ) - {$VDCL_ingroup_script = $row[0];} if (strlen($VDCL_xferconf_a_dtmf) < 1) {$VDCL_xferconf_a_dtmf = $row[1];} if (strlen($VDCL_xferconf_a_number) < 1) @@ -3674,6 +3741,22 @@ if ($ACTION == 'VDADcheckINCOMING') {$VDCL_xferconf_b_number = $row[4];} if (strlen($VDCL_default_group_alias) < 1) {$VDCL_default_group_alias = $row[5];} + if ( ( (ereg('NONE',$VDCL_ingroup_script)) and (strlen($VDCL_ingroup_script) < 5) ) or (strlen($VDCL_ingroup_script) < 1) ) + { + $VDCL_ingroup_script = $row[0]; + $script_recording_delay=0; + ##### find if script contains recording fields + $stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_campaigns vc WHERE campaign_id='$campaign' and vs.script_id=vc.campaign_script and script_text LIKE \"%--A--recording_%\";"; + $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);} + if ($DB) {echo "$stmt\n";} + $vs_vc_ct = mysql_num_rows($rslt); + if ($vs_vc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $script_recording_delay = $row[0]; + } + } } $stmt = "select group_web_vars from vicidial_inbound_group_agents where group_id='$VDADchannel_group' and user='$user';"; @@ -3728,6 +3811,19 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_default_group_alias = $row[6]; } + $script_recording_delay=0; + ##### find if script contains recording fields + $stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_campaigns vc WHERE campaign_id='$VDADchannel_group' and vs.script_id=vc.campaign_script and script_text LIKE \"%--A--recording_%\";"; + $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);} + if ($DB) {echo "$stmt\n";} + $vs_vc_ct = mysql_num_rows($rslt); + if ($vs_vc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $script_recording_delay = $row[0]; + } + $stmt = "select group_web_vars from vicidial_campaign_agents where campaign_id='$VDADchannel_group' and user='$user';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -3773,6 +3869,32 @@ if ($ACTION == 'VDADcheckINCOMING') else {echo '|' . $tsr . "\n";} } + ##### find if script contains recording fields + $stmt="SELECT count(*) FROM vicidial_lists WHERE list_id='$list_id' and agent_script_override!='' and agent_script_override IS NOT NULL and agent_script_override!='NONE';"; + $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);} + if ($DB) {echo "$stmt\n";} + $vls_vc_ct = mysql_num_rows($rslt); + if ($vls_vc_ct > 0) + { + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $script_recording_delay=0; + ##### find if script contains recording fields + $stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_lists vls WHERE list_id='$list_id' and vs.script_id=vls.agent_script_override and script_text LIKE \"%--A--recording_%\";"; + $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);} + if ($DB) {echo "$stmt\n";} + $vs_vc_ct = mysql_num_rows($rslt); + if ($vs_vc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $script_recording_delay = $row[0]; + } + } + } + $comments = eregi_replace("\r",'',$comments); $comments = eregi_replace("\n",'!N',$comments); @@ -3818,6 +3940,7 @@ if ($ACTION == 'VDADcheckINCOMING') $LeaD_InfO .= $alt_phone_count . "\n"; $LeaD_InfO .= $rank . "\n"; $LeaD_InfO .= $owner . "\n"; + $LeaD_InfO .= $script_recording_delay . "\n"; echo $LeaD_InfO; @@ -5674,6 +5797,28 @@ if ($ACTION == 'CALLSINQUEUEgrab') $affected_rows = mysql_affected_rows($link); if ($affected_rows > 0) { + $stmt="SELECT call_time,campaign_id,uniqueid,phone_number,lead_id,queue_priority,call_type from vicidial_auto_calls where auto_call_id='$stage';"; + $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);} + if ($rslt) {$vac_count = mysql_num_rows($rslt);} + if ($vac_count > 0) + { + $row=mysql_fetch_row($rslt); + $GCcall_time = $row[0]; + $GCcampaign_id = $row[1]; + $GCuniqueid = $row[2]; + $GCphone_number = $row[3]; + $GClead_id = $row[4]; + $GCqueue_priority = $row[5]; + $GCcall_type = $row[6]; + + $stmt="INSERT INTO vicidial_grab_call_log SET auto_call_id='$stage',user='$user',event_date='$NOW_TIME',call_time='$GCcall_time',campaign_id='$GCcampaign_id',uniqueid='$GCuniqueid',phone_number='$GCphone_number',lead_id='$GClead_id',queue_priority='$GCqueue_priority',call_type='$GCcall_type';"; + if ($format=='debug') {echo "\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);} + $affected_rows = mysql_affected_rows($link); + } + echo "SUCCESS: Call $stage grabbed for $user"; exit; } diff --git a/agc_2-X/trunk/www/agc/vdc_script_display.php b/agc_2-X/trunk/www/agc/vdc_script_display.php index cb950d39..e23149c3 100644 --- a/agc_2-X/trunk/www/agc/vdc_script_display.php +++ b/agc_2-X/trunk/www/agc/vdc_script_display.php @@ -8,10 +8,11 @@ # CHANGELOG: # 90824-1435 - First build of script # 90827-1548 - Added list override script option +# 91204-1913 - Added recording_filename and recording_id variables # -$version = '2.2.0-2'; -$build = '90827-1548'; +$version = '2.2.0-3'; +$build = '91204-1913'; require("dbconnect.php"); @@ -127,6 +128,10 @@ if (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];} elseif (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];} if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} +if (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_filename"];} + elseif (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];} +if (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];} + elseif (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];} if (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];} elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];} @@ -295,6 +300,8 @@ if (eregi("iframe src",$script_text)) $script_width = eregi_replace(' ','+',$script_width); $script_height = eregi_replace(' ','+',$script_height); $fullname = eregi_replace(' ','+',$fullname); + $recording_filename = eregi_replace(' ','+',$recording_filename); + $recording_id = eregi_replace(' ','+',$recording_id); } $script_text = eregi_replace('--A--lead_id--B--',"$lead_id",$script_text); @@ -353,6 +360,8 @@ $script_text = eregi_replace('--A--in_script--B--',"$in_script",$script_text); $script_text = eregi_replace('--A--script_width--B--',"$script_width",$script_text); $script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_text); $script_text = eregi_replace('--A--fullname--B--',"$fullname",$script_text); +$script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text); +$script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text); $script_text = eregi_replace("\n","
",$script_text); $script_text = stripslashes($script_text); diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index c626fe60..69e2e1a8 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -261,10 +261,11 @@ # 91111-1433 - Fixed Gender pulldown list display for IE, remove links for recording channels in SHOW CHANNELS # 91123-1801 - Added code for outbound_autodial field # 91130-2021 - Added code for manager override of in-group selection +# 91204-1638 - Added recording_filename and recording_id script variables and script refresh link # -$version = '2.2.0-239'; -$build = '91130-2021'; +$version = '2.2.0-240'; +$build = '91204-1638'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=61; $one_mysql_log=0; @@ -2597,6 +2598,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var no_delete_VDAC=0; var manager_ingroups_set=0; var external_igb_set_name=''; + var recording_filename=''; + var recording_id=''; + var delayed_script_load=''; + var script_recording_delay=''; var DiaLControl_auto_HTML = "\"\"Resume\""; var DiaLControl_auto_HTML_ready = "\"\"Resume\""; var DiaLControl_auto_HTML_OFF = "\"\"Resume\""; @@ -3604,6 +3609,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var RClookID_array = RClookID.split("RecorDing_ID: "); if (RClookID_array.length > 0) { + recording_filename = RClookFILE_array[1]; + recording_id = RClookID_array[1]; + + if (delayed_script_load == 'YES') + { + RefreshScript(); + delayed_script_load='NO'; + } + var RecDispNamE = RClookFILE_array[1]; if (RecDispNamE.length > 25) { @@ -3995,6 +4009,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (window.MDlogRecorDings) { var MDlogRecorDings_array=MDlogRecorDings.split("|"); + // recording_filename = MDlogRecorDings_array[2]; + // recording_id = MDlogRecorDings_array[3]; + var RecDispNamE = MDlogRecorDings_array[2]; if (RecDispNamE.length > 25) { @@ -4708,6 +4725,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.rank.value = MDnextResponse_array[35]; document.vicidial_form.owner.value = MDnextResponse_array[36]; // CalL_ScripT_id = MDnextResponse_array[37]; + script_recording_delay = MDnextResponse_array[38]; + lead_dial_number = document.vicidial_form.phone_number.value; var dispnum = document.vicidial_form.phone_number.value; @@ -4794,6 +4813,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&script_width=" + script_width + '' + "&script_height=" + script_height + '' + "&fullname=" + LOGfullname + '' + + "&recording_filename=" + recording_filename + '' + + "&recording_id=" + recording_id + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -4875,6 +4896,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&script_width=" + script_width + '' + "&script_height=" + script_height + '' + "&fullname=" + LOGfullname + '' + + "&recording_filename=" + recording_filename + '' + + "&recording_id=" + recording_id + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -4978,6 +5001,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&script_width=" + script_width + '' + "&script_height=" + script_height + '' + "&fullname=" + LOGfullname + '' + + "&recording_filename=" + recording_filename + '' + + "&recording_id=" + recording_id + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -4986,11 +5011,23 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} web_form_vars = web_form_vars.replace(regWFspace, '+'); web_form_vars = web_form_vars.replace(regWF, ''); - load_script_contents(); + if ( (script_recording_delay > 0) && ( (LIVE_campaign_recording == 'ALLCALLS') || (LIVE_campaign_recording == 'ALLFORCE') ) ) + { + delayed_script_load = 'YES'; + RefreshScript('CLEAR'); + } + else + { + load_script_contents(); + } } if (get_call_launch == 'SCRIPT') { + if (delayed_script_load == 'YES') + { + load_script_contents(); + } ScriptPanelToFront(); } @@ -5338,6 +5375,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&script_width=" + script_width + '' + "&script_height=" + script_height + '' + "&fullname=" + LOGfullname + '' + + "&recording_filename=" + recording_filename + '' + + "&recording_id=" + recording_id + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -5346,11 +5385,23 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} web_form_vars = web_form_vars.replace(regWFspace, '+'); web_form_vars = web_form_vars.replace(regWF, ''); - load_script_contents(); + if ( (script_recording_delay > 0) && ( (LIVE_campaign_recording == 'ALLCALLS') || (LIVE_campaign_recording == 'ALLFORCE') ) ) + { + delayed_script_load = 'YES'; + RefreshScript('CLEAR'); + } + else + { + load_script_contents(); + } } if (get_call_launch == 'SCRIPT') { + if (delayed_script_load == 'YES') + { + load_script_contents(); + } ScriptPanelToFront(); } if (get_call_launch == 'WEBFORM') @@ -5797,6 +5848,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} EAalt_phone_count = check_VDIC_array[43]; document.vicidial_form.rank.value = check_VDIC_array[44]; document.vicidial_form.owner.value = check_VDIC_array[45]; + script_recording_delay = check_VDIC_array[46]; var gIndex = 0; if (document.vicidial_form.gender.value == 'M') {var gIndex = 1;} @@ -6003,6 +6055,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&script_width=" + script_width + '' + "&script_height=" + script_height + '' + "&fullname=" + LOGfullname + '' + + "&recording_filename=" + recording_filename + '' + + "&recording_id=" + recording_id + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -6084,6 +6138,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&script_width=" + script_width + '' + "&script_height=" + script_height + '' + "&fullname=" + LOGfullname + '' + + "&recording_filename=" + recording_filename + '' + + "&recording_id=" + recording_id + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -6170,6 +6226,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&script_width=" + script_width + '' + "&script_height=" + script_height + '' + "&fullname=" + LOGfullname + '' + + "&recording_filename=" + recording_filename + '' + + "&recording_id=" + recording_id + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -6178,11 +6236,23 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} web_form_vars = web_form_vars.replace(regWFspace, '+'); web_form_vars = web_form_vars.replace(regWF, ''); - load_script_contents(); + if ( (script_recording_delay > 0) && ( (LIVE_campaign_recording == 'ALLCALLS') || (LIVE_campaign_recording == 'ALLFORCE') ) ) + { + delayed_script_load = 'YES'; + RefreshScript('CLEAR'); + } + else + { + load_script_contents(); + } } if (CalL_AutO_LauncH == 'SCRIPT') { + if (delayed_script_load == 'YES') + { + load_script_contents(); + } ScriptPanelToFront(); } @@ -6220,10 +6290,30 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } } + +// ################################################################################ +// refresh or clear the SCRIPT frame contents + function RefreshScript(temp_wipe) + { + if (temp_wipe == 'CLEAR') + { + document.getElementById("ScriptContents").innerHTML = ''; + } + else + { + document.getElementById("ScriptContents").innerHTML = ''; + WebFormRefresH('','','1'); + load_script_contents(); + } + } + + // ################################################################################ // refresh the content of the web form URL - function WebFormRefresH(taskrefresh,submittask) + function WebFormRefresH(taskrefresh,submittask,force_webvars_refresh) { + var webvars_refresh=0; + if (VDCL_group_id.length > 1) {var group = VDCL_group_id;} else @@ -6245,6 +6335,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} TEMP_VDIC_web_form_address = TEMP_VDIC_web_form_address.replace(regWFAcustom, ''); } else + {webvars_refresh=1;} + + if ( (webvars_refresh > 0) || (force_webvars_refresh > 0) ) { web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -6302,6 +6395,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&script_width=" + script_width + '' + "&script_height=" + script_height + '' + "&fullname=" + LOGfullname + '' + + "&recording_filename=" + recording_filename + '' + + "&recording_id=" + recording_id + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -6413,6 +6508,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&script_width=" + script_width + '' + "&script_height=" + script_height + '' + "&fullname=" + LOGfullname + '' + + "&recording_filename=" + recording_filename + '' + + "&recording_id=" + recording_id + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -7194,6 +7291,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} fronter = ''; inOUT = 'OUT'; vtiger_callback_id='0'; + recording_filename=''; + recording_id=''; if (manual_dial_in_progress==1) { @@ -8003,6 +8102,8 @@ encoded=utf8_decode(xtest); var SCin_script = CalL_ScripT_id; var SCscript_width = script_width; var SCscript_height = script_height; + var SCrecording_filename = recording_filename; + var SCrecording_id = recording_id; var SCweb_vars = LIVE_web_vars; if (encoded.match(RGiframe)) @@ -8056,6 +8157,8 @@ encoded=utf8_decode(xtest); SCin_script = SCin_script.replace(RGplus,'+'); SCscript_width = SCscript_width.replace(RGplus,'+'); SCscript_height = SCscript_height.replace(RGplus,'+'); + SCrecording_filename = SCrecording_filename.replace(RGplus,'+'); + SCrecording_id = SCrecording_id.replace(RGplus,'+'); SCweb_vars = SCweb_vars.replace(RGplus,'+'); } @@ -8110,6 +8213,8 @@ encoded=utf8_decode(xtest); var RGin_script = new RegExp("--A--in_script--B--","g"); var RGscript_width = new RegExp("--A--script_width--B--","g"); var RGscript_height = new RegExp("--A--script_height--B--","g"); + var RGrecording_filename = new RegExp("--A--recording_filename--B--","g"); + var RGrecording_id = new RegExp("--A--recording_id--B--","g"); var RGweb_vars = new RegExp("--A--web_vars--B--","g"); encoded = encoded.replace(RGvendor_lead_code, SCvendor_lead_code); @@ -8163,6 +8268,8 @@ encoded=utf8_decode(xtest); encoded = encoded.replace(RGin_script, SCin_script); encoded = encoded.replace(RGscript_width, SCscript_width); encoded = encoded.replace(RGscript_height, SCscript_height); + encoded = encoded.replace(RGrecording_filename, SCrecording_filename); + encoded = encoded.replace(RGrecording_id, SCrecording_id); encoded = encoded.replace(RGweb_vars, SCweb_vars); } decoded=encoded; // simple no ? @@ -8760,6 +8867,7 @@ else hideDiv('HotKeyEntriesBox'); hideDiv('MainPanel'); hideDiv('ScriptPanel'); + hideDiv('ScriptRefresh'); hideDiv('DispoSelectBox'); hideDiv('LogouTBox'); hideDiv('AgenTDisablEBoX'); @@ -9427,6 +9535,7 @@ else document.getElementById("MainTable").style.backgroundColor=""; document.getElementById("MaiNfooter").style.backgroundColor=""; hideDiv('ScriptPanel'); + hideDiv('ScriptRefresh'); showDiv('MainPanel'); ShoWGenDerPulldown(); @@ -9472,6 +9581,7 @@ else function ScriptPanelToFront() { showDiv('ScriptPanel'); + showDiv('ScriptRefresh'); document.getElementById("MainTable").style.backgroundColor=""; document.getElementById("MaiNfooter").style.backgroundColor=""; panel_bgcolor=''; @@ -9602,7 +9712,7 @@ echo "\n";

 
- + height=460>
CALLBACKS FOR AGENT :
Click on a callback below to call the customer back now. If you click on a record below to call it, it will be removed from the list.
@@ -9613,7 +9723,7 @@ echo "\n";
- + height=460>
NEW MANUAL DIAL LEAD FOR :

Enter information below for the new lead you wish to call.

Calls Dialing: px;z-index:31;" id="TransferMain"> + >
@@ -9723,7 +9833,7 @@ if ($view_calls_in_queue > 0)
  Other Agents Status:  
 
-
+
Available Agents Transfer:
Agents View +
@@ -9740,7 +9850,7 @@ if ($agent_display_dialable_leads > 0) - + height=70>
Lead Dispositioned As:

-
@@ -9748,7 +9858,7 @@ if ($agent_display_dialable_leads > 0)
- + height=70> @@ -9764,7 +9874,7 @@ if ($agent_display_dialable_leads > 0)
Disposition Hot Keys: When active, simply press the keyboard key for the desired disposition for this call. The call will then be hungup and dispositioned automatically:
- + height=70> @@ -9781,7 +9891,7 @@ if ($agent_display_dialable_leads > 0)
Previous Callback Information:
- + height=70> @@ -9798,14 +9908,14 @@ if ($agent_display_dialable_leads > 0)
Extended Alt Phone Information:
- +
maximize
Alt Phone Info
- + height=500>
Noone is in your session:
Go Back

@@ -9813,7 +9923,7 @@ if ($agent_display_dialable_leads > 0)
- + height=500>
Customer has hung up:
Go Back

@@ -9822,7 +9932,7 @@ if ($agent_display_dialable_leads > 0)
- + height=550>
Call Wrapup: seconds remaining in wrapup



@@ -9831,33 +9941,33 @@ if ($agent_display_dialable_leads > 0)
- + height=500>
Your session has been disabled
LOGOUT

Go Back
- + height=500>
There is a time synchronization problem with your system, please tell your system administrator


Go Back
- + height=500>

LOGOUT
- +
- +
 
- + height=47>
Any changes made to the customer information below at this time will not be comitted, You must change customer information before you Hangup the call.
- + height=460>\n"; echo "
DISPOSITION CALL :       Hangup Again       minimize
End-of-call Disposition Selection
@@ -9889,7 +9999,7 @@ if ($agent_display_dialable_leads > 0) - + height=460>
Select a CallBack Date :
@@ -9942,7 +10052,7 @@ if ($agent_display_dialable_leads > 0)
- + height=460>
CLOSER INBOUND GROUP SELECTION
Closer Inbound Group Selection
@@ -9960,7 +10070,7 @@ if ($agent_display_dialable_leads > 0)
- + height=460>
TERRITORY SELECTION
Territory Selection
@@ -9970,7 +10080,7 @@ if ($agent_display_dialable_leads > 0)
- + Channel Channel @@ -9987,6 +10097,10 @@ if ($agent_display_dialable_leads > 0) height=>
AGENT SCRIPT
+ +refresh + + 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> HOT KEYS INACTIVE diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index cb9a10c4..4bc0ed5e 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -1989,11 +1989,12 @@ else # 91031-1232 - Added carrier_description field, campaigns links from in-group screen, server links on reports page, agent ranks listing active only # 91121-0334 - Limited list called count display to 100+ # 91125-0628 - Added conf_secret for servers +# 91204-1652 - Added recording_filename and recording_id as script variables # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-224'; -$build = '91125-0628'; +$admin_version = '2.2.0-225'; +$build = '91204-1652'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -4689,10 +4690,10 @@ if ($ADD==99999)
- Script Text - This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: vendor_lead_code, source_id, list_id, gmt_offset_now, called_since_last_reset, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id, dialed_number, dialed_label, rank, owner. For example, this sentence would print the persons name in it----

Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?

This would read----

Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables: + Script Text - This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: vendor_lead_code, source_id, list_id, gmt_offset_now, called_since_last_reset, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id, dialed_number, dialed_label, rank, owner, camp_script, in_script, script_width, script_height, recording_filename, recording_id. For example, this sentence would print the persons name in it----

Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?

This would read----

Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables:
- <iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&dialed_number=--A--dialed_number--B--&dialed_label=--A--dialed_label--B--&rank=--A--rank--B--&owner=--A--owner--B--&phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290" STYLE="z-index:17"> + <iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&dialed_number=--A--dialed_number--B--&dialed_label=--A--dialed_label--B--&rank=--A--rank--B--&owner=--A--owner--B--&phone=--A--phone--B--&camp_script=--A--camp_script--B--&in_script=--A--in_script--B--&script_width=--A--script_width--B--&script_height=--A--script_height--B--&recording_filename=--A--recording_filename--B--&recording_id=--A--recording_id--B--&" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290" STYLE="z-index:17"> </iframe>
@@ -6045,6 +6046,8 @@ if ($ADD==7111111) $RGin_script = ''; $script_width = '600'; $script_height = '400'; + $recording_filename = '20091204-1639_6666_7275551212'; + $recording_id = '1235'; echo "\n"; echo "\n"; @@ -6104,6 +6107,8 @@ if ($ADD==7111111) $RGin_script = eregi_replace(' ','+',$RGin_script); $script_width = eregi_replace(' ','+',$script_width); $script_height = eregi_replace(' ','+',$script_height); + $recording_filename = eregi_replace(' ','+',$recording_filename); + $recording_id = eregi_replace(' ','+',$recording_id); } $script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); @@ -6152,6 +6157,8 @@ if ($ADD==7111111) $script_text = eregi_replace('--A--in_script--B--',"$RGin_script",$script_text); $script_text = eregi_replace('--A--script_width--B--',"$script_width",$script_text); $script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_text); + $script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text); + $script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text); $script_text = eregi_replace("\n","
",$script_text); @@ -7193,6 +7200,12 @@ if ($ADD==1111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -20170,6 +20183,12 @@ if ($ADD==3111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -20177,6 +20196,56 @@ if ($ADD==3111111) echo "
\n"; + + + echo "


\n"; + echo " CAMPAIGNS USING THIS SCRIPT:
\n"; + echo "\n"; + + $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where campaign_script='$script_id';"; + $rslt=mysql_query($stmt, $link); + $camps_to_print = mysql_num_rows($rslt); + $o=0; + while ($camps_to_print > $o) + { + $row=mysql_fetch_row($rslt); + echo "\n"; + $o++; + } + + echo "
$row[0] $row[1]


\n"; + echo " IN-GROUPS USING THIS SCRIPT:
\n"; + echo "\n"; + + $stmt="SELECT group_id,group_name from vicidial_inbound_groups where ingroup_script='$script_id';"; + $rslt=mysql_query($stmt, $link); + $camps_to_print = mysql_num_rows($rslt); + $o=0; + while ($camps_to_print > $o) + { + $row=mysql_fetch_row($rslt); + echo "\n"; + $o++; + } + + echo "
$row[0] $row[1]


\n"; + echo " LIST OVERRIDES USING THIS SCRIPT:
\n"; + echo "\n"; + + $stmt="SELECT list_id,list_name from vicidial_lists where agent_script_override='$script_id';"; + $rslt=mysql_query($stmt, $link); + $camps_to_print = mysql_num_rows($rslt); + $o=0; + while ($camps_to_print > $o) + { + $row=mysql_fetch_row($rslt); + echo "\n"; + $o++; + } + + echo "
$row[0] $row[1]
\n"; + + if ($LOGdelete_scripts > 0) { echo "

DELETE THIS SCRIPT\n";