diff --git a/agc_2-X/trunk/bin/AST_SWAMPauto_dial.pl b/agc_2-X/trunk/bin/AST_SWAMPauto_dial.pl index 613f0817..f003b195 100644 --- a/agc_2-X/trunk/bin/AST_SWAMPauto_dial.pl +++ b/agc_2-X/trunk/bin/AST_SWAMPauto_dial.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# AST_SWAMPauto_dial.pl version 0.2 +# AST_SWAMPauto_dial.pl version 0.3 # # DESCRIPTION: # uses MySQL to place auto_dial calls on the VICIDIAL dialer system @@ -18,21 +18,22 @@ # exten => 834562311,2,Playback(gettysburgaddress) # exten => 834562311,3,Hangup # -# Copyright (C) 2008 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # # changes: # 50708-1533 - First version # 80217-0226 - Changed to DBI and added more options +# 90411-0708 - Added --concurrent-calls flag # # constants $CIDlist[0] = '9989998888'; $dialstring_800_prefix = '91'; -$dialstring_number = '6102350343'; # number being dialed (inbound queue) +$dialstring_number = '6102350796'; # number being dialed (inbound queue) $server_ips[0] = '192.168.75.21'; $server_ips[1] = '192.168.75.23'; -# $server_ips[2] = '192.168.75.22'; + $server_ips[2] = '192.168.75.22'; # $server_ips[3] = '192.168.1.240'; # $server_ips[0] = '192.168.1.106'; # $server_ips[1] = '192.168.1.249'; @@ -53,7 +54,7 @@ $dialstring_number = '6102350343'; # number being dialed (inbound queue) $exten='834562311'; # where the test audio file is located $context='default'; $US='_'; -$loop_delay = '1'; +$loop_delay = '10000'; $it='0'; $total_loops='3600'; # 3600 seconds = 1 hour #$total_loops='100'; # 3600 seconds = 1 hour @@ -63,49 +64,59 @@ $MT[0]=''; ### begin parsing run-time options ### if (length($ARGV[0])>1) -{ + { $i=0; while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } + { + $args = "$args $ARGV[$i]"; + $i++; + } if ($args =~ /--help/i) - { - print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n [--delay=XXX] = delay of XXX seconds per loop, default 2.5 seconds\n\n"; - } - else - { - if ($args =~ /--delay=/i) { - @data_in = split(/--delay=/,$args); + print "allowed run time options:\n"; + print " [-t] = test\n"; + print " [-debug] = verbose debug messages\n"; + print " [--delay=XXX] = delay of XXX seconds per loop, default 2.5 seconds\n"; + print " [--concurrent-calls=XXX] = sets number of concurrent calls to maintain, overrides delay setting\n\n"; + exit; + } + else + { + if ($args =~ /--delay=/i) + { + @data_in = split(/--delay=/,$args); $loop_delay = $data_in[1]; print " LOOP DELAY OVERRIDE!!!!! = $loop_delay seconds\n\n"; $loop_delay = ($loop_delay * 1000); - } + } else - { - $loop_delay = '1000'; - } + { + $loop_delay = '1000'; + } + if ($args =~ /--concurrent-calls=/i) + { + @data_in = split(/--concurrent-calls=/,$args); + $concurrent_calls = $data_in[1]; + $loop_delay = (100000 / $concurrent_calls); + print " CONCURRENT CALLS OVERRIDE!!!!! = $concurrent_calls - $loop_delay\n\n"; + } if ($args =~ /-debug/i) - { - $DB=1; # Debug flag, set to 0 for no debug messages, On an active system this will generate hundreds of lines of output per minute - } + { + $DB=1; # Debug flag, set to 0 for no debug messages, On an active system this will generate hundreds of lines of output per minute + } if ($args =~ /-t/i) - { - $TEST=1; - $T=1; + { + $TEST=1; + $T=1; + } } } -} else -{ -print "no command line options set\n"; + { + print "no command line options set\n"; $DB=1; - $loop_delay = '1000'; -# $loop_delay = '500'; -} + } ### end parsing run-time options ### diff --git a/agc_2-X/trunk/bin/AST_VDhopper.pl b/agc_2-X/trunk/bin/AST_VDhopper.pl index 913b1dba..dbb2a3e6 100644 --- a/agc_2-X/trunk/bin/AST_VDhopper.pl +++ b/agc_2-X/trunk/bin/AST_VDhopper.pl @@ -1126,6 +1126,7 @@ foreach(@campaign_id) { @aryA = $sthA->fetchrow_array; $lead_filter_sql[$i] = "$aryA[0]"; + $lead_filter_sql[$i] =~ s/\\//gi; $rec_count++; } $sthA->finish(); diff --git a/agc_2-X/trunk/bin/AST_VDhopper_MIXtest.pl b/agc_2-X/trunk/bin/AST_VDhopper_MIXtest.pl index b3e7ef11..e7c862f1 100644 --- a/agc_2-X/trunk/bin/AST_VDhopper_MIXtest.pl +++ b/agc_2-X/trunk/bin/AST_VDhopper_MIXtest.pl @@ -1169,6 +1169,7 @@ foreach(@campaign_id) { @aryA = $sthA->fetchrow_array; $lead_filter_sql[$i] = "$aryA[0]"; + $lead_filter_sql[$i] =~ s/\\//gi; $rec_count++; } $sthA->finish(); diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 96f50d04..1897681d 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -1932,6 +1932,7 @@ else $row=mysql_fetch_row($rslt); $MMscriptid[$e] =$row[0]; $MMscriptname[$e] = urlencode($row[1]); + $row[2] = stripslashes($row[2]); $MMscripttext[$e] = urlencode($row[2]); $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; @@ -4061,6 +4062,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} MDlookResponse = xmlhttp.responseText; var MDlookResponse_array=MDlookResponse.split("\n"); var MDlookCID = MDlookResponse_array[0]; + var regMDL = new RegExp("^Local","ig"); if (MDlookCID == "NO") { MD_ring_secondS++; @@ -4077,7 +4079,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - var regMDL = new RegExp("^Local","ig"); if (taskCheckOR == 'YES') { XDuniqueid = MDlookResponse_array[0]; diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 31d65c11..c9f87a6b 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -1673,11 +1673,12 @@ $dialplan_entry = ereg_replace(";","",$dialplan_entry); # 90322-0122 - Added ability to delete from the DNC lists # 90322-1105 - Added new status settings and vtiger options # 90409-2133 - Fixed special characters in SCRIPTS +# 90413-0755 - Fixed filter and script slashes issues # # 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-176'; -$build = '90322-1105'; +$admin_version = '2.2.0-177'; +$build = '90413-0755'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -5129,6 +5130,7 @@ if ($ADD==73) $camp_lists = eregi_replace(".$","",$camp_lists); $filterSQL = $filtersql_list[$lead_filter_id]; + $filterSQL = preg_replace("/\\\\/","",$filterSQL); $filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); if (strlen($filterSQL)>4) {$fSQL = "and $filterSQL";} @@ -5214,7 +5216,7 @@ if ($ADD==7111111) $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $script_name = $row[1]; - $script_text = $row[3]; + $script_text = stripslashes($row[3]); if (eregi("iframe src",$script_text)) { @@ -13872,6 +13874,7 @@ if ($ADD==31) echo "
\n"; $filterSQL = $filtersql_list[$lead_filter_id]; + $filterSQL = preg_replace("/\\\\/","",$filterSQL); $filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); if (strlen($filterSQL)>4) {$fSQL = "and $filterSQL";} @@ -14698,6 +14701,7 @@ if ($ADD==34) echo "
\n"; $filterSQL = $filtersql_list[$lead_filter_id]; + $filterSQL = preg_replace("/\\\\/","",$filterSQL); $filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); if (strlen($filterSQL)>4) {$fSQL = "and $filterSQL";} @@ -16565,7 +16569,7 @@ if ($ADD==3111111) $row=mysql_fetch_row($rslt); $script_name = $row[1]; $script_comments = $row[2]; - $script_text = $row[3]; + $script_text = stripslashes($row[3]); $active = $row[4]; echo ""; @@ -16657,7 +16661,7 @@ if ($ADD==31111111) $row=mysql_fetch_row($rslt); $lead_filter_name = $row[1]; $lead_filter_comments = $row[2]; - $lead_filter_sql = $row[3]; + $lead_filter_sql = stripslashes($row[3]); echo ""; echo "
MODIFY A FILTER
\n";