From a2fc6f5d2151992affec6f75395c604d6c5a6662 Mon Sep 17 00:00:00 2001 From: mattf Date: Mon, 22 Oct 2007 17:47:00 +0000 Subject: [PATCH] added several new features to inbound groups such as agent alerts, custom music-on-hold per group, rankings for agents per inbound group and other options git-svn-id: svn://192.168.202.10@689 3d104415-ff17-0410-8863-d5cf3c621b8a --- UPGRADE | 6 + agi/agi-VDAD_ALL_inbound.agi | 215 ++++++++-- bin/VICIDIAL_IN_new_leads_file.pl | 11 +- docs/BASE_INSTALL.txt | 7 +- docs/INBOUND-CLOSER_PROCESS.txt | 22 ++ docs/REQUIRED_APPS_INSTALL.txt | 26 +- docs/SCRATCH_INSTALL.txt | 14 +- docs/conf_examples/extensions.conf.sample | 4 + docs/conf_examples/extensions.conf.sample-1.4 | 4 + docs/conf_examples/musiconhold.conf.sample | 16 + extras/MySQL_AST_CREATE_tables.sql | 13 +- extras/upgrade_2.0.4.sql | 53 ++- install.pl | 1 + .../TO_BE_TRANSLATED_2.0.4.txt | 23 ++ www/vicidial/admin.php | 372 ++++++++++++++---- 15 files changed, 666 insertions(+), 121 deletions(-) create mode 100644 docs/conf_examples/musiconhold.conf.sample diff --git a/UPGRADE b/UPGRADE index edf1a438..8f8dfb30 100644 --- a/UPGRADE +++ b/UPGRADE @@ -45,6 +45,12 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom 9. Moved the audio transfer script and report generating scripts settings to /etc/astguiclient.conf settings file +10. Added agent alert, music-on-hold and several other parameters to inbound + groups. Make sure you have musiconhold working properly before using + in production. + + + diff --git a/agi/agi-VDAD_ALL_inbound.agi b/agi/agi-VDAD_ALL_inbound.agi index 92cc8d26..9eb21dbc 100644 --- a/agi/agi-VDAD_ALL_inbound.agi +++ b/agi/agi-VDAD_ALL_inbound.agi @@ -41,11 +41,15 @@ # # changes: # 70828-0924 - First Build +# 71013-0310 - Added use of default Music-on-hold instead of generic on-hold message +# 71020-1714 - fixed issues with MoH and stream_file messages # $script = 'agi-VDAD_ALL_inbound.agi'; $DROP_TIME = 360; ### default number of seconds to wait until you drop a waiting call +$start_moh=1; +$at='@'; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); @@ -57,6 +61,9 @@ if ($hour < 10) {$Fhour = "0$hour";} if ($min < 10) {$min = "0$min";} if ($sec < 10) {$sec = "0$sec";} +$hm = "$hour$min"; +$hm = ($hm + 0); + $now_date_epoch = time(); $now_date = "$year-$mon-$mday $hour:$min:$sec"; $start_time=$now_date; @@ -237,13 +244,6 @@ foreach $i (sort keys %AGI) if ($AGILOG) {$agi_string = "AGI Variables: |$unique_id|$channel|$extension|$type|$callerid|"; &agi_output;} -$AGI->stream_file('beep'); - -if ($call_handle_method =~ /DIGITID$/) -{ - &enter_pin_number; -} - if (length($pin) < 1) {$pin=$inbound_number;} $fronter = $pin; @@ -269,22 +269,147 @@ while ($sthArows > $cbc) { @aryA = $sthA->fetchrow_array; - $DBvoicemail_dump_exten = "$aryA[0]"; - $DBext_context = "$aryA[1]"; - $DBanswer_transfer_agent = "$aryA[2]"; - $DBSERVER_GMT = "$aryA[3]"; - $DBasterisk_version = "$aryA[4]"; - $DBmax_vicidial_trunks = "$aryA[5]"; + $DBvoicemail_dump_exten = "$aryA[0]"; + $DBext_context = "$aryA[1]"; + $DBanswer_transfer_agent = "$aryA[2]"; + $DBSERVER_GMT = "$aryA[3]"; + $DBasterisk_version = "$aryA[4]"; + $DBmax_vicidial_trunks = "$aryA[5]"; if ($DBvoicemail_dump_exten) {$voicemail_dump_exten = $DBvoicemail_dump_exten;} - if ($DBext_context) {$ext_context = $DBext_context;} + if ($DBext_context) {$ext_context = $DBext_context;} if ($DBanswer_transfer_agent) {$answer_transfer_agent = $DBanswer_transfer_agent;} - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - if ($DBasterisk_version) {$AST_ver = $DBasterisk_version;} - if ($DBmax_vicidial_trunks) {$max_vicidial_trunks = $DBmax_vicidial_trunks;} + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + if ($DBasterisk_version) {$AST_ver = $DBasterisk_version;} + if ($DBmax_vicidial_trunks) {$max_vicidial_trunks = $DBmax_vicidial_trunks;} $cbc++; } -$sthA->finish(); +$sthA->finish(); +### Grab inbound groups values from the database +$cbc=0; +$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay FROM vicidial_inbound_groups where group_id = '$channel_group';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +while ($sthArows > $cbc) + { + @aryA = $sthA->fetchrow_array; + + $call_time_id = "$aryA[0]"; + $after_hours_action = "$aryA[1]"; + $after_hours_message_filename = "$aryA[2]"; + $after_hours_exten = "$aryA[3]"; + $after_hours_voicemail = "$aryA[4]"; + $welcome_message_filename = "$aryA[5]"; + $moh_context = "$aryA[6]"; + $onhold_prompt_filename = "$aryA[7]"; + $prompt_interval = "$aryA[8]"; + $agent_alert_exten = "$aryA[9]"; + $agent_alert_delay = "$aryA[10]"; + $cbc++; + } +$sthA->finish(); + +if ($wday==0) {$daySQL=',ct_sunday_start,ct_sunday_stop';} +if ($wday==1) {$daySQL=',ct_monday_start,ct_monday_stop';} +if ($wday==2) {$daySQL=',ct_tuesday_start,ct_tuesday_stop';} +if ($wday==3) {$daySQL=',ct_wednesday_start,ct_wednesday_stop';} +if ($wday==4) {$daySQL=',ct_thursday_start,ct_thursday_stop';} +if ($wday==5) {$daySQL=',ct_friday_start,ct_friday_stop';} +if ($wday==6) {$daySQL=',ct_saturday_start,ct_saturday_stop';} + +### Grab call_times values from the database +$stmtA = "SELECT ct_default_start,ct_default_stop $daySQL FROM vicidial_call_times where call_time_id = '$call_time_id';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +@aryA = $sthA->fetchrow_array; +$ct_default_start = "$aryA[0]"; +$ct_default_stop = "$aryA[1]"; +$ct_day_start = "$aryA[2]"; +$ct_day_stop = "$aryA[3]"; +$sthA->finish(); + +if ( ($ct_day_start > 0) || ($ct_day_stop > 0) ) + { + $ct_default_start = $ct_day_start; + $ct_default_stop = $ct_day_stop; + } + +### check for after hours +if ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) + { + $VHqueryCID = "VA$CIDdate$hour$min$sec$sec"; + + if ($after_hours_action =~ /EXTENSION|VOICEMAIL/) + { + if ($after_hours_action =~ /EXTENSION/) + { + $DROPexten = "$after_hours_exten"; + } + if ($after_hours_action =~ /VOICEMAIL/) + { + $DROPexten = "$voicemail_dump_exten$after_hours_voicemail"; + } + if (length($DROPexten)>0) + { ### if DROP extension is defined then send the dropped call there instead of hangup + if ($AGILOG) {$agi_string = "exiting the VDAD app after hours, transferring call to $DROPexten"; &agi_output;} + print "SET CONTEXT $ext_context\n"; + checkresult($result); + print "SET EXTENSION $DROPexten\n"; + checkresult($result); + print "SET PRIORITY 1\n"; + checkresult($result); + } + } + $stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' and server_ip='$VARserver_ip' order by call_time desc limit 1;"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;} + + $stmtA = "UPDATE vicidial_closer_log set status='DROP',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',queue_seconds='$drop_seconds' where lead_id = '$new_lead_id' order by start_epoch desc limit 1;"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$new_lead_id|\n|$stmtA|"; &agi_output;} + + $stmtA = "UPDATE vicidial_list set status='XDROP' where lead_id = '$new_lead_id';"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDCL vl update: |$affected_rows|$new_lead_id|\n|$stmtA|"; &agi_output;} + + if ($after_hours_action =~ /HANGUP/) + { + ### insert a NEW record to the vicidial_manager table to hangup the channel + $stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Hangup','$VHqueryCID','Channel: $channel','','','','','','','','','')"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDCL call_hungup after hours: |$VHqueryCID|$VDADconf_exten|$channel|insert to vicidial_manager"; &agi_output;} + } + if ($after_hours_action =~ /MESSAGE/) + { + $AGI->stream_file('sip-silence'); + $AGI->stream_file("$after_hours_message_filename"); + sleep(1); + + ### insert a NEW record to the vicidial_manager table to hangup the channel + $stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Hangup','$VHqueryCID','Channel: $channel','','','','','','','','','')"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDCL call_hungup after hours: |$VHqueryCID|$VDADconf_exten|$channel|insert to vicidial_manager"; &agi_output;} + } + + $dbhA->disconnect(); + + exit; + + } + +$AGI->stream_file('beep'); + +if ($welcome_message_filename !~ /---NONE---/) + { + $AGI->stream_file("$welcome_message_filename"); + } + +if ($call_handle_method =~ /DIGITID$/) +{ + &enter_pin_number; +} if ($call_handle_method =~ /LOOKUP/) { @@ -408,7 +533,7 @@ $VDADlead_id = $new_lead_id; $drop_timer=0; $drop_seconds=0; -$hold_message_counter=25; +$hold_message_counter=($prompt_interval - 10); $hold_tone_counter=0; while ($drop_timer <= $DROP_TIME) @@ -511,6 +636,19 @@ if ($call_handle_method =~ /DIGITID$/) $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- closer log : |$affected_rows|$new_lead_id\n|$stmtA|"; &agi_output;} + ### if agent alert exten is not disabled, then trigger the alert and wait + if ($agent_alert_exten !~ /X/i) + { + $VHqueryCID = "VH$CIDdate$VDADconf_exten"; + + ### insert a NEW record to the vicidial_manager table to play the alert message to the agent + $stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Originate','$VHqueryCID','Exten: $agent_alert_exten','Context: $ext_context','Channel: Local/7$VDADconf_exten$at$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: 10','','','','')"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDCL agent alert: |$VHqueryCID|7$VDADconf_exten|$channel|insert to vicidial_manager"; &agi_output;} + + usleep(1 * $agent_alert_delay * 1000); + } + if ($AGILOG) {$agi_string = "exiting VDAD app, transferring call to $VDADconf_exten"; &agi_output;} print "SET CONTEXT $ext_context\n"; checkresult($result); @@ -618,8 +756,23 @@ if ($agent_search_method =~ /^LO|^LB/) $d = leading_zero($4); $VDADremDIALstr = "$a$S$b$S$c$S$d$S"; } + $alertVDADremDIALstr = "$VDADremDIALstr"; + $alertVDADremDIALstr .= "7$VDADconf_exten"; $VDADremDIALstr .= "$VDADconf_exten"; + ### if agent alert exten is not disabled, then trigger the alert and wait + if ($agent_alert_exten !~ /X/i) + { + $VHqueryCID = "VH$CIDdate$VDADconf_exten"; + + ### insert a NEW record to the vicidial_manager table to play the alert message to the agent + $stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Originate','$VHqueryCID','Exten: $agent_alert_exten','Context: $ext_context','Channel: Local/$alertVDADremDIALstr$at$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: 10','','','','')"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDCL agent alert: |$VHqueryCID|$alertVDADremDIALstr|$channel|insert to vicidial_manager"; &agi_output;} + + usleep(1 * $agent_alert_delay * 1000); + } + if ($AGILOG) {$agi_string = "exiting VDAD app, transferring call to $VDADremDIALstr"; &agi_output;} print "SET CONTEXT $ext_context\n"; checkresult($result); @@ -660,15 +813,16 @@ if ($agent_search_method =~ /^LO|^LB/) } } -if ($hold_message_counter > 30) +if ($hold_message_counter > $prompt_interval) { - $AGI->stream_file('generic_hold'); + $AGI->stream_file('sip-silence'); # stop music-on-hold process + $AGI->stream_file("$onhold_prompt_filename"); $hold_message_counter = 0; + $start_moh=1; } else {$hold_message_counter++;} if ($hold_tone_counter > 3) { - $AGI->stream_file('hold_tone'); $hold_tone_counter = 0; } else {$hold_tone_counter++;} @@ -681,6 +835,12 @@ if ($drop_timer < 3) } else { + if ($start_moh > 0) + { + $start_moh=0; + print "SET MUSIC ON $moh_context\n"; + checkresult($result); + } ### sleep for 99 hundredths of a second usleep(1*990*1000); @@ -694,6 +854,17 @@ $affected_rows = $dbhA->do($stmtA); } + + + + + + + + + + + if ($drop_timer >= $DROP_TIME) { ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); diff --git a/bin/VICIDIAL_IN_new_leads_file.pl b/bin/VICIDIAL_IN_new_leads_file.pl index 88da04a2..68e88213 100644 --- a/bin/VICIDIAL_IN_new_leads_file.pl +++ b/bin/VICIDIAL_IN_new_leads_file.pl @@ -152,6 +152,7 @@ if (length($ARGV[0])>1) { @data_in = split(/-forcelistid=/,$args); $forcelistid = $data_in[1]; + $forcelistid =~ s/ .*//gi; print "\n----- FORCE LISTID OVERRIDE: $forcelistid -----\n\n"; } else @@ -276,7 +277,8 @@ if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOC $multi_insert_counter=0; $multistmt=''; - while () +if ($DB) +# while () { # print "$a| $number\n"; @@ -327,6 +329,13 @@ if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOC $called_count = $m[23]; $called_count =~ s/\D|\r|\n|\t//gi; if (length($called_count)<1) {$called_count=0;} $status = $m[24]; $status =~ s/ |\r|\n|\t//gi; if (length($status)<1) {$status='NEW';} $insert_date = $m[25]; $insert_date =~ s/\r|\n|\t|[a-zA-Z]//gi; if (length($insert_date)<6) {$insert_date=$pulldate0;} + if ($insert_date =~ /\//) + { + @iD = split(/\//, $insert_date); + $iD[0] = sprintf("%02d", $iD[0]); + $iD[1] = sprintf("%02d", $iD[1]); + $insert_date = "$iD[2]-$iD[0]-$iD[1]"; + } if (length($forcelistid) > 0) { diff --git a/docs/BASE_INSTALL.txt b/docs/BASE_INSTALL.txt index db4e8435..1102fa6e 100644 --- a/docs/BASE_INSTALL.txt +++ b/docs/BASE_INSTALL.txt @@ -100,8 +100,9 @@ make make install make samples # this makes sample conf files (only use for new installs) - - (1.2 tree) EXPERIMENTAL!!! If you want to use app_conference - instead of meetme for VICIDIAL then follow these instructions + - (1.2 tree) EXPERIMENTAL AND NOT RECOMMENDED!!! If you want to use + app_conference instead of meetme for VICIDIAL then follow these + instructions: cd /usr/src/asterisk wget http://www.eflo.net/files/VD_app_conference_0.6.zip unzip VD_app_conference_0.6.zip @@ -203,7 +204,7 @@ package(as of this writing it is 2.0.3) - for SVN 2.0 trunk: mkdir /usr/src/astguiclient cd /usr/src/astguiclient - svn checkout svn://205.201.151.21:43690/agc_2-X/trunk + svn checkout svn://svn.eflo.net:43690/agc_2-X/trunk cd trunk perl install.pl select to do interactive setup and customize to your server diff --git a/docs/INBOUND-CLOSER_PROCESS.txt b/docs/INBOUND-CLOSER_PROCESS.txt index 1e8ae8ae..26937804 100644 --- a/docs/INBOUND-CLOSER_PROCESS.txt +++ b/docs/INBOUND-CLOSER_PROCESS.txt @@ -78,3 +78,25 @@ PLACE - this status is a placeholder for the customer after they choose the opti MORE TO COME... + + + +- optionally make native audio files for Music On Hold: + +cd /var/lib/asterisk/mohmp3/ +mpg123 -s --rate 44100 --mono /var/lib/asterisk/mohmp3/fpm-sunshine.mp3 > /var/lib/asterisk/mohmp3/fpm-sunshine.raw +sox -r 44100 -w -s -c 1 fpm-sunshine.raw -r 8000 -c 1 fpm-sunshine.wav +sox fpm-sunshine.wav -t gsm -r 8000 -b -c 1 fpm-sunshine.gsm +sox fpm-sunshine.wav -t ul -r 8000 -b -c 1 fpm-sunshine.pcm +mpg123 -s --rate 44100 --mono /var/lib/asterisk/mohmp3/fpm-calm-river.mp3 > /var/lib/asterisk/mohmp3/fpm-calm-river.raw +sox -r 44100 -w -s -c 1 fpm-calm-river.raw -r 8000 -c 1 fpm-calm-river.wav +sox fpm-calm-river.wav -t gsm -r 8000 -b -c 1 fpm-calm-river.gsm +sox fpm-calm-river.wav -t ul -r 8000 -b -c 1 fpm-calm-river.pcm +mpg123 -s --rate 44100 --mono /var/lib/asterisk/mohmp3/fpm-world-mix.mp3 > /var/lib/asterisk/mohmp3/fpm-world-mix.raw +sox -r 44100 -w -s -c 1 fpm-world-mix.raw -r 8000 -c 1 fpm-world-mix.wav +sox fpm-world-mix.wav -t gsm -r 8000 -b -c 1 fpm-world-mix.gsm +sox fpm-world-mix.wav -t ul -r 8000 -b -c 1 fpm-world-mix.pcm +rm -f *.raw +mkdir ../orig-mp3 +mv -f *.mp3 ../orig-mp3/ + diff --git a/docs/REQUIRED_APPS_INSTALL.txt b/docs/REQUIRED_APPS_INSTALL.txt index f4c52a19..9e94068c 100644 --- a/docs/REQUIRED_APPS_INSTALL.txt +++ b/docs/REQUIRED_APPS_INSTALL.txt @@ -288,15 +288,15 @@ make install mkdir /usr/src/asterisk cd /usr/src/asterisk wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.23.tar.gz -wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.20.1.tar.gz +wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.21.tar.gz wget http://ftp.digium.com/pub/libpri/releases/libpri-1.2.5.tar.gz gunzip asterisk-1.2.23.tar.gz tar xvf asterisk-1.2.23.tar -gunzip zaptel-1.2.20.1.tar.gz -tar xvf zaptel-1.2.20.1.tar +gunzip zaptel-1.2.21.tar.gz +tar xvf zaptel-1.2.21.tar gunzip libpri-1.2.5.tar.gz tar xvf libpri-1.2.5.tar -cd ./zaptel-1.2.20.1 +cd ./zaptel-1.2.21 wget http://www.freedomphones.net/files/newt-0.51.6.tar.gz gunzip newt-0.51.6.tar.gz tar xvf newt-0.51.6.tar @@ -364,6 +364,24 @@ make make install +cd /var/lib/asterisk/mohmp3/ +mpg123 -s --rate 44100 --mono /var/lib/asterisk/mohmp3/fpm-sunshine.mp3 > /var/lib/asterisk/mohmp3/fpm-sunshine.raw +sox -r 44100 -w -s -c 1 fpm-sunshine.raw -r 8000 -c 1 fpm-sunshine.wav +sox fpm-sunshine.wav -t gsm -r 8000 -b -c 1 fpm-sunshine.gsm +sox fpm-sunshine.wav -t ul -r 8000 -b -c 1 fpm-sunshine.pcm +mpg123 -s --rate 44100 --mono /var/lib/asterisk/mohmp3/fpm-calm-river.mp3 > /var/lib/asterisk/mohmp3/fpm-calm-river.raw +sox -r 44100 -w -s -c 1 fpm-calm-river.raw -r 8000 -c 1 fpm-calm-river.wav +sox fpm-calm-river.wav -t gsm -r 8000 -b -c 1 fpm-calm-river.gsm +sox fpm-calm-river.wav -t ul -r 8000 -b -c 1 fpm-calm-river.pcm +mpg123 -s --rate 44100 --mono /var/lib/asterisk/mohmp3/fpm-world-mix.mp3 > /var/lib/asterisk/mohmp3/fpm-world-mix.raw +sox -r 44100 -w -s -c 1 fpm-world-mix.raw -r 8000 -c 1 fpm-world-mix.wav +sox fpm-world-mix.wav -t gsm -r 8000 -b -c 1 fpm-world-mix.gsm +sox fpm-world-mix.wav -t ul -r 8000 -b -c 1 fpm-world-mix.pcm +rm -f *.raw +mkdir ../orig-mp3 +mv -f *.mp3 ../orig-mp3/ + + ############# INSTRUCTIONS FOR Asterik 1.4 release #################### diff --git a/docs/SCRATCH_INSTALL.txt b/docs/SCRATCH_INSTALL.txt index dc62ad77..d04b4c60 100644 --- a/docs/SCRATCH_INSTALL.txt +++ b/docs/SCRATCH_INSTALL.txt @@ -501,6 +501,7 @@ to be loaded to use that option. - you are done + Screen is a terminal emulator that allows you to run a process as command line and be able to detach from them('Ctrl+a' then 'd') and log all output of the terminal to a screenlog file if desired(add a '-L' to the launching command). @@ -918,8 +919,9 @@ with the following patch: - make install - make samples # this makes sample conf files (only use for new installs) - - (1.2 tree) EXPERIMENTAL!!! If you want to use app_conference - instead of meetme for VICIDIAL then follow these instructions + - (1.2 tree) EXPERIMENTAL AND NOT RECOMMENDED!!! If you want to use + app_conference instead of meetme for VICIDIAL then follow these + instructions: - cd /usr/src/asterisk - wget http://www.eflo.net/files/VD_app_conference_0.6.zip - unzip VD_app_conference_0.6.zip @@ -1610,8 +1612,8 @@ package(as of this writing it is 2.0.3) - for SVN 2.0 trunk: - mkdir /usr/src/astguiclient - cd /usr/src/astguiclient - - svn checkout svn://205.201.151.21:43690/agc_2-X - - cd agc_2-X/trunk/ + - svn checkout svn://svn.eflo.net:43690/agc_2-X/trunk + - cd trunk - perl install.pl select to do interactive setup and customize to your server - there is one more file you need that's not included with the download @@ -2418,6 +2420,10 @@ exten => 8302,1,Answer exten => 8302,2,Playback(conf) exten => 8302,3,Hangup +exten => 8304,1,Answer +exten => 8304,2,Playback(ding) +exten => 8304,3,Hangup + ; default audio for safe harbor 2-second-after-hello message then hangup ; create a GSM formatted audio file complies with safe harbor rules ; and put it in /var/lib/asterisk/sounds then change filename below diff --git a/docs/conf_examples/extensions.conf.sample b/docs/conf_examples/extensions.conf.sample index 6baba71d..0ccc3129 100644 --- a/docs/conf_examples/extensions.conf.sample +++ b/docs/conf_examples/extensions.conf.sample @@ -520,6 +520,10 @@ exten => 8302,1,Answer exten => 8302,2,Playback(conf) exten => 8302,3,Hangup +exten => 8304,1,Answer +exten => 8304,2,Playback(ding) +exten => 8304,3,Hangup + ; default audio for safe harbor 2-second-after-hello message then hangup ; create a GSM formatted audio file complies with safe harbor rules ; and put it in /var/lib/asterisk/sounds then change filename below diff --git a/docs/conf_examples/extensions.conf.sample-1.4 b/docs/conf_examples/extensions.conf.sample-1.4 index 9345ca80..f55aca72 100644 --- a/docs/conf_examples/extensions.conf.sample-1.4 +++ b/docs/conf_examples/extensions.conf.sample-1.4 @@ -520,6 +520,10 @@ exten => 8302,1,Answer exten => 8302,2,Playback(conf) exten => 8302,3,Hangup +exten => 8304,1,Answer +exten => 8304,2,Playback(ding) +exten => 8304,3,Hangup + ; default audio for safe harbor 2-second-after-hello message then hangup ; create a GSM formatted audio file complies with safe harbor rules ; and put it in /var/lib/asterisk/sounds then change filename below diff --git a/docs/conf_examples/musiconhold.conf.sample b/docs/conf_examples/musiconhold.conf.sample new file mode 100644 index 00000000..5b18de7a --- /dev/null +++ b/docs/conf_examples/musiconhold.conf.sample @@ -0,0 +1,16 @@ +; +; Music on Hold -- Sample Configuration +; + +[default] +mode=files +directory=/var/lib/asterisk/mohmp3 + +; valid mode options: +; quietmp3 -- default +; mp3 -- loud +; mp3nb -- unbuffered +; quietmp3nb -- quiet unbuffered +; custom -- run a custom application +; files -- read files from a directory in any Asterisk supported format + diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 6653aa1d..f682f88e 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -599,7 +599,18 @@ xferconf_b_dtmf VARCHAR(50), xferconf_b_number VARCHAR(50), drop_call_seconds SMALLINT(4) unsigned default '360', drop_message ENUM('Y','N') default 'N', -drop_exten VARCHAR(20) default '8307' +drop_exten VARCHAR(20) default '8307', +call_time_id VARCHAR(20) default '24hours', +after_hours_action ENUM('HANGUP','MESSAGE','EXTENSION','VOICEMAIL') default 'MESSAGE', +after_hours_message_filename VARCHAR(50) default 'vm-goodbye', +after_hours_exten VARCHAR(20) default '8300', +after_hours_voicemail VARCHAR(20), +welcome_message_filename VARCHAR(50) default '---NONE---', +moh_context VARCHAR(50) default 'default', +onhold_prompt_filename VARCHAR(50) default 'generic_hold', +prompt_interval SMALLINT(5) UNSIGNED default '60', +agent_alert_exten VARCHAR(20) default '8304', +agent_alert_delay INT(6) default '1000' ); CREATE TABLE vicidial_stations ( diff --git a/extras/upgrade_2.0.4.sql b/extras/upgrade_2.0.4.sql index 492b7609..4fd94c55 100644 --- a/extras/upgrade_2.0.4.sql +++ b/extras/upgrade_2.0.4.sql @@ -79,30 +79,61 @@ index (entry_time) ALTER TABLE vicidial_ivr AUTO_INCREMENT = 1000000; +ALTER TABLE vicidial_inbound_groups ADD call_time_id VARCHAR(20) default '24hours'; +ALTER TABLE vicidial_inbound_groups ADD after_hours_action ENUM('HANGUP','MESSAGE','EXTENSION','VOICEMAIL') default 'MESSAGE'; +ALTER TABLE vicidial_inbound_groups ADD after_hours_message_filename VARCHAR(50) default 'vm-goodbye'; +ALTER TABLE vicidial_inbound_groups ADD after_hours_exten VARCHAR(20) default '8300'; +ALTER TABLE vicidial_inbound_groups ADD after_hours_voicemail VARCHAR(20); +ALTER TABLE vicidial_inbound_groups ADD welcome_message_filename VARCHAR(50) default '---NONE---'; +ALTER TABLE vicidial_inbound_groups ADD moh_context VARCHAR(50) default 'default'; +ALTER TABLE vicidial_inbound_groups ADD onhold_prompt_filename VARCHAR(50) default 'generic_hold'; +ALTER TABLE vicidial_inbound_groups ADD prompt_interval SMALLINT(5) UNSIGNED default '60'; +ALTER TABLE vicidial_inbound_groups ADD agent_alert_exten VARCHAR(20) default '8304'; +ALTER TABLE vicidial_inbound_groups ADD agent_alert_delay INT(6) default '1000'; + +ALTER TABLE vicidial_list MODIFY called_count SMALLINT(5) UNSIGNED default '0'; + +CREATE TABLE vicidial_inbound_group_agents ( +user VARCHAR(20), +group_id VARCHAR(20), +group_rank TINYINT(1) default '0', +group_weight TINYINT(1) default '0', +calls_today SMALLINT(5) UNSIGNED default '0', +index (group_id), +index (user) +); + + + #!!!!!!! CHANGES BELOW THIS LINE ARE NOT FOR PRODUCTION USE YET, DO NOT APPLY THEM!!!!!!!!!!!!!!!!!!!!! # # #ALTER TABLE vicidial_hopper ADD priority TINYINT(2) default '50'; # -#ALTER TABLE vicidial_inbound_groups ADD moh_extension VARCHAR(20); -#ALTER TABLE vicidial_inbound_groups ADD prompt_interval SMALLINT(5) UNSIGNED default '60'; #ALTER TABLE vicidial_inbound_groups ADD announce_place_in_line ENUM('Y','N') default 'N'; #ALTER TABLE vicidial_inbound_groups ADD announce_estimate_hold_time ENUM('Y','N') default 'N'; #ALTER TABLE vicidial_inbound_groups ADD allow_leave_queue_place ENUM('Y','N') default 'N'; #ALTER TABLE vicidial_inbound_groups ADD allow_leave_queue_message ENUM('Y','N') default 'N'; -#ALTER TABLE vicidial_inbound_groups ADD callback_number_validation ENUM('6','7','8','9','10','11','12','13','14','NORTH_AMERICA','UK'); -#ALTER TABLE vicidial_inbound_groups ADD call_time VARCHAR(20); -#ALTER TABLE vicidial_inbound_groups ADD after_hours ENUM('HANGUP','VOICEMAIL','EXTENSION') default 'EXTENSION'; -#ALTER TABLE vicidial_inbound_groups ADD after_hours_exten VARCHAR(20); +#ALTER TABLE vicidial_inbound_groups ADD callback_number_validation ENUM('6','7','8','9','10','11','12','13','14','NORTH_AMERICA','UK','NONE'); # -#ALTER TABLE servers ADD hold_queue_prompt_exten VARCHAR(20) default '8359'; -# -#ALTER TABLE vicidial_auto_calls ADD last_prompt_time DATETIME; -#ALTER TABLE vicidial_auto_calls ADD random_id INT(9) UNSIGNED; -#ALTER TABLE vicidial_auto_calls ADD recording_id INT(10) UNSIGNED; +#ALTER TABLE servers ADD hold_queue_prompt_filename VARCHAR(50) default 'park'; # #ALTER TABLE vicidial_user_groups ADD allowable_xfer_inbound_groups TEXT #ALTER TABLE vicidial_user_groups ADD default_xfer_inbound_group VARCHAR(20) +# +# CREATE TABLE vicidial_live_inbound_agents ( +# user VARCHAR(20), +# group_id VARCHAR(20), +# group_weight TINYINT(1) default '0', +# calls_today SMALLINT(5) UNSIGNED default '0'; +# last_call_time DATETIME, +# last_call_finish DATETIME, +# random_id INT(8) UNSIGNED, +# index (group_id), +# index (group_weight) +# ); +# + diff --git a/install.pl b/install.pl index 54a0fb56..3a4c86c7 100644 --- a/install.pl +++ b/install.pl @@ -1869,6 +1869,7 @@ if ($PROMPTcopy_conf_files =~ /y/i) `cp -f ./docs/conf_examples/extensions.conf.sample /etc/asterisk/extensions.conf`; `cp -f ./docs/conf_examples/meetme.conf.sample /etc/asterisk/meetme.conf`; `cp -f ./docs/conf_examples/manager.conf.sample /etc/asterisk/manager.conf`; + `cp -f ./docs/conf_examples/musiconhold.conf.sample /etc/asterisk/musiconhold.conf`; `cp -f ./docs/conf_examples/voicemail.conf.sample /etc/asterisk/voicemail.conf`; `cp -f ./docs/conf_examples/sip.conf.sample /etc/asterisk/sip.conf`; `cp -f ./docs/conf_examples/logger.conf.sample /etc/asterisk/logger.conf`; diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt index 8d90fa3c..6a067de4 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt @@ -82,6 +82,29 @@ LIST MIX NOT ACTIVATED|| LIST MIX ACTIVATED|| Enable Agent Transfer Logfile -<\/B> This option will log to a text logfile on the webserver every time a call is transferred to an agent. Default is 0, disabled|| Enable Agent Transfer Logfile|| +Call Time -<\/B> This is the call time scheme to use for this inbound group. Keep in mind that the time is based on the server time. Default is 24hours|| +After Hours Action -<\/B> The action to perform if it is after hours as defined in the call time for this inbound group. HANGUP will immediately hangup the call, MESSASGE will play the file in the After Hours Message Filenam field, EXTENSION will send the call to the After Hours Extension in the dialplan and VOICEMAIL will send the call to the voicemail box listed in the After Hours Voicemail field. Default is MESSAGE|| +After Hours Message Filename -<\/B> The audio file located on the server to be played if the Action is set to MESSAGE. Default is vm-goodbye|| +After Hours Extension -<\/B> The dialplan extension to send the call to if the Action is set to EXTENSION. Default is 8300|| +After Hours Voicemail -<\/B> The voicemail box to send the call to if the Action is set to VOICEMAIL|| +Welcome Message Filename -<\/B> The audio file located on the server to be played when the call comes in. If set to ---NONE--- then no message will be played. Default is ---NONE---|| +Music On Hold Context -<\/B> The music on hold context to use when the customer is placed on hold. Default is default|| +On Hold Prompt Filename -<\/B> The audio file located on the server to be played at a regular interval when the customer is on hold. Default is generic_hold|| +On Hold Prompt Interval -<\/B> The length of time in seconds to wait before playing the on hold prompt. Default is 60|| +Agent Alert Extension -<\/B> The extension to send into the agent session to announce that a call is coming to the agent. This extension should have a Playback of an audio file. To not use this function set this to X. Default is X|| +Agent Alert Delay -<\/B> The length of time in milliseconds to wait before sending the call to the agent after playing the on Agent Alert Extension. Default is 1000|| +Call Time: || +After Hours Action: || +After Hours Message Filename: || +After Hours Extension: || +After Hours Voicemail: || +Welcome Message Filename: || +Music On Hold Context: || +On Hold Prompt Filename: || +On Hold Prompt Interval: || +Agent Alert Extension: || +Agent Alert Delay: || +You will also be able to set the rank, or skill level, in this section for each of the inbound groups as well as being able to see the number of calls received from each inbound group for this specific agent|| ############################################################ CLIENT diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 1005ae97..d14523e1 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -631,6 +631,29 @@ if (isset($_GET["mix_container_item"])) {$mix_container_item=$_GET["mix_conta elseif (isset($_POST["mix_container_item"])) {$mix_container_item=$_POST["mix_container_item"];} if (isset($_GET["enable_agc_xfer_log"])) {$enable_agc_xfer_log=$_GET["enable_agc_xfer_log"];} elseif (isset($_POST["enable_agc_xfer_log"])) {$enable_agc_xfer_log=$_POST["enable_agc_xfer_log"];} +if (isset($_GET["after_hours_action"])) {$after_hours_action=$_GET["after_hours_action"];} + elseif (isset($_POST["after_hours_action"])) {$after_hours_action=$_POST["after_hours_action"];} +if (isset($_GET["after_hours_message_filename"])) {$after_hours_message_filename=$_GET["after_hours_message_filename"];} + elseif (isset($_POST["after_hours_message_filename"])) {$after_hours_message_filename=$_POST["after_hours_message_filename"];} +if (isset($_GET["after_hours_exten"])) {$after_hours_exten=$_GET["after_hours_exten"];} + elseif (isset($_POST["after_hours_exten"])) {$after_hours_exten=$_POST["after_hours_exten"];} +if (isset($_GET["after_hours_voicemail"])) {$after_hours_voicemail=$_GET["after_hours_voicemail"];} + elseif (isset($_POST["after_hours_voicemail"])) {$after_hours_voicemail=$_POST["after_hours_voicemail"];} +if (isset($_GET["welcome_message_filename"])) {$welcome_message_filename=$_GET["welcome_message_filename"];} + elseif (isset($_POST["welcome_message_filename"])) {$welcome_message_filename=$_POST["welcome_message_filename"];} +if (isset($_GET["moh_context"])) {$moh_context=$_GET["moh_context"];} + elseif (isset($_POST["moh_context"])) {$moh_context=$_POST["moh_context"];} +if (isset($_GET["onhold_prompt_filename"])) {$onhold_prompt_filename=$_GET["onhold_prompt_filename"];} + elseif (isset($_POST["onhold_prompt_filename"])) {$onhold_prompt_filename=$_POST["onhold_prompt_filename"];} +if (isset($_GET["prompt_interval"])) {$prompt_interval=$_GET["prompt_interval"];} + elseif (isset($_POST["prompt_interval"])) {$prompt_interval=$_POST["prompt_interval"];} +if (isset($_GET["agent_alert_exten"])) {$agent_alert_exten=$_GET["agent_alert_exten"];} + elseif (isset($_POST["agent_alert_exten"])) {$agent_alert_exten=$_POST["agent_alert_exten"];} +if (isset($_GET["agent_alert_delay"])) {$agent_alert_delay=$_GET["agent_alert_delay"];} + elseif (isset($_POST["agent_alert_delay"])) {$agent_alert_delay=$_POST["agent_alert_delay"];} +if (isset($_GET["group_rank"])) {$group_rank=$_GET["group_rank"];} + elseif (isset($_POST["group_rank"])) {$group_rank=$_POST["group_rank"];} + if (isset($script_id)) {$script_id= strtoupper($script_id);} if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} @@ -765,6 +788,11 @@ $enable_queuemetrics_logging = ereg_replace("[^0-9]","",$enable_queuemetrics_log $enable_sipsak_messages = ereg_replace("[^0-9]","",$enable_sipsak_messages); $allow_sipsak_messages = ereg_replace("[^0-9]","",$allow_sipsak_messages); $mix_container_item = ereg_replace("[^0-9]","",$mix_container_item); +$prompt_interval = ereg_replace("[^0-9]","",$prompt_interval); +$agent_alert_delay = ereg_replace("[^0-9]","",$agent_alert_delay); + +### DIGITS and DASHES +$group_rank = ereg_replace("[^-0-9]","",$group_rank); ### Y or N ONLY ### $active = ereg_replace("[^NY]","",$active); @@ -807,6 +835,9 @@ $billable = ereg_replace("[^0-9a-zA-Z]","",$billable); $pause_code = ereg_replace("[^0-9a-zA-Z]","",$pause_code); $vicidial_recording_override = ereg_replace("[^0-9a-zA-Z]","",$vicidial_recording_override); $queuemetrics_log_id = ereg_replace("[^0-9a-zA-Z]","",$queuemetrics_log_id); +$after_hours_action = ereg_replace("[^0-9a-zA-Z]","",$after_hours_action); +$after_hours_exten = ereg_replace("[^0-9a-zA-Z]","",$after_hours_exten); +$after_hours_voicemail = ereg_replace("[^0-9a-zA-Z]","",$after_hours_voicemail); ### DIGITS and Dots $server_ip = ereg_replace("[^\.0-9]","",$server_ip); @@ -884,6 +915,8 @@ $vcl_id = ereg_replace("[^-\_0-9a-zA-Z]","",$vcl_id); $mix_method = ereg_replace("[^-\_0-9a-zA-Z]","",$mix_method); $category = ereg_replace("[^-\_0-9a-zA-Z]","",$category); $vsc_id = ereg_replace("[^-\_0-9a-zA-Z]","",$vsc_id); +$moh_context = ereg_replace("[^-\_0-9a-zA-Z]","",$moh_context); +$agent_alert_exten = ereg_replace("[^-\_0-9a-zA-Z]","",$agent_alert_exten); ### ALPHA-NUMERIC and spaces $lead_order = ereg_replace("[^ 0-9a-zA-Z]","",$lead_order); @@ -935,6 +968,9 @@ $telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host); $queuemetrics_dbname = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_dbname); $queuemetrics_login = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_login); $queuemetrics_pass = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_pass); +$after_hours_message_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$after_hours_message_filename); +$welcome_message_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$welcome_message_filename); +$onhold_prompt_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$onhold_prompt_filename); ### remove semi-colons ### $lead_filter_sql = ereg_replace(";","",$lead_filter_sql); @@ -1070,11 +1106,13 @@ $list_mix_container = ereg_replace(";","",$list_mix_container); # 70629-1721 - List Mix section adding and removing of list entries active # 70706-1636 - List Mix section cleanup and more error-checking # 70908-0941 - Added agc logile enable system_settings -# +# 71020-1934 - Added inbound groups options: on-hold music, messages, call_times +# 71022-1343 - Added inbound group ranks for users +# # 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.0.4-109'; -$build = '70908-0941'; +$admin_version = '2.0.4-111'; +$build = '71022-1343'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -1472,25 +1510,82 @@ if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($ADD $groups_to_print = mysql_num_rows($rslt); $groups_list=''; $groups_value=''; + $RANKgroups_list="INBOUND GROUP     RANK     CALLS\n"; $o=0; while ($groups_to_print > $o) { $rowx=mysql_fetch_row($rslt); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= " $o) + { + $stmt="SELECT group_rank,calls_today from vicidial_inbound_group_agents where user='$user' and group_id='$group_id_values[$o]'"; + $rslt=mysql_query($stmt, $link); + $ranks_to_print = mysql_num_rows($rslt); + if ($ranks_to_print > 0) { - if ($group_id_value == $groups[$p]) + $row=mysql_fetch_row($rslt); + $SELECT_group_rank = $row[0]; + $calls_today = $row[1]; + } + else + {$calls_today=0; $SELECT_group_rank=0;} + if ( ($ADD=="4A") or ($ADD=="4B") ) + { + if (isset($_GET["RANK_$group_id_values[$o]"])) {$group_rank=$_GET["RANK_$group_id_values[$o]"];} + elseif (isset($_POST["RANK_$group_id_values[$o]"])) {$group_rank=$_POST["RANK_$group_id_values[$o]"];} + + if ($ranks_to_print > 0) + { + $stmt="UPDATE vicidial_inbound_group_agents set group_rank='$group_rank', group_weight='$group_rank' where group_id='$group_id_values[$o]' and user='$user';"; + $rslt=mysql_query($stmt, $link); + } + else + { + $stmt="INSERT INTO vicidial_inbound_group_agents set group_rank='$group_rank', group_weight='$group_rank', group_id='$group_id_values[$o]', user='$user';"; + $rslt=mysql_query($stmt, $link); + } + } + else {$group_rank = $SELECT_group_rank;} + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $groups_list .= "$group_id_values[$o] - $group_name_values[$o]
\n"; + $RANKgroups_list .= "> $group_id_values[$o] - $group_name_values[$o] "; + $RANKgroups_list .= "     $NWB#vicidial_users-closer_default_blended$NWE\n"; echo "VICIDIAL Recording Override: $NWB#vicidial_users-vicidial_recording_override$NWE\n"; echo "Agent Alter Customer Data Override: $NWB#vicidial_users-alter_custdata_override$NWE\n"; - echo "Inbound Groups: \n"; - echo "$groups_list"; - echo "$NWB#vicidial_users-closer_campaigns$NWE\n"; + echo "Inbound Groups: $NWB#vicidial_users-closer_campaigns$NWE
\n"; + echo "\n"; + echo "$RANKgroups_list"; + echo "
\n"; + echo "\n"; } if ($LOGuser_level > 8) { echo "ADMIN INTERFACE OPTIONS:\n"; - echo "Alter Agent Interface Options: $NWB#vicidial_users-alter_agent_interface_options$NWE\n"; - echo "Delete Users: $NWB#vicidial_users-delete_users$NWE\n"; - echo "Delete User Groups: $NWB#vicidial_users-delete_user_groups$NWE\n"; - echo "Delete Lists: $NWB#vicidial_users-delete_lists$NWE\n"; - echo "Delete Campaigns: $NWB#vicidial_users-delete_campaigns$NWE\n"; - echo "Delete In-Groups: $NWB#vicidial_users-delete_ingroups$NWE\n"; - echo "Delete Remote Agents: $NWB#vicidial_users-delete_remote_agents$NWE\n"; - echo "Delete Scripts: $NWB#vicidial_users-delete_scripts$NWE\n"; - echo "Load Leads: $NWB#vicidial_users-load_leads$NWE\n"; - echo "Campaign Detail: $NWB#vicidial_users-campaign_detail$NWE\n"; - echo "AGC Admin Access: $NWB#vicidial_users-ast_admin_access$NWE\n"; - echo "AGC Delete Phones: $NWB#vicidial_users-ast_delete_phones$NWE\n"; - echo "Modify Leads: $NWB#vicidial_users-modify_leads$NWE\n"; - echo "Change Agent Campaign: $NWB#vicidial_users-change_agent_campaign$NWE\n"; - echo "Delete Filters: $NWB#vicidial_users-delete_filters$NWE\n"; - echo "Delete Call Times: $NWB#vicidial_users-delete_call_times$NWE\n"; - echo "Modify Call Times: $NWB#vicidial_users-modify_call_times$NWE\n"; - echo "Modify Users: $NWB#vicidial_users-modify_sections$NWE\n"; - echo "Modify Campaigns: $NWB#vicidial_users-modify_sections$NWE\n"; - echo "Modify Lists: $NWB#vicidial_users-modify_sections$NWE\n"; - echo "Modify Scripts: $NWB#vicidial_users-modify_sections$NWE\n"; - echo "Modify Filters: $NWB#vicidial_users-modify_sections$NWE\n"; - echo "Modify In-Groups: $NWB#vicidial_users-modify_sections$NWE\n"; - echo "Modify User Groups: $NWB#vicidial_users-modify_sections$NWE\n"; - echo "Modify Remote Agents: $NWB#vicidial_users-modify_sections$NWE\n"; - echo "Modify Servers: $NWB#vicidial_users-modify_sections$NWE\n"; - echo "View Reports: $NWB#vicidial_users-view_reports$NWE\n"; + +#9BB9FB +#B9CBFD + echo "View Reports: $NWB#vicidial_users-view_reports$NWE\n"; + + echo "Alter Agent Interface Options: $NWB#vicidial_users-alter_agent_interface_options$NWE\n"; + echo "Modify Users: $NWB#vicidial_users-modify_sections$NWE\n"; + echo "Change Agent Campaign: $NWB#vicidial_users-change_agent_campaign$NWE\n"; + echo "Delete Users: $NWB#vicidial_users-delete_users$NWE\n"; + + echo "Modify User Groups: $NWB#vicidial_users-modify_sections$NWE\n"; + echo "Delete User Groups: $NWB#vicidial_users-delete_user_groups$NWE\n"; + + echo "Modify Lists: $NWB#vicidial_users-modify_sections$NWE\n"; + echo "Delete Lists: $NWB#vicidial_users-delete_lists$NWE\n"; + echo "Load Leads: $NWB#vicidial_users-load_leads$NWE\n"; + echo "Modify Leads: $NWB#vicidial_users-modify_leads$NWE\n"; + + echo "Modify Campaigns: $NWB#vicidial_users-modify_sections$NWE\n"; + echo "Campaign Detail: $NWB#vicidial_users-campaign_detail$NWE\n"; + echo "Delete Campaigns: $NWB#vicidial_users-delete_campaigns$NWE\n"; + + echo "Modify In-Groups: $NWB#vicidial_users-modify_sections$NWE\n"; + echo "Delete In-Groups: $NWB#vicidial_users-delete_ingroups$NWE\n"; + + echo "Modify Remote Agents: $NWB#vicidial_users-modify_sections$NWE\n"; + echo "Delete Remote Agents: $NWB#vicidial_users-delete_remote_agents$NWE\n"; + + echo "Modify Scripts: $NWB#vicidial_users-modify_sections$NWE\n"; + echo "Delete Scripts: $NWB#vicidial_users-delete_scripts$NWE\n"; + + echo "Modify Filters: $NWB#vicidial_users-modify_sections$NWE\n"; + echo "Delete Filters: $NWB#vicidial_users-delete_filters$NWE\n"; + + echo "AGC Admin Access: $NWB#vicidial_users-ast_admin_access$NWE\n"; + echo "AGC Delete Phones: $NWB#vicidial_users-ast_delete_phones$NWE\n"; + echo "Modify Call Times: $NWB#vicidial_users-modify_call_times$NWE\n"; + echo "Delete Call Times: $NWB#vicidial_users-delete_call_times$NWE\n"; + echo "Modify Servers: $NWB#vicidial_users-modify_sections$NWE\n"; } - echo "\n"; + echo "\n"; echo "\n"; if ($LOGdelete_users > 0) @@ -10106,22 +10270,33 @@ if ($ADD==3111) $stmt="SELECT * from vicidial_inbound_groups where group_id='$group_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - $group_name = $row[1]; - $group_color = $row[2]; - $active = $row[3]; - $web_form_address = $row[4]; - $voicemail_ext = $row[5]; - $next_agent_call = $row[6]; - $fronter_display = $row[7]; - $script_id = $row[8]; - $get_call_launch = $row[9]; - $xferconf_a_dtmf = $row[10]; - $xferconf_a_number = $row[11]; - $xferconf_b_dtmf = $row[12]; - $xferconf_b_number = $row[13]; - $drop_call_seconds = $row[14]; - $drop_message = $row[15]; - $drop_exten = $row[16]; + $group_name = $row[1]; + $group_color = $row[2]; + $active = $row[3]; + $web_form_address = $row[4]; + $voicemail_ext = $row[5]; + $next_agent_call = $row[6]; + $fronter_display = $row[7]; + $script_id = $row[8]; + $get_call_launch = $row[9]; + $xferconf_a_dtmf = $row[10]; + $xferconf_a_number = $row[11]; + $xferconf_b_dtmf = $row[12]; + $xferconf_b_number = $row[13]; + $drop_call_seconds = $row[14]; + $drop_message = $row[15]; + $drop_exten = $row[16]; + $call_time_id = $row[17]; + $after_hours_action = $row[18]; + $after_hours_message_filename = $row[19]; + $after_hours_exten = $row[20]; + $after_hours_voicemail = $row[21]; + $welcome_message_filename = $row[22]; + $moh_context = $row[23]; + $onhold_prompt_filename = $row[24]; + $prompt_interval = $row[25]; + $agent_alert_exten = $row[26]; + $agent_alert_delay = $row[27]; echo "
MODIFY A GROUPS RECORD: $row[0]
\n"; echo "\n"; @@ -10157,13 +10332,62 @@ if ($ADD==3111) echo "Drop Exten: $NWB#vicidial_inbound_groups-drop_exten$NWE\n"; + echo "Call Time: $NWB#vicidial_inbound_groups-call_time_id$NWE\n"; + + echo "After Hours Action: $NWB#vicidial_inbound_groups-after_hours_action$NWE\n"; + + echo "After Hours Message Filename: $NWB#vicidial_inbound_groups-after_hours_message_filename$NWE\n"; + + echo "After Hours Extension: $NWB#vicidial_inbound_groups-after_hours_exten$NWE\n"; + + echo "After Hours Voicemail: $NWB#vicidial_inbound_groups-after_hours_voicemail$NWE\n"; + + echo "Welcome Message Filename: $NWB#vicidial_inbound_groups-welcome_message_filename$NWE\n"; + + echo "Music On Hold Context: $NWB#vicidial_inbound_groups-moh_context$NWE\n"; + + echo "On Hold Prompt Filename: $NWB#vicidial_inbound_groups-onhold_prompt_filename$NWE\n"; + + echo "On Hold Prompt Interval: $NWB#vicidial_inbound_groups-prompt_interval$NWE\n"; + + echo "Agent Alert Extension: $NWB#vicidial_inbound_groups-agent_alert_exten$NWE\n"; + + echo "Agent Alert Delay: $NWB#vicidial_inbound_groups-agent_alert_delay$NWE\n"; echo "\n"; echo "\n"; + ### list of agent rank or skill-level for this inbound group + echo "
\n"; + echo "
AGENT RANKS FOR THIS INBOUND GROUP:
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT user,group_rank,calls_today from vicidial_inbound_group_agents where group_id='$group_id'"; + $rsltx=mysql_query($stmt, $link); + $users_to_print = mysql_num_rows($rsltx); + + $o=0; + while ($users_to_print > $o) { + $rowx=mysql_fetch_row($rsltx); + $o++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + echo "
USER     RANK     CALLS TODAY
$rowx[0]$rowx[1]$rowx[2]

