diff --git a/UPGRADE b/UPGRADE index 23550631..0a07474c 100644 --- a/UPGRADE +++ b/UPGRADE @@ -452,6 +452,16 @@ OTHER CHANGES: are configurable with the Scheduled Callbacks flag in the System Statuses and Campaign Statuses administrative screens. +106. Added Secondary List Order which allows for further sorting of leads to be + dialed by a secondary sorting method + +107. Added Default Campaign setting for the My Callback agent interface option + so that the checkbox can be pre-selected or not on every call + +108. Added the campaign option for per-call call notes in the agent interface. + If the User Group also has Call Log enabled, the agent can also see + the call notes from previous calls. + diff --git a/bin/AST_VDhopper.pl b/bin/AST_VDhopper.pl index 09e66303..f07b619d 100644 --- a/bin/AST_VDhopper.pl +++ b/bin/AST_VDhopper.pl @@ -66,6 +66,7 @@ # 101108-1451 - Added ability for the hopper level to be set automatically and remove excess leads from the hopper (MikeC) # 110103-1118 - Added lead_order_randomize option # 110212-2255 - Added scheduled callback custom statuses capability +# 110214-2319 - Added lead_order_secondary option # # constants @@ -800,11 +801,11 @@ if ($hopper_dnc_count > 0) if ($CLIcampaign) { - $stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix,use_campaign_dnc,drop_lockout_time,no_hopper_dialing,auto_alt_dial_statuses,dial_timeout,auto_hopper_multi,use_auto_hopper,auto_trim_hopper,lead_order_randomize from vicidial_campaigns where campaign_id='$CLIcampaign';"; + $stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix,use_campaign_dnc,drop_lockout_time,no_hopper_dialing,auto_alt_dial_statuses,dial_timeout,auto_hopper_multi,use_auto_hopper,auto_trim_hopper,lead_order_randomize,lead_order_secondary from vicidial_campaigns where campaign_id='$CLIcampaign';"; } else { - $stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix,use_campaign_dnc,drop_lockout_time,no_hopper_dialing,auto_alt_dial_statuses,dial_timeout,auto_hopper_multi,use_auto_hopper,auto_trim_hopper,lead_order_randomize from vicidial_campaigns where active='Y';"; + $stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix,use_campaign_dnc,drop_lockout_time,no_hopper_dialing,auto_alt_dial_statuses,dial_timeout,auto_hopper_multi,use_auto_hopper,auto_trim_hopper,lead_order_randomize,lead_order_secondary from vicidial_campaigns where active='Y';"; } $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; @@ -838,6 +839,7 @@ while ($sthArows > $rec_count) $use_auto_hopper[$rec_count] = $aryA[19]; $auto_trim_hopper[$rec_count] = $aryA[20]; $lead_order_randomize[$rec_count] = $aryA[21]; + $lead_order_secondary[$rec_count] = $aryA[22]; ### Auto Hopper Level if ( $use_auto_hopper[$rec_count] =~ /Y/) @@ -1595,7 +1597,7 @@ foreach(@campaign_id) } ##### END lead recycling parsing and prep ### - if ($DB) {print "Starting hopper run for $campaign_id[$i] campaign- GMT: $local_call_time[$i] HOPPER: $hopper_level[$i] ORDER: $lead_order[$i]|$lead_order_randomize[$i]\n";} + if ($DB) {print "Starting hopper run for $campaign_id[$i] campaign- GMT: $local_call_time[$i] HOPPER: $hopper_level[$i] ORDER: $lead_order[$i]|$lead_order_randomize[$i]|$lead_order_secondary[$i]\n";} ### Delete the DONE leads if there are any $stmtA = "DELETE from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('DONE');"; @@ -1836,7 +1838,14 @@ foreach(@campaign_id) $OTHER_level = $hopper_level[$i]; if ($lead_order_randomize[$i] =~ /Y/) {$last_order = "RAND()";} - else {$last_order = "lead_id asc";} + else + { + $last_order = "lead_id asc"; + if ($lead_order_secondary[$i] =~ /LEAD_ASCEND/) {$last_order = "lead_id asc";} + if ($lead_order_secondary[$i] =~ /LEAD_DESCEND/) {$last_order = "lead_id desc";} + if ($lead_order_secondary[$i] =~ /CALLTIME_ASCEND/) {$last_order = "last_local_call_time asc";} + if ($lead_order_secondary[$i] =~ /CALLTIME_DESCEND/) {$last_order = "last_local_call_time desc";} + } if ($lead_order[$i] =~ /^DOWN/) {$order_stmt = "order by lead_id asc";} if ($lead_order[$i] =~ /^UP/) {$order_stmt = "order by lead_id desc";} diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index b3f759a6..97453a58 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -782,7 +782,10 @@ auto_trim_hopper ENUM('Y','N') default 'Y', api_manual_dial ENUM('STANDARD','QUEUE','QUEUE_AND_AUTOCALL') default 'STANDARD', manual_dial_call_time_check ENUM('DISABLED','ENABLED') default 'DISABLED', display_leads_count ENUM('Y','N') default 'N', -lead_order_randomize ENUM('Y','N') default 'N' +lead_order_randomize ENUM('Y','N') default 'N', +lead_order_secondary ENUM('LEAD_ASCEND','LEAD_DESCEND','CALLTIME_ASCEND','CALLTIME_DESCEND') default 'LEAD_ASCEND', +per_call_notes ENUM('ENABLED','DISABLED') default 'DISABLED', +my_callback_option ENUM('CHECKED','UNCHECKED') default 'UNCHECKED' ); CREATE TABLE vicidial_lists ( @@ -2419,7 +2422,7 @@ CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log; CREATE TABLE vicidial_call_notes_archive LIKE vicidial_call_notes; ALTER TABLE vicidial_call_notes_archive MODIFY notesid INT(9) UNSIGNED NOT NULL; -UPDATE system_settings SET db_schema_version='1259',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1260',db_schema_update_date=NOW(); GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/extras/upgrade_2.4.sql b/extras/upgrade_2.4.sql index 336e0ec6..b6d181fc 100644 --- a/extras/upgrade_2.4.sql +++ b/extras/upgrade_2.4.sql @@ -657,3 +657,9 @@ UPDATE vicidial_campaign_statuses SET scheduled_callback='Y' where status='CALLB ALTER TABLE vicidial_callbacks ADD lead_status VARCHAR(6) default 'CALLBK'; UPDATE system_settings SET db_schema_version='1259',db_schema_update_date=NOW(); + +ALTER TABLE vicidial_campaigns ADD lead_order_secondary ENUM('LEAD_ASCEND','LEAD_DESCEND','CALLTIME_ASCEND','CALLTIME_DESCEND') default 'LEAD_ASCEND'; +ALTER TABLE vicidial_campaigns ADD per_call_notes ENUM('ENABLED','DISABLED') default 'DISABLED'; +ALTER TABLE vicidial_campaigns ADD my_callback_option ENUM('CHECKED','UNCHECKED') default 'UNCHECKED'; + +UPDATE system_settings SET db_schema_version='1260',db_schema_update_date=NOW(); diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt index b54a6f91..25385d71 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt @@ -504,6 +504,13 @@ This option allows you to randomize the order of the leads in the hopper load wi NONE will not log any logins and logouts within queue_log|| QueueMetrics Dispo Pause Code|| This option, if populated, allows you to define whether a dispo pause code is entered into queue_log when an agent is in dispo status. Default is empty for disabled|| +List Order Secondary|| +This option allows you to select the second sorting order of the leads in the hopper load after the List Order and within the results defined by the criteria set above. For instance, the List Order will be used for the first sort of the leads, but the results will be sorted a second time within that sorting across the same set of the first List Order. For example, if you have List Order set to DOWN COUNT and you only have leads that have been attempted 1 and 2 times, then if you have the List Order Secondary set to LEAD_ASCEND all of the attempt 1 leads will be sorted by the oldest leads first and will be put into the hopper that way. Default is LEAD_ASCEND. NOTE, if you have a large number of leads using one of the CALLTIME options may slow down the speed of the hopper loading script|| +My Callbacks Checkbox Default|| +This option allows you to pre-set the My Callback checkbox on the agent scheduled callback screen. CHECKED will check the checkbox automatically for every call. Default is UNCHECKED|| +Call Notes Per Call|| +Setting this option to ENABLED will allow agents to enter in notes for every call they handle in the agent interface. The notes entry field will appear below the Comments field in the agent interface. Also, if the Agent User Group is allowed to view Call Logs then the agent will be able to view past call notes for a lead at any time. Default is DISABLED|| +If List Order Randomize is enabled, this option will be ignored|| AST_LISTS_campaign_stats.php @@ -526,6 +533,12 @@ Manual Queue|| This phone number is outside of the local call time|| Manual Queue is Off|| Manual Queue is On|| +Call Notes:|| +Call Notes List|| +view notes|| +CALL NOTES LOG|| +Close Call Notes|| +CALL LOG FOR THIS LEAD|| ############################################################ MANAGER Manual diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php index f4a69d37..c92904b4 100644 --- a/www/agc/vdc_db_query.php +++ b/www/agc/vdc_db_query.php @@ -89,6 +89,7 @@ # - $DiaL_SecondS - ('0','1','2',...) # - $date - ('2010-02-19') # - $custom_field_names - ('|start_date|finish_date|favorite_color|') +# - $call_notes # # CHANGELOG: # 50629-1044 - First build of script @@ -269,10 +270,12 @@ # 110124-1134 - Small query fix for large queue_log tables # 110124-1456 - Fixed AREACODE DNC manual dial bug # 110212-2103 - Added support for custom scheduled callback statuses +# 110214-2320 - Added support for lead_order_secondary option +# 110215-1125 - Added support for call_notes # -$version = '2.4-175'; -$build = '110212-2103'; +$version = '2.4-177'; +$build = '110215-1125'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=365; $one_mysql_log=0; @@ -465,6 +468,8 @@ if (isset($_GET["manual_dial_call_time_check"])) {$manual_dial_call_time_check elseif (isset($_POST["manual_dial_call_time_check"])) {$manual_dial_call_time_check=$_POST["manual_dial_call_time_check"];} if (isset($_GET["CallBackLeadStatus"])) {$CallBackLeadStatus=$_GET["CallBackLeadStatus"];} elseif (isset($_POST["CallBackLeadStatus"])) {$CallBackLeadStatus=$_POST["CallBackLeadStatus"];} +if (isset($_GET["call_notes"])) {$call_notes=$_GET["call_notes"];} + elseif (isset($_POST["call_notes"])) {$call_notes=$_POST["call_notes"];} header ("Content-type: text/html; charset=utf-8"); @@ -1447,7 +1452,7 @@ if ($ACTION == 'manDiaLnextCaLL') else { ##### gather no hopper dialing settings from campaign - $stmt="SELECT no_hopper_dialing,agent_dial_owner_only,local_call_time,dial_statuses,drop_lockout_time,lead_filter_id,lead_order,lead_order_randomize FROM vicidial_campaigns where campaign_id='$campaign';"; + $stmt="SELECT no_hopper_dialing,agent_dial_owner_only,local_call_time,dial_statuses,drop_lockout_time,lead_filter_id,lead_order,lead_order_randomize,lead_order_secondary FROM vicidial_campaigns where campaign_id='$campaign';"; $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00236',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -1463,6 +1468,7 @@ if ($ACTION == 'manDiaLnextCaLL') $lead_filter_id = $row[5]; $lead_order = $row[6]; $lead_order_randomize = $row[7]; + $lead_order_secondary = $row[8]; } if (eregi("N",$no_hopper_dialing)) { @@ -1862,7 +1868,14 @@ if ($ACTION == 'manDiaLnextCaLL') if (eregi("USER_GROUP",$agent_dial_owner_only)) {$adooSQL = "and owner='$user_group'";} if ($lead_order_randomize == 'Y') {$last_order = "RAND()";} - else {$last_order = "lead_id asc";} + else + { + $last_order = "lead_id asc"; + if ($lead_order_secondary == 'LEAD_ASCEND') {$last_order = "lead_id asc";} + if ($lead_order_secondary == 'LEAD_DESCEND') {$last_order = "lead_id desc";} + if ($lead_order_secondary == 'CALLTIME_ASCEND') {$last_order = "last_local_call_time asc";} + if ($lead_order_secondary == 'CALLTIME_DESCEND') {$last_order = "last_local_call_time desc";} + } $order_stmt = ''; if (eregi("DOWN",$lead_order)){$order_stmt = 'order by lead_id asc';} @@ -5945,6 +5958,34 @@ if ($ACTION == 'updateDISPO') if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00154',$user,$server_ip,$session_name,$one_mysql_log);} } + ### BEGIN Call Notes Logging ### + if (strlen($call_notes) > 1) + { + $VDADchannel_group=$campaign; + $stmt = "SELECT campaign_id,closecallid from vicidial_closer_log where uniqueid='$uniqueid' and user='$user' 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);} + $VDCL_cn_ct = mysql_num_rows($rslt); + if ($VDCL_cn_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDADchannel_group = $row[0]; + $vicidial_id = $row[1]; + } + else + {$vicidial_id = $uniqueid;} + + # Insert into vicidial_call_notes + $stmt="INSERT INTO vicidial_call_notes set lead_id='$lead_id',vicidial_id='$vicidial_id',call_date='$NOW_TIME',call_notes='" . mysql_real_escape_string($call_notes) . "';"; + 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);} + $affected_rows = mysql_affected_rows($link); + $notesid = mysql_insert_id($link); + } + ### END Call Notes Logging ### + $stmt="SELECT auto_alt_dial_statuses,use_internal_dnc,use_campaign_dnc,api_manual_dial from vicidial_campaigns where campaign_id='$campaign';"; $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00155',$user,$server_ip,$session_name,$one_mysql_log);} @@ -7950,7 +7991,7 @@ if ($ACTION == 'LEADINFOview') echo "
\n"; echo ""; - $stmt="select status,vendor_lead_code,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,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id from vicidial_list where lead_id='$lead_id'limit 1;"; + $stmt="select status,vendor_lead_code,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,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id from vicidial_list where lead_id='$lead_id' limit 1;"; $rslt=mysql_query($stmt, $link); $info_to_print = mysql_num_rows($rslt); if ($format=='debug') {echo "|$out_logs_to_print|$stmt|";} @@ -7991,12 +8032,339 @@ if ($ACTION == 'LEADINFOview') echo "
"; echo "
"; + + echo "
CALL LOG FOR THIS LEAD:
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + # echo ""; + # echo ""; + echo ""; + + + $stmt="select start_epoch,call_date,campaign_id,length_in_sec,status,phone_code,phone_number,lead_id,term_reason,alt_dial,comments,uniqueid,user from vicidial_log where lead_id='$lead_id' order by call_date desc limit 10000;"; + $rslt=mysql_query($stmt, $link); + $out_logs_to_print = mysql_num_rows($rslt); + if ($format=='debug') {echo "|$out_logs_to_print|$stmt|";} + + $g=0; + $u=0; + while ($out_logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $ALLsort[$g] = "$row[0]-----$g"; + $ALLstart_epoch[$g] = $row[0]; + $ALLcall_date[$g] = $row[1]; + $ALLcampaign_id[$g] = $row[2]; + $ALLlength_in_sec[$g] = $row[3]; + $ALLstatus[$g] = $row[4]; + $ALLphone_code[$g] = $row[5]; + $ALLphone_number[$g] = $row[6]; + $ALLlead_id[$g] = $row[7]; + $ALLhangup_reason[$g] = $row[8]; + $ALLalt_dial[$g] = $row[9]; + $ALLuniqueid[$g] = $row[11]; + $ALLuser[$g] = $row[12]; + $ALLin_out[$g] = "OUT-AUTO"; + if ($row[10] == 'MANUAL') {$ALLin_out[$g] = "OUT-MANUAL";} + + $stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='$ALLlead_id[$g]' and vicidial_id='$ALLuniqueid[$g]';"; + $rsltA=mysql_query($stmtA, $link); + $out_notes_to_print = mysql_num_rows($rslt); + if ($out_notes_to_print > 0) + { + $rowA=mysql_fetch_row($rsltA); + $Allcall_notes[$g] = $rowA[0]; + if (strlen($Allcall_notes[$g]) > 0) + {$Allcall_notes[$g] = "NOTES: $Allcall_notes[$g]";} + } + $stmtA="SELECT full_name FROM vicidial_users WHERE user='$ALLuser[$g]';"; + $rsltA=mysql_query($stmtA, $link); + $users_to_print = mysql_num_rows($rslt); + if ($users_to_print > 0) + { + $rowA=mysql_fetch_row($rsltA); + $ALLuser[$g] .= " - $rowA[0]"; + } + + $Allcounter[$g] = $g; + + $g++; + $u++; + } + + $stmt="select start_epoch,call_date,campaign_id,length_in_sec,status,phone_code,phone_number,lead_id,term_reason,queue_seconds,uniqueid,closecallid,user from vicidial_closer_log where lead_id='$lead_id' order by call_date desc limit 10000;"; + $rslt=mysql_query($stmt, $link); + $in_logs_to_print = mysql_num_rows($rslt); + if ($format=='debug') {echo "|$in_logs_to_print|$stmt|";} + + $u=0; + while ($in_logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $ALLsort[$g] = "$row[0]-----$g"; + $ALLstart_epoch[$g] = $row[0]; + $ALLcall_date[$g] = $row[1]; + $ALLcampaign_id[$g] = $row[2]; + $ALLlength_in_sec[$g] = ($row[3] - $row[9]); + if ($ALLlength_in_sec[$g] < 0) {$ALLlength_in_sec[$g]=0;} + $ALLstatus[$g] = $row[4]; + $ALLphone_code[$g] = $row[5]; + $ALLphone_number[$g] = $row[6]; + $ALLlead_id[$g] = $row[7]; + $ALLhangup_reason[$g] = $row[8]; + $ALLuniqueid[$g] = $row[10]; + $ALLclosecallid[$g] = $row[11]; + $ALLuser[$g] = $row[12]; + $ALLalt_dial[$g] = "MAIN"; + $ALLin_out[$g] = "IN"; + + $stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='$ALLlead_id[$g]' and vicidial_id='$ALLclosecallid[$g]';"; + $rsltA=mysql_query($stmtA, $link); + $in_notes_to_print = mysql_num_rows($rslt); + if ($in_notes_to_print > 0) + { + $rowA=mysql_fetch_row($rsltA); + $Allcall_notes[$g] = $rowA[0]; + if (strlen($Allcall_notes[$g]) > 0) + {$Allcall_notes[$g] = "NOTES: $Allcall_notes[$g]";} + } + $stmtA="SELECT full_name FROM vicidial_users WHERE user='$ALLuser[$g]';"; + $rsltA=mysql_query($stmtA, $link); + $users_to_print = mysql_num_rows($rslt); + if ($users_to_print > 0) + { + $rowA=mysql_fetch_row($rsltA); + $ALLuser[$g] .= " - $rowA[0]"; + } + + $Allcounter[$g] = $g; + + $g++; + $u++; + } + + if ($g > 0) + {sort($ALLsort, SORT_NUMERIC);} + else + {echo "";} + + $u=0; + while ($g > $u) + { + $sort_split = explode("-----",$ALLsort[$u]); + $i = $sort_split[1]; + + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + echo ""; + echo ""; + echo "\n"; + } + + echo "
  #     DATE/TIME     AGENT     LENGTH     STATUS     PHONE     CAMPAIGN     IN/OUT     ALT     HANGUP  
  FULL NAME  
