diff --git a/agc_2-X/branches/agc_2.0.5/docs/conf_examples/extensions.conf.sample b/agc_2-X/branches/agc_2.0.5/docs/conf_examples/extensions.conf.sample
index 874090a5..f9c3f542 100644
--- a/agc_2-X/branches/agc_2.0.5/docs/conf_examples/extensions.conf.sample
+++ b/agc_2-X/branches/agc_2.0.5/docs/conf_examples/extensions.conf.sample
@@ -130,64 +130,6 @@ exten => i,1,Playback(invalid) ; "That's not valid, try again"
; exten => 1112223333,2,Dial(sip/gs102,55,o)
; exten => 1112223333,3,Hangup
-; Extension 7275551212 - Inbound local number from PRI with 10 digit delivery
-exten => 7275551212,1,Ringing
-exten => 7275551212,2,Wait(1)
-exten => 7275551212,3,AGI(agi://127.0.0.1:4577/call_log--fullCID--${EXTEN}-----${CALLERID}-----${CALLERIDNUM}-----${CALLERIDNAME})
-exten => 7275551212,4,Answer
-exten => 7275551212,5,Dial(sip/spa2000&sip/spa2001,30,To)
-exten => 7275551212,6,Voicemail,u2000
-
-; dial a long distance outbound number to the UK
-; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls,
-exten => _901144XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _901144XXXXXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},55,To)
-exten => _901144XXXXXXXXXX,3,Hangup
-
-; dial a long distance outbound number to Australia
-; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls,
-exten => _901161XXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _901161XXXXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To)
-exten => _901161XXXXXXXXX,3,Hangup
-
-; Extensions for performance testing
-exten => _91999NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _91999NXXXXXX,2,Dial(${TRUNKloop}/${EXTEN:2},,tTo)
-exten => _91999NXXXXXX,3,Hangup
-exten => 999999999999,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => 999999999999,2,Dial(${TRUNKloop}/${EXTEN:1},,tTo)
-exten => 999999999999,3,Hangup
-
-; dial an 800 outbound number
-exten => _91800NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _91800NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To)
-exten => _91800NXXXXXX,3,Hangup
-exten => _91888NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _91888NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To)
-exten => _91888NXXXXXX,3,Hangup
-exten => _91877NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _91877NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To)
-exten => _91877NXXXXXX,3,Hangup
-exten => _91866NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _91866NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To)
-exten => _91866NXXXXXX,3,Hangup
-
-; dial a local outbound number (modified because of only LD T1)
-exten => _9NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _9NXXXXXX,2,Dial(${TRUNK}/1727${EXTEN:1},,To)
-exten => _9NXXXXXX,3,Hangup
-
-; dial a local 727 outbound number with area code
-exten => _9727NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _9727NXXXXXX,2,Dial(${TRUNK}/1${EXTEN:1},,To)
-exten => _9727NXXXXXX,3,Hangup
-
-; dial a long distance outbound number
-; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls
-exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _91NXXNXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To)
-exten => _91NXXNXXXXXX,3,Hangup
-
; This is a loopback dialaround to allow for hearing of ringing for 3way calls
exten => _881NXXNXXXXXX,1,Answer
exten => _881NXXNXXXXXX,2,Dial(${TRUNKloop}/9${EXTEN:2},,To)
diff --git a/agc_2-X/branches/agc_2.0.5/docs/conf_examples/extensions.conf.sample-1.4 b/agc_2-X/branches/agc_2.0.5/docs/conf_examples/extensions.conf.sample-1.4
index 7034f22f..a11b2b34 100644
--- a/agc_2-X/branches/agc_2.0.5/docs/conf_examples/extensions.conf.sample-1.4
+++ b/agc_2-X/branches/agc_2.0.5/docs/conf_examples/extensions.conf.sample-1.4
@@ -130,26 +130,6 @@ exten => i,1,Playback(invalid) ; "That's not valid, try again"
; exten => 1112223333,2,Dial(sip/gs102,55,o)
; exten => 1112223333,3,Hangup
-; Extension 7275551212 - Inbound local number from PRI with 10 digit delivery
-exten => 7275551212,1,Ringing
-exten => 7275551212,2,Wait(1)
-exten => 7275551212,3,AGI(agi://127.0.0.1:4577/call_log--fullCID--${EXTEN}-----${CALLERID(all)}-----${CALLERID(num)}-----${CALLERID(name)})
-exten => 7275551212,4,Answer
-exten => 7275551212,5,Dial(sip/spa2000&sip/spa2001,30,To)
-exten => 7275551212,6,Voicemail,u2000
-
-; dial a long distance outbound number to the UK
-; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls,
-exten => _901144XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _901144XXXXXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},55,To)
-exten => _901144XXXXXXXXXX,3,Hangup
-
-; dial a long distance outbound number to Australia
-; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls,
-exten => _901161XXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _901161XXXXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To)
-exten => _901161XXXXXXXXX,3,Hangup
-
; Extensions for performance testing
exten => _91999NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91999NXXXXXX,2,Dial(${TRUNKloop}/${EXTEN:2},,tTo)
@@ -158,36 +138,6 @@ exten => 999999999999,1,AGI(agi://127.0.0.1:4577/call_log)
exten => 999999999999,2,Dial(${TRUNKloop}/${EXTEN:1},,tTo)
exten => 999999999999,3,Hangup
-; dial an 800 outbound number
-exten => _91800NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _91800NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To)
-exten => _91800NXXXXXX,3,Hangup
-exten => _91888NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _91888NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To)
-exten => _91888NXXXXXX,3,Hangup
-exten => _91877NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _91877NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To)
-exten => _91877NXXXXXX,3,Hangup
-exten => _91866NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _91866NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To)
-exten => _91866NXXXXXX,3,Hangup
-
-; dial a local outbound number (modified because of only LD T1)
-exten => _9NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _9NXXXXXX,2,Dial(${TRUNK}/1727${EXTEN:1},,To)
-exten => _9NXXXXXX,3,Hangup
-
-; dial a local 727 outbound number with area code
-exten => _9727NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _9727NXXXXXX,2,Dial(${TRUNK}/1${EXTEN:1},,To)
-exten => _9727NXXXXXX,3,Hangup
-
-; dial a long distance outbound number
-; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls
-exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
-exten => _91NXXNXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To)
-exten => _91NXXNXXXXXX,3,Hangup
-
; This is a loopback dialaround to allow for hearing of ringing for 3way calls
exten => _881NXXNXXXXXX,1,Answer
exten => _881NXXNXXXXXX,2,Dial(${TRUNKloop}/9${EXTEN:2},,To)
diff --git a/agc_2-X/branches/agc_2.0.5/translations/it_language.txt b/agc_2-X/branches/agc_2.0.5/translations/it_language.txt
index 7f4ecb53..26020fc5 100644
--- a/agc_2-X/branches/agc_2.0.5/translations/it_language.txt
+++ b/agc_2-X/branches/agc_2.0.5/translations/it_language.txt
@@ -450,7 +450,7 @@ F - Female|F - Femmina|
### BEGIN translation phrases for 2.0.5 release build 890
Date of Birth: |Data di Nascita: |
YOU MUST BE PAUSED TO CHANGE GROUPS|DEVI ESSERE IN PAUSA PER CAMBIARE GRUPPO|
-Calls in Queue:|Chiede, in coda:|
+Calls in Queue:|Chiamate in coda:|
Timeclock|Orologio|
The user and password you entered are not active in the system|Lutente e la password che hai inserito non sono attivi nel sistema|
Please try again|Si prega di riprovare|
diff --git a/agc_2-X/branches/agc_2.0.5/www/agc/vicidial.php b/agc_2-X/branches/agc_2.0.5/www/agc/vicidial.php
index e33faec3..017390dc 100644
--- a/agc_2-X/branches/agc_2.0.5/www/agc/vicidial.php
+++ b/agc_2-X/branches/agc_2.0.5/www/agc/vicidial.php
@@ -7603,18 +7603,18 @@ else
if (vdc_header_date_format.match(regALdate))
{
var statusmon='';
- if (mon == 1) {statusmon = "JAN";}
- if (mon == 2) {statusmon = "FEB";}
- if (mon == 3) {statusmon = "MAR";}
- if (mon == 4) {statusmon = "APR";}
- if (mon == 5) {statusmon = "MAY";}
- if (mon == 6) {statusmon = "JUN";}
- if (mon == 7) {statusmon = "JLY";}
- if (mon == 8) {statusmon = "AUG";}
- if (mon == 9) {statusmon = "SEP";}
- if (mon == 10) {statusmon = "OCT";}
- if (mon == 11) {statusmon = "NOV";}
- if (mon == 12) {statusmon = "DEC";}
+ if (month == 1) {statusmon = "JAN";}
+ if (month == 2) {statusmon = "FEB";}
+ if (month == 3) {statusmon = "MAR";}
+ if (month == 4) {statusmon = "APR";}
+ if (month == 5) {statusmon = "MAY";}
+ if (month == 6) {statusmon = "JUN";}
+ if (month == 7) {statusmon = "JLY";}
+ if (month == 8) {statusmon = "AUG";}
+ if (month == 9) {statusmon = "SEP";}
+ if (month == 10) {statusmon = "OCT";}
+ if (month == 11) {statusmon = "NOV";}
+ if (month == 12) {statusmon = "DEC";}
status_date = statusmon + " " + daym;
}
diff --git a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi
index aed2a4b4..88e0977d 100644
--- a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi
+++ b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi
@@ -98,6 +98,7 @@
# 90702-2129 - Fixed rare agent alert bug, added option to send to remote agent as phone*vendor_id
# 90709-1648 - Fixed alt-number transfers
# 90712-2307 - Added agent grab call in queue
+# 90720-0023 - Added checks for filename validity before streaming, changed initial heavy search from 3 to 2 seconds
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -778,23 +779,26 @@ if ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) )
}
if ($after_hours_action =~ /MESSAGE/)
{
- $AGI->stream_file('sip-silence');
- $AGI->stream_file('sip-silence');
- if ($after_hours_message_filename =~ /\|/)
+ if (length($after_hours_message_filename) > 0)
{
- @after_hours_message_filename_array = split(/\|/,$after_hours_message_filename);
- $w=0;
- foreach(@after_hours_message_filename_array)
+ $AGI->stream_file('sip-silence');
+ $AGI->stream_file('sip-silence');
+ if ($after_hours_message_filename =~ /\|/)
{
- if (length($after_hours_message_filename_array[$w])>0)
+ @after_hours_message_filename_array = split(/\|/,$after_hours_message_filename);
+ $w=0;
+ foreach(@after_hours_message_filename_array)
{
- $AGI->stream_file("$after_hours_message_filename_array[$w]");
+ if (length($after_hours_message_filename_array[$w])>0)
+ {
+ $AGI->stream_file("$after_hours_message_filename_array[$w]");
+ }
+ $w++;
}
- $w++;
}
+ else
+ {$AGI->stream_file("$after_hours_message_filename");}
}
- else
- {$AGI->stream_file("$after_hours_message_filename");}
sleep(1);
### insert a NEW record to the vicidial_manager table to hangup the channel
@@ -924,23 +928,26 @@ if ($no_agent_no_queue =~ /Y|NO_PAUSED/)
if ($no_agent_action =~ /MESSAGE/)
{
- $AGI->stream_file('sip-silence');
- $AGI->stream_file('sip-silence');
- if ($no_agent_action_value =~ /\|/)
+ if (length($no_agent_action_value) > 0)
{
- @no_agent_action_value_array = split(/\|/,$no_agent_action_value);
- $w=0;
- foreach(@no_agent_action_value_array)
+ $AGI->stream_file('sip-silence');
+ $AGI->stream_file('sip-silence');
+ if ($no_agent_action_value =~ /\|/)
{
- if (length($no_agent_action_value_array[$w])>0)
+ @no_agent_action_value_array = split(/\|/,$no_agent_action_value);
+ $w=0;
+ foreach(@no_agent_action_value_array)
{
- $AGI->stream_file("$no_agent_action_value_array[$w]");
+ if (length($no_agent_action_value_array[$w])>0)
+ {
+ $AGI->stream_file("$no_agent_action_value_array[$w]");
+ }
+ $w++;
}
- $w++;
}
+ else
+ {$AGI->stream_file("$no_agent_action_value");}
}
- else
- {$AGI->stream_file("$no_agent_action_value");}
sleep(1);
### insert a NEW record to the vicidial_manager table to hangup the channel
@@ -960,7 +967,7 @@ if ($no_agent_no_queue =~ /Y|NO_PAUSED/)
##### PLAY WELCOME MESSAGE #####
-if ( ($welcome_message_filename !~ /---NONE---/) && ( ($play_welcome_message =~ /ALWAYS/) || ( ($no_delay_call_route =~ /N/) && ($play_welcome_message =~ /YES_UNLESS_NODELAY/) ) ) )
+if ( ($welcome_message_filename !~ /---NONE---/) && (length($welcome_message_filename) > 0) && ( ($play_welcome_message =~ /ALWAYS/) || ( ($no_delay_call_route =~ /N/) && ($play_welcome_message =~ /YES_UNLESS_NODELAY/) ) ) )
{
if ($welcome_message_filename =~ /\|/)
{
@@ -1578,7 +1585,7 @@ if ( ($agent_search_method =~ /^SO|^LO/) && ($skipLOSO < 1) )
else
{
### For Debugging purposes display the call ahead of this call
- if ( ($rec_countWAIT == '1') && ($drop_timer > 3) && ($AGILOG) )
+ if ( ($rec_countWAIT == '1') && ($drop_timer > 2) && ($AGILOG) )
{
$stmtA = "SELECT call_time,campaign_id,last_update_time,callerid,status,channel FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and campaign_id = '$channel_group' and call_time < \"$SQLdateBEGIN\" and lead_id != '$insert_lead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
@@ -1933,7 +1940,7 @@ if ($agent_search_method =~ /^LO|^LB/)
}
else
{
- if ( ($rec_countWAITrem == '1') && ($drop_timer > 3) && ($AGILOG) )
+ if ( ($rec_countWAITrem == '1') && ($drop_timer > 2) && ($AGILOG) )
{
$stmtA = "SELECT call_time,campaign_id,last_update_time,callerid,status,channel FROM vicidial_auto_calls where status = 'LIVE' and campaign_id = '$channel_group' and call_time < \"$SQLdateBEGIN\" and lead_id != '$insert_lead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
@@ -2025,7 +2032,7 @@ if ($hold_recall_xfer_group !~ /NONE/)
if ($rec_countWAITrem > 0) {$place = $rec_countWAITrem;}
$place++;
- $stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='EXITWITHKEY',data1='3',data2='$place',serverid='$queuemetrics_log_id';";
+ $stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='EXITWITHKEY',data1='2',data2='$place',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='02078'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
@@ -2053,7 +2060,7 @@ if ($hold_recall_xfer_group !~ /NONE/)
}
}
-if ($if_wait_play_welcome > 0)
+if ( ($if_wait_play_welcome > 0) && ($welcome_message_filename !~ /---NONE---/) && (length($welcome_message_filename) > 0) )
{
$if_wait_play_welcome=0;
@@ -2113,30 +2120,33 @@ if ( ($hold_message_counter > $prompt_interval) && ($prompt_interval > 0) )
$dbhP=$dbhA; $mysql_count='02081'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDAC posttime record: |$affected_rows|$FDtsSQLdate|$callerid|"; &agi_output;}
- $AGI->stream_file('sip-silence'); # stop music-on-hold process
- $AGI->stream_file('sip-silence'); # stop music-on-hold process
- if ($onhold_prompt_filename =~ /\|/)
+ if (length($onhold_prompt_filename) > 0)
{
- @onhold_prompt_filename_array = split(/\|/,$onhold_prompt_filename);
- $w=0;
- foreach(@onhold_prompt_filename_array)
+ $AGI->stream_file('sip-silence'); # stop music-on-hold process
+ $AGI->stream_file('sip-silence'); # stop music-on-hold process
+ if ($onhold_prompt_filename =~ /\|/)
{
- if (length($onhold_prompt_filename_array[$w])>0)
+ @onhold_prompt_filename_array = split(/\|/,$onhold_prompt_filename);
+ $w=0;
+ foreach(@onhold_prompt_filename_array)
{
- $AGI->stream_file("$onhold_prompt_filename_array[$w]");
+ if (length($onhold_prompt_filename_array[$w])>0)
+ {
+ $AGI->stream_file("$onhold_prompt_filename_array[$w]");
+ }
+ $w++;
}
- $w++;
}
+ else
+ {$AGI->stream_file("$onhold_prompt_filename");} # this prompt must be less than 10 seconds long
}
- else
- {$AGI->stream_file("$onhold_prompt_filename");} # this prompt must be less than 10 seconds long
$hold_message_counter = 0;
$start_moh=1;
$moh_delay=1;
if ($play_place_in_line =~ /Y/i) {$start_place_in_line=1; $moh_delay=2;}
if ($play_estimate_hold_time =~ /Y/i) {$start_hold_estimate=1; $moh_delay=2;}
if ($hold_time_option !~ /NONE/) {$start_hold_estimate=1; $moh_delay=2;};
- if ($drop_timer >= 3) {$drop_timer = ($drop_timer + 5);} # add prompt play time to total queue time
+ if ($drop_timer >= 2) {$drop_timer = ($drop_timer + 5);} # add prompt play time to total queue time
}
else {$hold_message_counter++;}
if ($hold_tone_counter > 3)
@@ -2177,12 +2187,12 @@ if ( ($start_place_in_line > 0) && ($moh_delay == '1') )
{
$AGI->stream_file('queue-thereare'); # you are currently caller number
$AGI->say_number("$place");
- if ($drop_timer >= 3) {$drop_timer = ($drop_timer + 2);} # add prompt play time to total queue time
+ if ($drop_timer >= 2) {$drop_timer = ($drop_timer + 2);} # add prompt play time to total queue time
}
else
{
$AGI->stream_file('queue-youarenext'); # your call is now first in line
- if ($drop_timer >= 3) {$drop_timer = ($drop_timer + 5);} # add prompt play time to total queue time
+ if ($drop_timer >= 2) {$drop_timer = ($drop_timer + 5);} # add prompt play time to total queue time
}
$start_place_in_line=0;
@@ -2289,7 +2299,7 @@ if ( ($start_hold_estimate > 0) && ($moh_delay == '1') )
}
}
}
- if ($drop_timer >= 3) {$drop_timer = ($drop_timer + 3);} # add prompt play time to total queue time
+ if ($drop_timer >= 2) {$drop_timer = ($drop_timer + 3);} # add prompt play time to total queue time
$start_hold_estimate=0;
$wait_in_queue = 1; # trigger hold-time-option is applicable
@@ -2325,7 +2335,7 @@ if ($hold_time_option =~ /PRESS_VMAIL/)
$dbhP=$dbhA; $mysql_count='02086'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDAC posttime record: |$affected_rows|$FDtsSQLdate|$callerid|"; &agi_output;}
- if ($drop_timer >= 3) {$drop_timer = ($drop_timer + 8);} # add prompt play time to total queue time
+ if ($drop_timer >= 2) {$drop_timer = ($drop_timer + 8);} # add prompt play time to total queue time
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
@@ -2406,23 +2416,26 @@ if ($hold_time_option =~ /CALLERID_CALLBACK/)
$DROPexten = "8300";
- $AGI->stream_file('sip-silence'); # stop music-on-hold process
- $AGI->stream_file('sip-silence'); # stop music-on-hold process
- if ($hold_time_option_callback_filename =~ /\|/)
+ if (length($hold_time_option_callback_filename) > 0)
{
- @hold_time_option_callback_filename_array = split(/\|/,$hold_time_option_callback_filename);
- $w=0;
- foreach(@hold_time_option_callback_filename_array)
+ $AGI->stream_file('sip-silence'); # stop music-on-hold process
+ $AGI->stream_file('sip-silence'); # stop music-on-hold process
+ if ($hold_time_option_callback_filename =~ /\|/)
{
- if (length($hold_time_option_callback_filename_array[$w])>0)
+ @hold_time_option_callback_filename_array = split(/\|/,$hold_time_option_callback_filename);
+ $w=0;
+ foreach(@hold_time_option_callback_filename_array)
{
- $AGI->stream_file("$hold_time_option_callback_filename_array[$w]");
+ if (length($hold_time_option_callback_filename_array[$w])>0)
+ {
+ $AGI->stream_file("$hold_time_option_callback_filename_array[$w]");
+ }
+ $w++;
}
- $w++;
}
+ else
+ {$AGI->stream_file("$hold_time_option_callback_filename");} # this prompt must be less than 10 seconds long
}
- else
- {$AGI->stream_file("$hold_time_option_callback_filename");} # this prompt must be less than 10 seconds long
}
else
{
@@ -2514,7 +2527,7 @@ if ($wait_in_queue < 1)
##### wait before looking again for an agent to take the call
if ($wait_in_queue > 0)
{
- if ($drop_timer < 3)
+ if ($drop_timer < 2)
{
### sleep for 23 hundredths of a second
usleep(1*230*1000);
diff --git a/agc_2-X/trunk/bin/AST_VDsales_export.pl b/agc_2-X/trunk/bin/AST_VDsales_export.pl
index 9c018835..181fde5e 100644
--- a/agc_2-X/trunk/bin/AST_VDsales_export.pl
+++ b/agc_2-X/trunk/bin/AST_VDsales_export.pl
@@ -27,6 +27,7 @@ $US = '_';
$MT[0] = '';
$Q=0;
$DB=0;
+$uniqueidLIST='|';
# Default FTP account variables
$VARREPORT_host = '10.0.0.4';
@@ -427,7 +428,7 @@ $TOTAL_SALES=0;
###########################################################################
########### CURRENT DAY SALES GATHERING outbound-only: vicidial_log ######
###########################################################################
-$stmtA = "select vicidial_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,vicidial_list.email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_log.list_id,title,address3,last_local_call_time,uniqueid,length_in_sec from vicidial_list,vicidial_log,vicidial_users where campaign_id IN($campaignSQL) $sale_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_log.user;";
+$stmtA = "select vicidial_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,vicidial_list.email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_log.list_id,title,address3,last_local_call_time,uniqueid,length_in_sec from vicidial_list,vicidial_log,vicidial_users where campaign_id IN($campaignSQL) $sale_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_log.user order by call_date;";
#$stmtA = "select vicidial_users.user,first_name,last_name,address1,address2,city,state,postal_code,phone_number,email,security_phrase,comments,last_local_call_time,lead_id,vicidial_users.full_name,status,vendor_lead_code,source_id,list_id,title,address3,last_local_call_time from vicidial_list,vicidial_users where list_id NOT IN('999','998') $sale_statusesSQL and called_count > 0 and vicidial_users.user=vicidial_list.user;";
if ($DB) {print "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
@@ -477,7 +478,7 @@ if (length($with_inboundSQL)>3)
###########################################################################
########### CURRENT DAY SALES GATHERING inbound-only: vicidial_closer_log ######
###########################################################################
- $stmtA = "select vicidial_closer_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,vicidial_list.email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_closer_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_closer_log.list_id,campaign_id,title,address3,last_local_call_time,xfercallid,closecallid,uniqueid,length_in_sec,queue_seconds from vicidial_list,vicidial_closer_log,vicidial_users where campaign_id IN($with_inboundSQL) $close_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_closer_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_closer_log.user;";
+ $stmtA = "select vicidial_closer_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,vicidial_list.email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_closer_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_closer_log.list_id,campaign_id,title,address3,last_local_call_time,xfercallid,closecallid,uniqueid,length_in_sec,queue_seconds from vicidial_list,vicidial_closer_log,vicidial_users where campaign_id IN($with_inboundSQL) $close_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_closer_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_closer_log.user order by call_date;";
if ($DB) {print "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -664,6 +665,7 @@ exit;
### Subroutine for formatting of the output ###
sub select_format_loop
{
+ $str='';
if ($T)
{
# $user = '1234';
@@ -747,6 +749,7 @@ sub select_format_loop
{
$ivr_id = '0';
$ivr_filename = '';
+ $ivr_location = '';
$stmtB = "select recording_id,filename,location from recording_log where vicidial_id='$vicidial_id' and start_time > '$shipdate 00:00:01' and start_time < '$shipdate 23:59:59' order by start_time limit 10;";
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
@@ -760,10 +763,9 @@ sub select_format_loop
{
$ivr_id .= "|";
$ivr_filename .= "|";
- $ivr_location .= "|";
}
$ivr_id .= "$aryB[0]";
- $ivr_location .= "$aryB[2]";
+ $ivr_location = "$aryB[2]";
@ivr_path = split(/\//,$ivr_location);
$path_file = $ivr_path[$#ivr_path];
$ivr_filename .= "$path_file";
@@ -800,23 +802,22 @@ sub select_format_loop
$stmtB = "select recording_id,filename,location from recording_log where vicidial_id='$closecallid' and start_time > '$shipdate 00:00:01' and start_time < '$shipdate 23:59:59' order by start_time limit 10;";
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
- $sthBrows=$sthB->rows;
- $rec_countB=0;
- while ($sthBrows > $rec_countB)
+ $sthBrowsR=$sthB->rows;
+ $rec_countBR=0;
+ while ($sthBrowsR > $rec_countBR)
{
@aryB = $sthB->fetchrow_array;
if (length($ivr_id) > 1)
{
$ivr_id .= "|";
$ivr_filename .= "|";
- $ivr_location .= "|";
}
$ivr_id .= "$aryB[0]";
- $ivr_location .= "$aryB[2]";
+ $ivr_location = "$aryB[2]";
@ivr_path = split(/\//,$ivr_location);
$path_file = $ivr_path[$#ivr_path];
$ivr_filename .= "$path_file";
- $rec_countB++;
+ $rec_countBR++;
if ($ftp_audio_transfer > 0)
{
`$wgetbin -q --output-document=$tempdir/$path_file $aryB[2] `;
@@ -959,11 +960,17 @@ sub select_format_loop
$phone_areacode = substr($phone_number, 0, 3);
if (length($closer) < 1) {$closer = $user;}
$application = substr($did_name, 0, 4);
+ $queue_seconds = int($queue_seconds + .5);
$talk_seconds = ($length_in_sec - $queue_seconds);
- $queue_seconds =~ s/\..*//gi;
$dispo_time = 0;
- $str = "$uniqueid\t$call_date_array[0]\t$call_date_array[1]\t$phone_areacode\t$phone_number\t$did_pattern\t$closer\t$queue_seconds\t$talk_seconds\t$dispo_time\t$application\t-\t$ivr_filename\t\n";
+ if ($uniqueidLIST !~ /\|$uniqueid\|/)
+ {
+ $str = "$uniqueid\t$call_date_array[0]\t$call_date_array[1]\t$phone_areacode\t$phone_number\t$did_pattern\t$closer\t$queue_seconds\t$talk_seconds\t$dispo_time\t$application\t-\t$ivr_filename\t\n";
+
+ $uniqueidLIST .= "$uniqueid|";
+ if ($DB > 0) {print "UNIQUE: -----$uniqueidLIST-----$uniqueid";}
+ }
}
diff --git a/agc_2-X/trunk/bin/Vtiger_OUT_sync2VICIDIAL_file.pl b/agc_2-X/trunk/bin/Vtiger_OUT_sync2VICIDIAL_file.pl
index c4acfef4..51d98513 100644
--- a/agc_2-X/trunk/bin/Vtiger_OUT_sync2VICIDIAL_file.pl
+++ b/agc_2-X/trunk/bin/Vtiger_OUT_sync2VICIDIAL_file.pl
@@ -1106,6 +1106,16 @@ while ($sthBrowsC > $i)
$fax = $aryB[7];
$email1 = $aryB[8];
$website = $aryB[9];
+ $accountname =~ s/'//gi;
+ $ownership =~ s/'//gi;
+ $siccode =~ s/'//gi;
+ $annualrevenue =~ s/'//gi;
+ $tickersymbol =~ s/'//gi;
+ $phone =~ s/'//gi;
+ $otherphone =~ s/'//gi;
+ $fax =~ s/'//gi;
+ $email1 =~ s/'//gi;
+ $website =~ s/'//gi;
}
$sthB->finish();
@@ -1123,6 +1133,9 @@ while ($sthBrowsC > $i)
$bill_state = $aryB[3];
$bill_street = $aryB[4];
$bill_pobox = $aryB[5];
+ $bill_city =~ s/'//gi;
+ $bill_code =~ s/'//gi;
+ $bill_street =~ s/'//gi;
}
$sthB->finish();
diff --git a/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample b/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample
index ae7a9e69..35b655cf 100644
--- a/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample
+++ b/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample
@@ -459,6 +459,14 @@ exten => 8374,3,AGI(agi-VDAD_ALL_outbound.agi,SURVEYCAMPCEP-----LB)
exten => 8374,4,AGI(agi-VDAD_ALL_outbound.agi,SURVEYCAMPCEP-----LB)
exten => 8374,5,Hangup
+; VICIDIAL SURVEY transfer script AMD with Cepstral variables:
+exten => 8375,1,Playback(sip-silence)
+exten => 8375,2,AGI(agi://127.0.0.1:4577/call_log)
+exten => 8375,3,AMD(2000|2000|1000|5000|120|50|4|256)
+exten => 8375,4,AGI(VD_amd.agi,${EXTEN})
+exten => 8375,5,AGI(agi-VDAD_ALL_outbound.agi,SURVEYCAMPCEP-----LB)
+exten => 8375,6,AGI(agi-VDAD_ALL_outbound.agi,SURVEYCAMPCEP-----LB)
+exten => 8375,7,Hangup
diff --git a/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample-1.4 b/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample-1.4
index 779fc075..89031c32 100644
--- a/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample-1.4
+++ b/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample-1.4
@@ -459,6 +459,14 @@ exten => 8374,3,AGI(agi-VDAD_ALL_outbound.agi,SURVEYCAMPCEP-----LB)
exten => 8374,4,AGI(agi-VDAD_ALL_outbound.agi,SURVEYCAMPCEP-----LB)
exten => 8374,5,Hangup
+; VICIDIAL SURVEY transfer script AMD with Cepstral variables:
+exten => 8375,1,Playback(sip-silence)
+exten => 8375,2,AGI(agi://127.0.0.1:4577/call_log)
+exten => 8375,3,AMD(2000|2000|1000|5000|120|50|4|256)
+exten => 8375,4,AGI(VD_amd.agi,${EXTEN})
+exten => 8375,5,AGI(agi-VDAD_ALL_outbound.agi,SURVEYCAMPCEP-----LB)
+exten => 8375,6,AGI(agi-VDAD_ALL_outbound.agi,SURVEYCAMPCEP-----LB)
+exten => 8375,7,Hangup
diff --git a/agc_2-X/trunk/translations/it_language.txt b/agc_2-X/trunk/translations/it_language.txt
index b7bde64e..1dd37b5c 100644
--- a/agc_2-X/trunk/translations/it_language.txt
+++ b/agc_2-X/trunk/translations/it_language.txt
@@ -449,7 +449,7 @@ F - Female|F - Femmina|
### BEGIN translation phrases for 2.0.5 release build 890
Date of Birth: |Data di Nascita: |
YOU MUST BE PAUSED TO CHANGE GROUPS|DEVI ESSERE IN PAUSA PER CAMBIARE GRUPPO|
-Calls in Queue:|Chiede, in coda:|
+Calls in Queue:|Chiamate in coda:|
Timeclock|Orologio|
The user and password you entered are not active in the system|Lutente e la password che hai inserito non sono attivi nel sistema|
Please try again|Si prega di riprovare|
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 84b4d1bb..e0d361e3 100644
--- a/agc_2-X/trunk/www/agc/vdc_db_query.php
+++ b/agc_2-X/trunk/www/agc/vdc_db_query.php
@@ -204,12 +204,13 @@
# 90705-2008 - Added AGENTSview function
# 90706-1431 - Added Agent view transfer selection
# 90712-2303 - Added view calls in queue, grab call from queue
+# 90717-0638 - Fixed alt dial on overflow in-group calls
#
-$version = '2.2.0-115';
-$build = '90712-2303';
+$version = '2.2.0-116';
+$build = '90717-0638';
$mel=1; # Mysql Error Log enabled = 1
-$mysql_log_count=234;
+$mysql_log_count=235;
$one_mysql_log=0;
require("dbconnect.php");
@@ -1852,6 +1853,23 @@ if ($stage == "end")
### check to see if lead should be alt_dialed
if (strlen($alt_dial)<2) {$alt_dial = 'NONE';}
+ ### check if inbound call, if so find a recent outbound call to pull alt_dial value from
+ if ($VLA_inOUT == 'INBOUND')
+ {
+ $one_hour_ago = date("Y-m-d H:i:s", mktime(date("H")-1,date("i"),date("s"),date("m"),date("d"),date("Y")));
+ ##### find a recent outbound call associated with this inbound call
+ $stmt="SELECT alt_dial FROM vicidial_log where lead_id='$lead_id' and status IN('DROP','XDROP') and call_date > \"$one_hour_ago\" order by call_date desc limit 1;";
+ $rslt=mysql_query($stmt, $link);
+ if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00235',$user,$server_ip,$session_name,$one_mysql_log);}
+ if ($DB) {echo "$stmt\n";}
+ $VL_alt_ct = mysql_num_rows($rslt);
+ if ($VL_alt_ct > 0)
+ {
+ $row=mysql_fetch_row($rslt);
+ $alt_dial = $row[0];
+ }
+ }
+
if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ALT_AND_ADDR3|ALT_AND_EXTENDED)",$auto_alt_dial)) )
{
$alt_dial_skip=0;
diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php
index cbc9d932..46ea4398 100644
--- a/agc_2-X/trunk/www/agc/vicidial.php
+++ b/agc_2-X/trunk/www/agc/vicidial.php
@@ -238,10 +238,11 @@
# 90706-1432 - Added Agent view transfer selection
# 90709-1649 - Fixed alt-number transfers and dispo variable reset for webform
# 90712-2304 - Added ADD-ALL group selection, view calls in queue, grab call from queue, requeue button
+# 90717-0640 - Added dialed_label and dialed_number to script variables
#
-$version = '2.2.0-216';
-$build = '90712-2304';
+$version = '2.2.0-217';
+$build = '90717-0640';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=61;
$one_mysql_log=0;
@@ -7081,6 +7082,8 @@ encoded=utf8_decode(xtest);
var SCserver_ip = server_ip;
var SCSIPexten = extension;
var SCsession_id = session_id;
+ var SCdialed_number = dialed_number;
+ var SCdialed_label = dialed_label;
var SCweb_vars = LIVE_web_vars;
if (encoded.match(RGiframe))
@@ -7124,6 +7127,8 @@ encoded=utf8_decode(xtest);
SCcustomer_zap_channel = SCcustomer_zap_channel.replace(RGplus,'+');
SCserver_ip = SCserver_ip.replace(RGplus,'+');
SCSIPexten = SCSIPexten.replace(RGplus,'+');
+ SCdialed_number = SCdialed_number.replace(RGplus,'+');
+ SCdialed_label = SCdialed_label.replace(RGplus,'+');
SCweb_vars = SCweb_vars.replace(RGplus,'+');
}
@@ -7168,6 +7173,8 @@ encoded=utf8_decode(xtest);
var RGserver_ip = new RegExp("--A--server_ip--B--","g");
var RGSIPexten = new RegExp("--A--SIPexten--B--","g");
var RGsession_id = new RegExp("--A--session_id--B--","g");
+ var RGdialed_number = new RegExp("--A--dialed_number--B--","g");
+ var RGdialed_label = new RegExp("--A--dialed_label--B--","g");
var RGweb_vars = new RegExp("--A--web_vars--B--","g");
encoded = encoded.replace(RGvendor_lead_code, SCvendor_lead_code);
@@ -7211,6 +7218,8 @@ encoded=utf8_decode(xtest);
encoded = encoded.replace(RGserver_ip, SCserver_ip);
encoded = encoded.replace(RGSIPexten, SCSIPexten);
encoded = encoded.replace(RGsession_id, SCsession_id);
+ encoded = encoded.replace(RGdialed_number, SCdialed_number);
+ encoded = encoded.replace(RGdialed_label, SCdialed_label);
encoded = encoded.replace(RGweb_vars, SCweb_vars);
}
decoded=encoded; // simple no ?
@@ -8106,18 +8115,18 @@ else
if (vdc_header_date_format.match(regALdate))
{
var statusmon='';
- if (mon == 1) {statusmon = "JAN";}
- if (mon == 2) {statusmon = "FEB";}
- if (mon == 3) {statusmon = "MAR";}
- if (mon == 4) {statusmon = "APR";}
- if (mon == 5) {statusmon = "MAY";}
- if (mon == 6) {statusmon = "JUN";}
- if (mon == 7) {statusmon = "JLY";}
- if (mon == 8) {statusmon = "AUG";}
- if (mon == 9) {statusmon = "SEP";}
- if (mon == 10) {statusmon = "OCT";}
- if (mon == 11) {statusmon = "NOV";}
- if (mon == 12) {statusmon = "DEC";}
+ if (month == 1) {statusmon = "JAN";}
+ if (month == 2) {statusmon = "FEB";}
+ if (month == 3) {statusmon = "MAR";}
+ if (month == 4) {statusmon = "APR";}
+ if (month == 5) {statusmon = "MAY";}
+ if (month == 6) {statusmon = "JUN";}
+ if (month == 7) {statusmon = "JLY";}
+ if (month == 8) {statusmon = "AUG";}
+ if (month == 9) {statusmon = "SEP";}
+ if (month == 10) {statusmon = "OCT";}
+ if (month == 11) {statusmon = "NOV";}
+ if (month == 12) {statusmon = "DEC";}
status_date = statusmon + " " + daym;
}
diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php b/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php
index 9b23288a..5dc88fcd 100644
--- a/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php
+++ b/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php
@@ -18,6 +18,7 @@
# 90310-2039 - Admin header
# 90508-0644 - Changed to PHP long tags
# 90523-0935 - Rewrite of seconds to minutes and hours conversion
+# 90717-1500 - Changed to be multi-campaign, multi-user-group select
#
require("dbconnect.php");
@@ -114,6 +115,44 @@ while ($i < $user_groups_to_print)
$user_groups[$i] =$row[0];
$i++;
}
+
+$i=0;
+$group_string='|';
+$group_ct = count($group);
+while($i < $group_ct)
+ {
+ $group_string .= "$group[$i]|";
+ $group_SQL .= "'$group[$i]',";
+ $groupQS .= "&group[]=$group[$i]";
+ $i++;
+ }
+if ( (ereg("--ALL--",$group_string) ) or ($group_ct < 1) )
+ {$group_SQL = "";}
+else
+ {
+ $group_SQL = eregi_replace(",$",'',$group_SQL);
+ $group_SQL = "and campaign_id IN($group_SQL)";
+ }
+
+$i=0;
+$user_group_string='|';
+$user_group_ct = count($user_group);
+while($i < $user_group_ct)
+ {
+ $user_group_string .= "$user_group[$i]|";
+ $user_group_SQL .= "'$user_group[$i]',";
+ $user_groupQS .= "&user_group[]=$user_group[$i]";
+ $i++;
+ }
+if ( (ereg("--ALL--",$user_group_string) ) or ($user_group_ct < 1) )
+ {$user_group_SQL = "";}
+else
+ {
+ $user_group_SQL = eregi_replace(",$",'',$user_group_SQL);
+ $user_group_SQL = "and vicidial_agent_log.user_group IN($user_group_SQL)";
+ }
+
+if ($DB) {echo "$user_group_string|$user_group_ct|$user_groupQS|$i
";}
?>
@@ -138,39 +177,58 @@ echo "
\n";
@@ -228,7 +286,7 @@ $usersARY[0]='';
$user_namesARY[0]='';
$k=0;
-$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,sum(pause_sec),sum(wait_sec),sum(dispo_sec),status from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and campaign_id='" . mysql_real_escape_string($group) . "' and pause_sec<36000 and wait_sec<36000 and talk_sec<36000 and dispo_sec<36000 $ugSQL group by user,full_name,status order by full_name,user,status desc limit 500000;";
+$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,sum(pause_sec),sum(wait_sec),sum(dispo_sec),status from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and pause_sec<36000 and wait_sec<36000 and talk_sec<36000 and dispo_sec<36000 $group_SQL $user_group_SQL group by user,full_name,status order by full_name,user,status desc limit 500000;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$rows_to_print = mysql_num_rows($rslt);
@@ -522,7 +580,7 @@ $PCusers='-';
$PCusersARY=$MT;
$PCuser_namesARY=$MT;
$k=0;
-$stmt="select full_name,vicidial_users.user,sum(pause_sec),sub_status,sum(wait_sec + talk_sec + dispo_sec) from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and campaign_id='" . mysql_real_escape_string($group) . "' and pause_sec<36000 $ugSQL group by user,full_name,sub_status order by user,full_name,sub_status desc limit 100000;";
+$stmt="select full_name,vicidial_users.user,sum(pause_sec),sub_status,sum(wait_sec + talk_sec + dispo_sec) from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and pause_sec<36000 $group_SQL $user_group_SQL group by user,full_name,sub_status order by user,full_name,sub_status desc limit 100000;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$subs_to_print = mysql_num_rows($rslt);
diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php
index bfd69c00..58e91530 100644
--- a/agc_2-X/trunk/www/vicidial/admin.php
+++ b/agc_2-X/trunk/www/vicidial/admin.php
@@ -1883,11 +1883,12 @@ else
# 90628-2213 - Added Multi-campaign drop rate groups
# 90705-0926 - Added User Group agent view options
# 90710-1528 - Added Agent view and grab queue calls and every call pause options
+# 90717-0646 - Added dialed_label and dialed_number to 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-205';
-$build = '90710-1528';
+$admin_version = '2.2.0-206';
+$build = '90717-0646';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -4496,10 +4497,10 @@ if ($SSqc_features_active > 0)
-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. 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. 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--&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--&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>
@@ -5743,7 +5744,7 @@ if ($ADD==7111111)
$country_code = 'USA';
$gender = 'M';
$date_of_birth = '1970-01-01';
- $alt_phone = '3125551212';
+ $alt_phone = '3125551111';
$email = 'test@test.com';
$security_phrase = 'SECUTIRY';
$comments = 'COMMENTS FIELD';
@@ -5761,6 +5762,8 @@ if ($ADD==7111111)
$RGserver_ip = '10.10.10.15';
$RGSIPexten = 'SIP/gs102';
$RGsession_id = '8600051';
+ $RGdialed_number = '3125551111';
+ $RGdialed_label = 'ALT';
echo "\n";
echo "\n";
@@ -5812,6 +5815,8 @@ if ($ADD==7111111)
$RGserver_ip = eregi_replace(' ','+',$RGserver_ip);
$RGSIPexten = eregi_replace(' ','+',$RGSIPexten);
$RGsession_id = eregi_replace(' ','+',$RGsession_id);
+ $RGdialed_number = eregi_replace(' ','+',$RGdialed_number);
+ $RGdialed_label = eregi_replace(' ','+',$RGdialed_label);
}
$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text);
@@ -5852,6 +5857,8 @@ if ($ADD==7111111)
$script_text = eregi_replace('--A--server_ip--B--',"$RGserver_ip",$script_text);
$script_text = eregi_replace('--A--SIPexten--B--',"$RGSIPexten",$script_text);
$script_text = eregi_replace('--A--session_id--B--',"$RGsession_id",$script_text);
+ $script_text = eregi_replace('--A--dialed_number--B--',"$RGdialed_number",$script_text);
+ $script_text = eregi_replace('--A--dialed_label--B--',"$RGdialed_label",$script_text);
$script_text = eregi_replace("\n","
",$script_text);
@@ -6889,6 +6896,8 @@ if ($ADD==1111111)
echo "";
echo "";
echo "";
+ echo "";
+ echo "";
echo "";
echo "
";
# END Insert Field
@@ -18992,6 +19001,8 @@ if ($ADD==3111111)
echo "";
echo "";
echo "";
+ echo "";
+ echo "";
echo "";
echo "
";
# END Insert Field
diff --git a/agc_2-X/trunk/www/vicidial/send_CID_call.php b/agc_2-X/trunk/www/vicidial/send_CID_call.php
new file mode 100644
index 00000000..accf324f
--- /dev/null
+++ b/agc_2-X/trunk/www/vicidial/send_CID_call.php
@@ -0,0 +1,132 @@
+ LICENSE: GPLv2
+#
+# CHANGES
+#
+# 90714-1355 - First Build
+#
+
+require("dbconnect.php");
+
+$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
+$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
+$PHP_SELF=$_SERVER['PHP_SELF'];
+$ip = getenv("REMOTE_ADDR");
+
+if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
+ elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
+if (isset($_GET["sender"])) {$sender=$_GET["sender"];}
+ elseif (isset($_POST["sender"])) {$sender=$_POST["sender"];}
+if (isset($_GET["receiver"])) {$receiver=$_GET["receiver"];}
+ elseif (isset($_POST["receiver"])) {$receiver=$_POST["receiver"];}
+if (isset($_GET["cid_number"])) {$cid_number=$_GET["cid_number"];}
+ elseif (isset($_POST["cid_number"])) {$cid_number=$_POST["cid_number"];}
+if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
+ elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
+if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
+ elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
+
+$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER);
+$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW);
+
+$sender = ereg_replace("[^0-9]","",$sender);
+$receiver = ereg_replace("[^0-9]","",$receiver);
+$cid_number = ereg_replace("[^0-9]","",$cid_number);
+$server_ip = ereg_replace("[^\.0-9]","",$server_ip);
+
+$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
+if ($DB) {echo "|$stmt|\n";}
+$rslt=mysql_query($stmt, $link);
+$row=mysql_fetch_row($rslt);
+$auth=$row[0];
+
+ if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
+ {
+ Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
+ Header("HTTP/1.0 401 Unauthorized");
+ echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
+ exit;
+ }
+
+$NOW_DATE = date("Y-m-d");
+$NOW_TIME = date("Y-m-d H:i:s");
+$STARTtime = date("U");
+
+
+?>
+
+
+
+
+
+
+$stmt="select server_ip,server_id from servers;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$servers_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $servers_to_print)
+ {
+ $row=mysql_fetch_row($rslt);
+ $groups[$i] = $row[0];
+ $group_names[$i] = $row[1];
+ $i++;
+ }
+
+echo "\n";
+echo "VICIDIAL: Manual CID call \n";
+echo "
\n\n";
+
+
+if ( (strlen($sender) < 6) or (strlen($receiver) < 6) or (strlen($cid_number) < 6) or (strlen($server_ip) < 7) )
+ {
+ echo "\n\n";
+ echo "PLEASE ENTER A CALLER, RECEIVER AND CALLERID NUMBER ABOVE AND CLICK SUBMIT\n";
+ }
+
+else
+ {
+ $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$PHP_AUTH_USER','$NOW_TIME','CID','$server_ip','$sender','$receiver','0','$cid_number','$ip')";
+ if ($DB) {echo "$stmt\n";}
+ $rslt=mysql_query($stmt, $link);
+
+ $Local_end = '@default';
+
+ $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','TESTCIDCALL098765432','Exten: 91$receiver','Context: default','Channel: Local/91$sender$Local_end','Priority: 1','Callerid: \"$cid_number\" <$cid_number>','','','','','');";
+ if ($DB) {echo "$stmt\n";}
+ $rslt=mysql_query($stmt, $link);
+
+ echo "Call sent from $sender to $receiver using CIDnumber: $cid_number";
+ }
+
+?>
+
+
+
diff --git a/agc_2-X/trunk/www/vicidial/user_territories.php b/agc_2-X/trunk/www/vicidial/user_territories.php
index 2f9efb62..e1147afe 100644
--- a/agc_2-X/trunk/www/vicidial/user_territories.php
+++ b/agc_2-X/trunk/www/vicidial/user_territories.php
@@ -9,9 +9,10 @@
#
# CHANGES
# 90520-1928 - first build
+# 90717-0651 - Added batch
#
-$version = '2.2.0-1';
+$version = '2.2.0-2';
$build = '90520-1928';
$MT[0]='';
@@ -33,6 +34,8 @@ if (isset($_GET["level"])) {$level=$_GET["level"];}
elseif (isset($_POST["level"])) {$level=$_POST["level"];}
if (isset($_GET["accountid"])) {$accountid=$_GET["accountid"];}
elseif (isset($_POST["accountid"])) {$accountid=$_POST["accountid"];}
+if (isset($_GET["batch"])) {$batch=$_GET["batch"];}
+ elseif (isset($_POST["batch"])) {$batch=$_POST["batch"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
@@ -82,26 +85,35 @@ if ($non_latin < 1)
$level = ereg_replace("[^\_A-Z]","",$level);
$old_territory = ereg_replace("[^-\_0-9a-zA-Z]","",$old_territory);
$old_user = ereg_replace("[^-\_0-9a-zA-Z]","",$old_user);
+ $accountid = ereg_replace("[^-\_0-9a-zA-Z]","",$accountid);
}
-$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
-$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
-$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER);
-$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
-
-$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_users='1'";
-if ($DB) {echo "|$stmt|\n";}
-if ($non_latin > 0) { $rslt=mysql_query("SET NAMES 'UTF8'");}
-$rslt=mysql_query($stmt, $link);
-$row=mysql_fetch_row($rslt);
-$auth=$row[0];
-
-if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
+if (eregi("YES",$batch))
{
- Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
- Header("HTTP/1.0 401 Unauthorized");
- echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
- exit;
+ $USER='batch';
+ $PASS='batch';
+ }
+else
+ {
+ $USER=$_SERVER['PHP_AUTH_USER'];
+ $PASS=$_SERVER['PHP_AUTH_PW'];
+ $USER = ereg_replace("[^0-9a-zA-Z]","",$USER);
+ $PASS = ereg_replace("[^0-9a-zA-Z]","",$PASS);
+
+ $stmt="SELECT count(*) from vicidial_users where user='$USER' and pass='$PASS' and user_level > 7 and modify_users='1'";
+ if ($DB) {echo "|$stmt|\n";}
+ if ($non_latin > 0) { $rslt=mysql_query("SET NAMES 'UTF8'");}
+ $rslt=mysql_query($stmt, $link);
+ $row=mysql_fetch_row($rslt);
+ $auth=$row[0];
+
+ if( (strlen($USER)<2) or (strlen($PASS)<2) or (!$auth))
+ {
+ Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
+ Header("HTTP/1.0 401 Unauthorized");
+ echo "Invalid Username/Password: |$USER|$PASS|\n";
+ exit;
+ }
}
if ($enable_vtiger_integration > 0)
@@ -177,7 +189,11 @@ if ( ($action == "PROCESS_CHANGE_TERRITORY_OWNER_ACCOUNT") and ($enable_vtiger_i
}
else
{
- $stmtV="SELECT tickersymbol from vtiger_account where accountid='$accountid';";
+ if (eregi("YES",$batch))
+ {$AID_lookupSQL = "website='$accountid'";}
+ else
+ {$AID_lookupSQL = "accountid='$accountid'";}
+ $stmtV="SELECT tickersymbol,accountid from vtiger_account where $AID_lookupSQL;";
$rsltV=mysql_query($stmtV, $linkV);
if ($DB) {echo "$stmtV\n";}
$vat_ct = mysql_num_rows($rsltV);
@@ -185,6 +201,7 @@ if ( ($action == "PROCESS_CHANGE_TERRITORY_OWNER_ACCOUNT") and ($enable_vtiger_i
{
$row=mysql_fetch_row($rsltV);
$territory = $row[0];
+ $accountid = $row[1];
$stmt="SELECT count(*) from vicidial_user_territories where territory='$territory' and user='$user';";
$rslt=mysql_query($stmt, $link);
@@ -200,7 +217,7 @@ if ( ($action == "PROCESS_CHANGE_TERRITORY_OWNER_ACCOUNT") and ($enable_vtiger_i
$SQL_log = "$stmt|$stmtB|";
$SQL_log = ereg_replace(';','',$SQL_log);
$SQL_log = addslashes($SQL_log);
- $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='TERRITORIES', event_type='ADD', record_id='$territory', event_code='ADMIN ADD USER TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
+ $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$USER', ip_address='$ip', event_section='TERRITORIES', event_type='ADD', record_id='$territory', event_code='ADMIN ADD USER TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -229,7 +246,7 @@ if ( ($action == "PROCESS_CHANGE_TERRITORY_OWNER_ACCOUNT") and ($enable_vtiger_i
$SQL_log = "$stmt|$stmtB|";
$SQL_log = ereg_replace(';','',$SQL_log);
$SQL_log = addslashes($SQL_log);
- $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='VTIGER', event_type='MODIFY', record_id='$accountid', event_code='VTIGER MODIFY TERRITORY OWNER ACCOUNT', event_sql=\"$SQL_log\", event_notes='';";
+ $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$USER', ip_address='$ip', event_section='VTIGER', event_type='MODIFY', record_id='$accountid', event_code='VTIGER MODIFY TERRITORY OWNER ACCOUNT', event_sql=\"$SQL_log\", event_notes='';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -388,7 +405,7 @@ if ( ($action == "PROCESS_CHANGE_TERRITORY_OWNER") and ($enable_vtiger_integrati
$SQL_log = "$stmt|$stmtB|";
$SQL_log = ereg_replace(';','',$SQL_log);
$SQL_log = addslashes($SQL_log);
- $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='TERRITORIES', event_type='ADD', record_id='$territory', event_code='ADMIN ADD USER TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
+ $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$USER', ip_address='$ip', event_section='TERRITORIES', event_type='ADD', record_id='$territory', event_code='ADMIN ADD USER TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -467,7 +484,7 @@ if ( ($action == "PROCESS_CHANGE_TERRITORY_OWNER") and ($enable_vtiger_integrati
$SQL_log = "$stmt|$stmtB|";
$SQL_log = ereg_replace(';','',$SQL_log);
$SQL_log = addslashes($SQL_log);
- $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='VTIGER', event_type='MODIFY', record_id='$territory', event_code='VTIGER MODIFY TERRITORY OWNER', event_sql=\"$SQL_log\", event_notes='';";
+ $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$USER', ip_address='$ip', event_section='VTIGER', event_type='MODIFY', record_id='$territory', event_code='VTIGER MODIFY TERRITORY OWNER', event_sql=\"$SQL_log\", event_notes='';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -562,7 +579,7 @@ if ($action == "PROCESS_ADD_USER_TERRITORY")
$SQL_log = "$stmt|$stmtB|";
$SQL_log = ereg_replace(';','',$SQL_log);
$SQL_log = addslashes($SQL_log);
- $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='TERRITORIES', event_type='ADD', record_id='$territory', event_code='ADMIN ADD USER TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
+ $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$USER', ip_address='$ip', event_section='TERRITORIES', event_type='ADD', record_id='$territory', event_code='ADMIN ADD USER TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -605,7 +622,7 @@ if ($action == "PROCESS_MODIFY_USER_TERRITORY")
$SQL_log = "$stmt|$stmtB|";
$SQL_log = ereg_replace(';','',$SQL_log);
$SQL_log = addslashes($SQL_log);
- $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='TERRITORIES', event_type='MODIFY', record_id='$territory', event_code='ADMIN MODIFY USER TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
+ $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$USER', ip_address='$ip', event_section='TERRITORIES', event_type='MODIFY', record_id='$territory', event_code='ADMIN MODIFY USER TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -642,7 +659,7 @@ if ($action == "DELETE_USER_TERRITORY")
$SQL_log = "$stmt|$stmtB|";
$SQL_log = ereg_replace(';','',$SQL_log);
$SQL_log = addslashes($SQL_log);
- $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='TERRITORIES', event_type='DELETE', record_id='$territory', event_code='ADMIN DELETE USER TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
+ $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$USER', ip_address='$ip', event_section='TERRITORIES', event_type='DELETE', record_id='$territory', event_code='ADMIN DELETE USER TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -700,7 +717,7 @@ if ($action == "PROCESS_ADD_TERRITORY")
$SQL_log = "$stmt|";
$SQL_log = ereg_replace(';','',$SQL_log);
$SQL_log = addslashes($SQL_log);
- $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='TERRITORIES', event_type='ADD', record_id='$territory', event_code='ADMIN ADD TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
+ $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$USER', ip_address='$ip', event_section='TERRITORIES', event_type='ADD', record_id='$territory', event_code='ADMIN ADD TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -737,7 +754,7 @@ if ($action == "DELETE_TERRITORY")
$SQL_log = "$stmt|";
$SQL_log = ereg_replace(';','',$SQL_log);
$SQL_log = addslashes($SQL_log);
- $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='TERRITORIES', event_type='DELETE', record_id='$territory', event_code='ADMIN DELETE TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
+ $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$USER', ip_address='$ip', event_section='TERRITORIES', event_type='DELETE', record_id='$territory', event_code='ADMIN DELETE TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -774,7 +791,7 @@ if ($action == "PROCESS_MODIFY_TERRITORY")
$SQL_log = "$stmt|";
$SQL_log = ereg_replace(';','',$SQL_log);
$SQL_log = addslashes($SQL_log);
- $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='TERRITORIES', event_type='MODIFY', record_id='$territory', event_code='ADMIN MODIFY TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
+ $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$USER', ip_address='$ip', event_section='TERRITORIES', event_type='MODIFY', record_id='$territory', event_code='ADMIN MODIFY TERRITORY', event_sql=\"$SQL_log\", event_notes='';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}