\n"; - echo "Click here to see a report for this campaign

\n"; + echo "
\n"; + + echo "Click here to see a report for this inbound group

\n"; echo "
\n"; @@ -11812,7 +12036,7 @@ echo "
\n"; {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; + echo ""; echo ""; echo ""; echo ""; @@ -11847,7 +12071,7 @@ echo "
$row[0]
$row[0] $row[1] $row[2]$row[4]$row[5] $row[3]$row[7]  
\n"; {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; + echo ""; echo ""; echo ""; echo ""; @@ -11882,7 +12106,7 @@ echo "
$row[0]
$row[0] $row[1] $row[3] $row[5]
\n"; {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; + echo ""; echo ""; echo ""; echo ""; @@ -11918,7 +12142,7 @@ echo "
$row[1]
$row[1] $row[2] $row[3] $row[4]
\n"; {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; + echo ""; echo ""; echo "\n"; $o++; @@ -11950,7 +12174,7 @@ echo "
$row[0]
$row[0] $row[1]MODIFY
\n"; {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; + echo ""; echo ""; echo "\n"; $o++; @@ -11983,7 +12207,7 @@ echo "
$row[0]
$row[0] $row[1]MODIFY
\n"; {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; + echo ""; echo ""; echo "\n"; $o++; @@ -12016,7 +12240,7 @@ echo "
$row[0]
$row[0] $row[1]MODIFY
\n"; {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; + echo ""; echo ""; echo ""; echo ""; @@ -12050,7 +12274,7 @@ echo "
$row[0]
$row[0] $row[1] $row[3] $row[4]
\n"; {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; + echo ""; echo ""; echo ""; echo ""; @@ -12136,7 +12360,7 @@ echo "
$row[0]
$row[0] $row[1] $row[2] $row[3]
\n"; {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; + echo ""; echo ""; echo ""; echo ""; @@ -12169,7 +12393,7 @@ echo "
$row[0]$row[1]
$row[0]$row[1] $row[2] $row[4] $row[3]  
\n"; {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; + echo ""; echo ""; echo ""; echo "\n"; @@ -12201,7 +12425,7 @@ echo "
$row[0]
$row[0] $row[1] $row[2]$row[4]  MODIFY
\n"; {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; + echo ""; echo ""; echo ""; echo "\n"; @@ -12256,10 +12480,8 @@ if ($ADD==999999) VICIDIAL: Server Stats and Reports

$row[0]
$row[0] $row[1] $row[2]$row[4]  MODIFY