No calls on this day
$u$ALLcall_date[$i] $ALLuser[$i] $ALLlength_in_sec[$i] $ALLstatus[$i] $ALLphone_code[$i] $ALLphone_number[$i] $ALLcampaign_id[$i] $ALLin_out[$i] $ALLalt_dial[$i] $ALLhangup_reason[$i]
$Allcall_notes[$i]
"; + echo "
"; + echo "Close Info Box"; echo "
"; } } +################################################################################ +### CALLNOTESview - display all notes for a specific lead +################################################################################ +if ($ACTION == 'CALLNOTESview') + { + if (strlen($stage) < 3) + {$stage = '670';} + + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; +# echo ""; +# echo ""; + echo ""; + + + $stmt="select start_epoch,call_date,campaign_id,length_in_sec,status,phone_code,phone_number,lead_id,term_reason,alt_dial,comments,uniqueid,user from vicidial_log where lead_id='$lead_id' order by call_date desc limit 10000;"; + $rslt=mysql_query($stmt, $link); + $out_logs_to_print = mysql_num_rows($rslt); + if ($format=='debug') {echo "|$out_logs_to_print|$stmt|";} + + $g=0; + $u=0; + while ($out_logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $ALLsort[$g] = "$row[0]-----$g"; + $ALLstart_epoch[$g] = $row[0]; + $ALLcall_date[$g] = $row[1]; + $ALLcampaign_id[$g] = $row[2]; + $ALLlength_in_sec[$g] = $row[3]; + $ALLstatus[$g] = $row[4]; + $ALLphone_code[$g] = $row[5]; + $ALLphone_number[$g] = $row[6]; + $ALLlead_id[$g] = $row[7]; + $ALLhangup_reason[$g] = $row[8]; + $ALLalt_dial[$g] = $row[9]; + $ALLuniqueid[$g] = $row[11]; + $ALLuser[$g] = $row[12]; + $ALLin_out[$g] = "OUT-AUTO"; + if ($row[10] == 'MANUAL') {$ALLin_out[$g] = "OUT-MANUAL";} + + $stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='$ALLlead_id[$g]' and vicidial_id='$ALLuniqueid[$g]';"; + $rsltA=mysql_query($stmtA, $link); + $out_notes_to_print = mysql_num_rows($rslt); + if ($out_notes_to_print > 0) + { + $rowA=mysql_fetch_row($rsltA); + $Allcall_notes[$g] = $rowA[0]; + if (strlen($Allcall_notes[$g]) > 0) + {$Allcall_notes[$g] = "NOTES: $Allcall_notes[$g]";} + } + $stmtA="SELECT full_name FROM vicidial_users WHERE user='$ALLuser[$g]';"; + $rsltA=mysql_query($stmtA, $link); + $users_to_print = mysql_num_rows($rslt); + if ($users_to_print > 0) + { + $rowA=mysql_fetch_row($rsltA); + $ALLuser[$g] .= " - $rowA[0]"; + } + + $Allcounter[$g] = $g; + + $g++; + $u++; + } + + $stmt="select start_epoch,call_date,campaign_id,length_in_sec,status,phone_code,phone_number,lead_id,term_reason,queue_seconds,uniqueid,closecallid,user from vicidial_closer_log where lead_id='$lead_id' order by call_date desc limit 10000;"; + $rslt=mysql_query($stmt, $link); + $in_logs_to_print = mysql_num_rows($rslt); + if ($format=='debug') {echo "|$in_logs_to_print|$stmt|";} + + $u=0; + while ($in_logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $ALLsort[$g] = "$row[0]-----$g"; + $ALLstart_epoch[$g] = $row[0]; + $ALLcall_date[$g] = $row[1]; + $ALLcampaign_id[$g] = $row[2]; + $ALLlength_in_sec[$g] = ($row[3] - $row[9]); + if ($ALLlength_in_sec[$g] < 0) {$ALLlength_in_sec[$g]=0;} + $ALLstatus[$g] = $row[4]; + $ALLphone_code[$g] = $row[5]; + $ALLphone_number[$g] = $row[6]; + $ALLlead_id[$g] = $row[7]; + $ALLhangup_reason[$g] = $row[8]; + $ALLuniqueid[$g] = $row[10]; + $ALLclosecallid[$g] = $row[11]; + $ALLuser[$g] = $row[12]; + $ALLalt_dial[$g] = "MAIN"; + $ALLin_out[$g] = "IN"; + + $stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='$ALLlead_id[$g]' and vicidial_id='$ALLclosecallid[$g]';"; + $rsltA=mysql_query($stmtA, $link); + $in_notes_to_print = mysql_num_rows($rslt); + if ($in_notes_to_print > 0) + { + $rowA=mysql_fetch_row($rsltA); + $Allcall_notes[$g] = $rowA[0]; + if (strlen($Allcall_notes[$g]) > 0) + {$Allcall_notes[$g] = "NOTES: $Allcall_notes[$g]";} + } + $stmtA="SELECT full_name FROM vicidial_users WHERE user='$ALLuser[$g]';"; + $rsltA=mysql_query($stmtA, $link); + $users_to_print = mysql_num_rows($rslt); + if ($users_to_print > 0) + { + $rowA=mysql_fetch_row($rsltA); + $ALLuser[$g] .= " - $rowA[0]"; + } + + $Allcounter[$g] = $g; + + $g++; + $u++; + } + + if ($g > 0) + {sort($ALLsort, SORT_NUMERIC);} + else + {echo "";} + + $u=0; + while ($g > $u) + { + $sort_split = explode("-----",$ALLsort[$u]); + $i = $sort_split[1]; + + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + echo ""; + echo ""; + echo "\n"; + } + + echo "
  #     DATE/TIME     AGENT     LENGTH     STATUS     PHONE     CAMPAIGN     IN/OUT     ALT     HANGUP  
  FULL NAME  
No calls on this day
$u$ALLcall_date[$i] $ALLuser[$i] $ALLlength_in_sec[$i] $ALLstatus[$i] $ALLphone_code[$i] $ALLphone_number[$i] $ALLcampaign_id[$i] $ALLin_out[$i] $ALLalt_dial[$i] $ALLhangup_reason[$i]
$Allcall_notes[$i]
"; + echo "
"; + echo "Close Call Notes"; + echo "
"; + } + + ################################################################################ ### CALLSINQUEUEgrab - grab a call in queue and reserve it for that agent ################################################################################ diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 1e1accb9..a0c924b4 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -333,10 +333,11 @@ # 110129-1050 - Changed to XHTML compliant formatting, issue #444 # 110208-1202 - Made scheduled callbacks notice move when on script/form tabs # 110212-2206 - Added scheduled callback custom statuses compatibility +# 110215-1412 - Added my_callback_option and per_call_notes options # -$version = '2.4-310'; -$build = '110212-2206'; +$version = '2.4-311'; +$build = '110215-1412'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=69; $one_mysql_log=0; @@ -1307,7 +1308,7 @@ else $HKstatusnames = substr("$HKstatusnames", 0, -1); ##### grab the campaign settings - $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,manual_preview_dial,api_manual_dial,manual_dial_call_time_check FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; + $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,manual_preview_dial,api_manual_dial,manual_dial_call_time_check,my_callback_option,per_call_notes FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -1396,6 +1397,8 @@ else $manual_preview_dial = $row[81]; $api_manual_dial = $row[82]; $manual_dial_call_time_check = $row[83]; + $my_callback_option = $row[84]; + $per_call_notes = $row[85]; $AllowManualQueueCalls=1; @@ -3224,6 +3227,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var call_variables=''; var focus_blur_enabled=''; var CBlinkCONTENT=''; + var my_callback_option=''; + var per_call_notes=''; var DiaLControl_auto_HTML = "\"\"Resume\""; var DiaLControl_auto_HTML_ready = "\"\"Resume\""; var DiaLControl_auto_HTML_OFF = "\"\"Resume\""; @@ -7808,6 +7813,18 @@ function set_length(SLnumber,SLlength_goal,SLdirection) { document.getElementById("DispoManualQueueMessage").innerHTML = "
Manual Dial Queue Calls Waiting: " + APIManualDialQueue + "
"; } + if (per_call_notes == 'ENABLED') + { + var test_notes = document.vicidial_form.call_notes_dispo.value; + if (test_notes.length > 0) + {document.vicidial_form.call_notes.value = document.vicidial_form.call_notes_dispo.value} + document.getElementById("PerCallNotesContent").innerHTML = "
Call Notes:
"; + } + else + { + document.getElementById("PerCallNotesContent").innerHTML = ""; + } + HidEGenDerPulldown(); AgentDispoing = 1; var CBflag = ''; @@ -7843,6 +7860,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection) document.inert_form.inert_button.focus(); document.inert_form.inert_button.blur(); } + if (my_callback_option == 'CHECKED') + {document.vicidial_form.CallBackOnlyMe.checked=true;} } // ################################################################################ @@ -8101,7 +8120,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&vtiger_callback_id=" + vtiger_callback_id + "&phone_number=" + document.vicidial_form.phone_number.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&dial_method" + dial_method + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&CallBackLeadStatus=" + CallBackLeadStatus + "&comments=" + CallBackCommenTs + "&custom_field_names=" + custom_field_names; + DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&vtiger_callback_id=" + vtiger_callback_id + "&phone_number=" + document.vicidial_form.phone_number.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&dial_method" + dial_method + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&CallBackLeadStatus=" + CallBackLeadStatus + "&comments=" + CallBackCommenTs + "&custom_field_names=" + custom_field_names + "&call_notes=" + document.vicidial_form.call_notes_dispo.value; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(DSupdate_query); @@ -8155,6 +8174,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection) document.vicidial_form.security_phrase.value=''; document.vicidial_form.comments.value =''; document.vicidial_form.called_count.value =''; + document.vicidial_form.call_notes.value =''; + document.vicidial_form.call_notes_dispo.value =''; VDCL_group_id = ''; fronter = ''; inOUT = 'OUT'; @@ -10174,6 +10195,52 @@ function phone_number_format(formatphone) { } + +// ################################################################################ +// Refresh the lead notes display + function VieWNotesLoG(logframe) + { + showDiv('CalLNotesDisplaYBox'); + + var xmlhttp=false; + /*@cc_on @*/ + /*@if (@_jscript_version >= 5) + // JScript gives us Conditional compilation, we can cope with old IE versions. + // and security blocked creation of the objects. + try { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (E) { + xmlhttp = false; + } + } + @end @*/ + if (!xmlhttp && typeof XMLHttpRequest!='undefined') + { + xmlhttp = new XMLHttpRequest(); + } + if (xmlhttp) + { + RAview_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=CALLNOTESview&format=text&user=" + user + "&pass=" + pass + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&stage="; + xmlhttp.open('POST', 'vdc_db_query.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(RAview_query); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + // alert(xmlhttp.responseText); + document.getElementById('CallNotesSpan').innerHTML = xmlhttp.responseText + "\n"; + } + } + delete xmlhttp; + } + } + + + // ################################################################################ // Run the logging process for customer 3way hangup function customer_3way_hangup_process(temp_hungup_time,temp_xfer_call_seconds) @@ -10416,6 +10483,8 @@ else } document.getElementById("CallBackDatEPrinT").innerHTML = "Select a Date Below"; document.vicidial_form.CallBackOnlyMe.checked=false; + if (my_callback_option == 'CHECKED') + {document.vicidial_form.CallBackOnlyMe.checked=true;} document.vicidial_form.CallBackDatESelectioN.value = ''; document.vicidial_form.CallBackCommenTsField.value = ''; @@ -10571,6 +10640,7 @@ else hideDiv('AgentXferViewSpan'); hideDiv('TimerSpan'); hideDiv('CalLLoGDisplaYBox'); + hideDiv('CalLNotesDisplaYBox'); hideDiv('LeaDInfOBox'); hideDiv('agentdirectlink'); hideDiv('blind_monitor_notice_span'); @@ -10587,7 +10657,10 @@ else if (agentcall_manual != '1') {hideDiv('ManuaLDiaLButtons');} if (agent_call_log_view != '1') - {hideDiv('CallLogButtons');} + { + hideDiv('CallNotesButtons'); + hideDiv('CallLogButtons'); + } if (callholdstatus != '1') {hideDiv('AgentStatusCalls');} if (agentcallsstatus != '1') @@ -11760,6 +11833,22 @@ $zi=2; {echo "\n";} } + echo "\n"; + + if ($per_call_notes == 'ENABLED') + { + echo "Call Notes: "; + if ($agent_call_log_view == '1') + {echo "
view notes ";} + echo ""; + echo "\n"; + } + else + { + echo " \n"; + } + + ?> @@ -12169,6 +12258,7 @@ Available Agents Transfer:
+ End-of-call Disposition Selection
PAUSE AGENT DIALING
@@ -12352,6 +12442,17 @@ Available Agents Transfer: + +
CALL NOTES LOG:
+
\n";} + ?> +
Call Notes List
+

  +
+
+ \n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + if ($SSoutbound_autodial_active > 0) { echo "\n"; diff --git a/www/vicidial/admin_modify_lead.php b/www/vicidial/admin_modify_lead.php index 613610da..4ea21b8f 100644 --- a/www/vicidial/admin_modify_lead.php +++ b/www/vicidial/admin_modify_lead.php @@ -41,6 +41,7 @@ # 100924-1431 - Added Called Count display # 101127-1610 - Added ability to set a scheduled callback date and time # 110212-2041 - Added compatibility with definable scheduled callback statuses +# 110215-1411 - Added display of call notes to log records # require("dbconnect.php"); @@ -541,6 +542,21 @@ else $call_log .= "\n"; $call_log .= "\n"; + $stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='" . mysql_real_escape_string($lead_id) . "' and vicidial_id='$row[0]';"; + $rsltA=mysql_query($stmtA, $link); + $out_notes_to_print = mysql_num_rows($rslt); + if ($out_notes_to_print > 0) + { + $rowA=mysql_fetch_row($rsltA); + if (strlen($rowA[0]) > 0) + { + $call_log .= ""; + $call_log .= ""; + $call_log .= ""; + $call_log .= ""; + } + } + $campaign_id = $row[3]; } @@ -608,6 +624,21 @@ else $closer_log .= "\n"; $closer_log .= "\n"; + $stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='" . mysql_real_escape_string($lead_id) . "' and vicidial_id='$row[0]';"; + $rsltA=mysql_query($stmtA, $link); + $in_notes_to_print = mysql_num_rows($rslt); + if ($in_notes_to_print > 0) + { + $rowA=mysql_fetch_row($rsltA); + if (strlen($rowA[0]) > 0) + { + $closer_log .= ""; + $closer_log .= ""; + $closer_log .= ""; + $closer_log .= ""; + } + } + $campaign_id = $row[3]; }
Customer Information:
List Order Randomize - This option allows you to randomize the order of the leads in the hopper load within the results defined by the criteria set above. For instance, the List Order will be preserved, but the results will be randomized within that sorting. Setting this option to Y will enable this feature. Default is N for disabled. NOTE, if you have a large number of leads this option may slow down the speed of the hopper loading script. +
+ +
+ List Order Secondary - This option allows you to select the second sorting order of the leads in the hopper load after the List Order and within the results defined by the criteria set above. For instance, the List Order will be used for the first sort of the leads, but the results will be sorted a second time within that sorting across the same set of the first List Order. For example, if you have List Order set to DOWN COUNT and you only have leads that have been attempted 1 and 2 times, then if you have the List Order Secondary set to LEAD_ASCEND all of the attempt 1 leads will be sorted by the oldest leads first and will be put into the hopper that way. Default is LEAD_ASCEND. NOTE, if you have a large number of leads using one of the CALLTIME options may slow down the speed of the hopper loading script. If List Order Randomize is enabled, this option will be ignored. +

@@ -4554,6 +4569,11 @@ if ($ADD==99999)
Recording Delay - For ALLCALLS and ALLFORCE recording only. This setting will delay the starting of the recording on all calls for the number of seconds specified in this field. Default is 0. +
+
+
+ Call Notes Per Call - Setting this option to ENABLED will allow agents to enter in notes for every call they handle in the agent interface. The notes entry field will appear below the Comments field in the agent interface. Also, if the Agent User Group is allowed to view Call Logs then the agent will be able to view past call notes for a lead at any time. Default is DISABLED. +

@@ -4634,6 +4654,11 @@ if ($ADD==99999)
Scheduled Callbacks Count - This option allows you to set whether only LIVE callbacks, user-only scheduled callbacks that have hit their trigger date and time, or ALL_ACTIVE callbacks, user-only callbacks that are active in the system as well as LIVE callbacks, should be3 counted int he agent callback alert section on the agent screen. Default is ALL_ACTIVE. +
+
+
+ My Callbacks Checkbox Default - This option allows you to pre-set the My Callback checkbox on the agent scheduled callback screen. CHECKED will check the checkbox automatically for every call. Default is UNCHECKED. +

@@ -10264,7 +10289,7 @@ if ($ADD==20) { echo "
CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id\n"; - $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize from vicidial_campaigns where campaign_id='$source_campaign_id';"; + $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize,lead_order_secondary,per_call_notes,my_callback_option) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize,lead_order_secondary,per_call_notes,my_callback_option from vicidial_campaigns where campaign_id='$source_campaign_id';"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; @@ -13033,6 +13058,7 @@ if ($ADD==41) $cpd_amd_action = 'DISABLED'; $drop_lockout_time = '0'; $lead_order_randomize = 'N'; + $lead_order_secondary = 'LEAD_ASCEND'; } if (ereg('list_activation',$stage)) { @@ -13117,7 +13143,7 @@ if ($ADD==41) if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) ) {$hopper_level='100';} - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_trim_hopper='$auto_trim_hopper', use_auto_hopper='$use_auto_hopper', auto_hopper_multi='$auto_hopper_multi', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',use_custom_cid='$use_custom_cid',scheduled_callbacks_alert='$scheduled_callbacks_alert',queuemetrics_callstatus_override='$queuemetrics_callstatus',extension_appended_cidname='$extension_appended_cidname',scheduled_callbacks_count='$scheduled_callbacks_count',manual_dial_override='$manual_dial_override',blind_monitor_warning='$blind_monitor_warning',blind_monitor_message='" . mysql_real_escape_string($blind_monitor_message) . "',blind_monitor_filename='$blind_monitor_filename',inbound_queue_no_dial='$inbound_queue_no_dial',timer_action_destination='$timer_action_destination',enable_xfer_presets='$enable_xfer_presets',hide_xfer_number_to_dial='$hide_xfer_number_to_dial',manual_dial_prefix='$manual_dial_prefix',customer_3way_hangup_logging='$customer_3way_hangup_logging',customer_3way_hangup_seconds='$customer_3way_hangup_seconds',customer_3way_hangup_action='$customer_3way_hangup_action',ivr_park_call='$ivr_park_call',ivr_park_call_agi='$ivr_park_call_agi',manual_preview_dial='$manual_preview_dial',realtime_agent_time_stats='$realtime_agent_time_stats',api_manual_dial='$api_manual_dial',manual_dial_call_time_check='$manual_dial_call_time_check',lead_order_randomize='$lead_order_randomize' where campaign_id='$campaign_id';"; + $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_trim_hopper='$auto_trim_hopper', use_auto_hopper='$use_auto_hopper', auto_hopper_multi='$auto_hopper_multi', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',use_custom_cid='$use_custom_cid',scheduled_callbacks_alert='$scheduled_callbacks_alert',queuemetrics_callstatus_override='$queuemetrics_callstatus',extension_appended_cidname='$extension_appended_cidname',scheduled_callbacks_count='$scheduled_callbacks_count',manual_dial_override='$manual_dial_override',blind_monitor_warning='$blind_monitor_warning',blind_monitor_message='" . mysql_real_escape_string($blind_monitor_message) . "',blind_monitor_filename='$blind_monitor_filename',inbound_queue_no_dial='$inbound_queue_no_dial',timer_action_destination='$timer_action_destination',enable_xfer_presets='$enable_xfer_presets',hide_xfer_number_to_dial='$hide_xfer_number_to_dial',manual_dial_prefix='$manual_dial_prefix',customer_3way_hangup_logging='$customer_3way_hangup_logging',customer_3way_hangup_seconds='$customer_3way_hangup_seconds',customer_3way_hangup_action='$customer_3way_hangup_action',ivr_park_call='$ivr_park_call',ivr_park_call_agi='$ivr_park_call_agi',manual_preview_dial='$manual_preview_dial',realtime_agent_time_stats='$realtime_agent_time_stats',api_manual_dial='$api_manual_dial',manual_dial_call_time_check='$manual_dial_call_time_check',lead_order_randomize='$lead_order_randomize',lead_order_secondary='$lead_order_secondary',per_call_notes='$per_call_notes',my_callback_option='$my_callback_option' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmtA, $link); if ($reset_hopper == 'Y') @@ -18232,7 +18258,7 @@ if ($ADD==31) $enable_vtiger_integration_LU = $row[0]; $vtiger_url_LU = $row[1]; - $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize from vicidial_campaigns where campaign_id='$campaign_id';"; + $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize,lead_order_secondary,per_call_notes,my_callback_option from vicidial_campaigns where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $campaign_name = $row[1]; @@ -18401,6 +18427,9 @@ if ($ADD==31) $manual_dial_call_time_check = $row[167]; $display_leads_count = $row[168]; $lead_order_randomize = $row[169]; + $lead_order_secondary = $row[170]; + $per_call_notes = $row[171]; + $my_callback_option = $row[172]; if (ereg("DISABLED",$list_order_mix)) {$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;} @@ -18788,6 +18817,8 @@ if ($ADD==31) echo "
List Order Randomize: $NWB#vicidial_campaigns-lead_order_randomize$NWE
List Order Secondary: $NWB#vicidial_campaigns-lead_order_secondary$NWE
List Mix:
Recording Delay: in seconds$NWB#vicidial_campaigns-allcalls_delay$NWE
Call Notes Per Call: $NWB#vicidial_campaigns-per_call_notes$NWE
Script:
Scheduled Callbacks Count: $NWB#vicidial_campaigns-scheduled_callbacks_count$NWE
My Callbacks Checkbox Default: $NWB#vicidial_campaigns-my_callback_option$NWE
Drop Call Seconds: $NWB#vicidial_campaigns-drop_call_seconds$NWE
$row[15]   $row[10]
NOTES:   $rowA[0]
  $row[14]   $row[17]
NOTES:   $rowA[0]