fixed bug in vicidial.php/vdc_db_query on VDAD calls
added fcstats.php fronter/closer stats for in-groups git-svn-id: svn://192.168.202.10@816 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -31,16 +31,16 @@ PHASE 1: INSTALLING ASTERISK
|
||||
1. follow these command line steps:
|
||||
mkdir /usr/src/asterisk
|
||||
cd /usr/src/asterisk
|
||||
wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.26.2.tar.gz
|
||||
wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.23.tar.gz
|
||||
wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.27.tar.gz
|
||||
wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.24.tar.gz
|
||||
wget http://ftp.digium.com/pub/libpri/releases/libpri-1.2.7.tar.gz
|
||||
gunzip asterisk-1.2.26.2.tar.gz
|
||||
tar xvf asterisk-1.2.26.2.tar
|
||||
gunzip zaptel-1.2.23.tar.gz
|
||||
tar xvf zaptel-1.2.23.tar
|
||||
gunzip asterisk-1.2.27.tar.gz
|
||||
tar xvf asterisk-1.2.27.tar
|
||||
gunzip zaptel-1.2.24.tar.gz
|
||||
tar xvf zaptel-1.2.24.tar
|
||||
gunzip libpri-1.2.7.tar.gz
|
||||
tar xvf libpri-1.2.7.tar
|
||||
cd ./zaptel-1.2.23
|
||||
cd ./zaptel-1.2.24
|
||||
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
|
||||
@@ -58,7 +58,7 @@ cd ../libpri-1.2.7
|
||||
make clean
|
||||
make
|
||||
make install
|
||||
cd ../asterisk-1.2.26.2
|
||||
cd ../asterisk-1.2.27
|
||||
(1.2 tree) If you want to include Answering Machine Detection ability
|
||||
you will need to download app_amd.c and amd.conf and alter the
|
||||
apps/Makefile to compile it properly
|
||||
@@ -73,11 +73,11 @@ cd ../asterisk-1.2.26.2
|
||||
wget http://www.eflo.net/files/amd2.conf
|
||||
mkdir /etc/asterisk
|
||||
mv amd2.conf /etc/asterisk/amd.conf
|
||||
*OPTIONAL*(1.2.23 thru 1.2.26.2) apply the meetme DTMF passthru patch
|
||||
*OPTIONAL*(1.2.23 thru 1.2.27) apply the meetme DTMF passthru patch
|
||||
wget http://www.eflo.net/files/meetme_DTMF_passthru-1.2.23.patch
|
||||
patch -p1 < ./meetme_DTMF_passthru-1.2.23.patch
|
||||
- File to patch: app_meetme.c
|
||||
*OPTIONAL*(1.2.12.1 thru 1.2.26.2) apply the meetme volume control patch
|
||||
*OPTIONAL*(1.2.12.1 thru 1.2.27) apply the meetme volume control patch
|
||||
*Different patches available for 1.2.7.1 through 1.2.14
|
||||
wget http://www.eflo.net/files/meetme_volume_control_1.2.16.patch
|
||||
patch -p1 < ./meetme_volume_control_1.2.16.patch
|
||||
@@ -89,7 +89,7 @@ cd ../asterisk-1.2.26.2
|
||||
patch -p1 < ./cli_chan_concise_delimiter.patch
|
||||
- File to patch: cli.c
|
||||
|
||||
*OPTIONAL*(1.2.14 thru 1.2.26.2) rewrite of waitforsilence
|
||||
*OPTIONAL*(1.2.14 thru 1.2.27) rewrite of waitforsilence
|
||||
wget http://www.eflo.net/files/app_waitforsilence.c
|
||||
mv -f app_waitforsilence.c apps/app_waitforsilence.c
|
||||
|
||||
@@ -237,13 +237,13 @@ musiconhold audio files to be converted to native formats like GSM, ULAW and ALA
|
||||
mv -f *.mp3 ../orig-mp3/
|
||||
mkdir ../quiet-mp3
|
||||
cd ../quiet-mp3
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-sunshine.raw -r 8000 -c 1 -v 0.5 fpm-sunshine.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-sunshine.raw -r 8000 -c 1 -v 0.25 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
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-calm-river.raw -r 8000 -c 1 -v 0.5 fpm-calm-river.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-calm-river.raw -r 8000 -c 1 -v 0.25 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
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-world-mix.raw -r 8000 -c 1 -v 0.5 fpm-world-mix.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-world-mix.raw -r 8000 -c 1 -v 0.25 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 ../mohmp3/*.raw
|
||||
|
||||
@@ -308,16 +308,16 @@ make install
|
||||
|
||||
mkdir /usr/src/asterisk
|
||||
cd /usr/src/asterisk
|
||||
wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.26.2.tar.gz
|
||||
wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.23.tar.gz
|
||||
wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.27.tar.gz
|
||||
wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.24.tar.gz
|
||||
wget http://ftp.digium.com/pub/libpri/releases/libpri-1.2.7.tar.gz
|
||||
gunzip asterisk-1.2.26.2.tar.gz
|
||||
tar xvf asterisk-1.2.26.2.tar
|
||||
gunzip zaptel-1.2.23.tar.gz
|
||||
tar xvf zaptel-1.2.23.tar
|
||||
gunzip asterisk-1.2.27.tar.gz
|
||||
tar xvf asterisk-1.2.27.tar
|
||||
gunzip zaptel-1.2.24.tar.gz
|
||||
tar xvf zaptel-1.2.24.tar
|
||||
gunzip libpri-1.2.7.tar.gz
|
||||
tar xvf libpri-1.2.7.tar
|
||||
cd ./zaptel-1.2.23
|
||||
cd ./zaptel-1.2.24
|
||||
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
|
||||
@@ -335,7 +335,7 @@ cd ../libpri-1.2.7
|
||||
make clean
|
||||
make
|
||||
make install
|
||||
cd ../asterisk-1.2.26.2
|
||||
cd ../asterisk-1.2.27
|
||||
cd apps
|
||||
wget http://www.eflo.net/files/app_amd2.c
|
||||
mv app_amd2.c app_amd.c
|
||||
@@ -403,13 +403,13 @@ mkdir ../orig-mp3
|
||||
mv -f *.mp3 ../orig-mp3/
|
||||
mkdir ../quiet-mp3
|
||||
cd ../quiet-mp3
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-sunshine.raw -r 8000 -c 1 -v 0.5 fpm-sunshine.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-sunshine.raw -r 8000 -c 1 -v 0.25 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
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-calm-river.raw -r 8000 -c 1 -v 0.5 fpm-calm-river.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-calm-river.raw -r 8000 -c 1 -v 0.25 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
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-world-mix.raw -r 8000 -c 1 -v 0.5 fpm-world-mix.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-world-mix.raw -r 8000 -c 1 -v 0.25 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 ../mohmp3/*.raw
|
||||
@@ -444,6 +444,36 @@ rm -f /usr/lib/asterisk/modules/format_au.so
|
||||
rm -f /usr/lib/asterisk/modules/format_pcm_alaw.so
|
||||
rm -f /usr/lib/asterisk/modules/pbx_functions.so
|
||||
|
||||
### If downgrading from 1.4.X Asterisk to 1.2.X asterisk:
|
||||
rm -f /usr/lib/asterisk/modules/app_channelredirect.so
|
||||
rm -f /usr/lib/asterisk/modules/app_followme.so
|
||||
rm -f /usr/lib/asterisk/modules/app_morsecode.so
|
||||
rm -f /usr/lib/asterisk/modules/app_speech_utils.so
|
||||
rm -f /usr/lib/asterisk/modules/format_h264.so
|
||||
rm -f /usr/lib/asterisk/modules/func_base64.so
|
||||
rm -f /usr/lib/asterisk/modules/func_cdr.so
|
||||
rm -f /usr/lib/asterisk/modules/func_channel.so
|
||||
rm -f /usr/lib/asterisk/modules/func_curl.so
|
||||
rm -f /usr/lib/asterisk/modules/func_cut.so
|
||||
rm -f /usr/lib/asterisk/modules/func_db.so
|
||||
rm -f /usr/lib/asterisk/modules/func_env.so
|
||||
rm -f /usr/lib/asterisk/modules/func_global.so
|
||||
rm -f /usr/lib/asterisk/modules/func_groupcount.so
|
||||
rm -f /usr/lib/asterisk/modules/func_language.so
|
||||
rm -f /usr/lib/asterisk/modules/func_logic.so
|
||||
rm -f /usr/lib/asterisk/modules/func_math.so
|
||||
rm -f /usr/lib/asterisk/modules/func_md5.so
|
||||
rm -f /usr/lib/asterisk/modules/func_moh.so
|
||||
rm -f /usr/lib/asterisk/modules/func_rand.so
|
||||
rm -f /usr/lib/asterisk/modules/func_realtime.so
|
||||
rm -f /usr/lib/asterisk/modules/func_sha1.so
|
||||
rm -f /usr/lib/asterisk/modules/func_strings.so
|
||||
rm -f /usr/lib/asterisk/modules/func_timeout.so
|
||||
rm -f /usr/lib/asterisk/modules/res_clioriginate.so
|
||||
rm -f /usr/lib/asterisk/modules/res_convert.so
|
||||
rm -f /usr/lib/asterisk/modules/res_smdi.so
|
||||
rm -f /usr/lib/asterisk/modules/res_snmp.so
|
||||
rm -f /usr/lib/asterisk/modules/res_speech.so
|
||||
|
||||
mkdir /usr/src/asterisk-1.4
|
||||
cd /usr/src/asterisk-1.4
|
||||
|
||||
@@ -851,13 +851,13 @@ with the following patch:
|
||||
- mkdir /usr/src/asterisk
|
||||
- cd /usr/src/asterisk
|
||||
A. if you want 1.2 release (reliable with new features):
|
||||
- wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.24.tar.gz
|
||||
- wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.21.tar.gz
|
||||
- wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.27.tar.gz
|
||||
- wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.24.tar.gz
|
||||
- wget http://ftp.digium.com/pub/libpri/releases/libpri-1.2.5.tar.gz
|
||||
- gunzip asterisk-1.2.24.tar.gz
|
||||
- tar xvf asterisk-1.2.24.tar
|
||||
- gunzip zaptel-1.2.21.tar.gz
|
||||
- tar xvf zaptel-1.2.21.tar
|
||||
- gunzip asterisk-1.2.27.tar.gz
|
||||
- tar xvf asterisk-1.2.27.tar
|
||||
- gunzip zaptel-1.2.24.tar.gz
|
||||
- tar xvf zaptel-1.2.24.tar
|
||||
- gunzip libpri-1.2.5.tar.gz
|
||||
- tar xvf libpri-1.2.5.tar
|
||||
B. if you want latest SVN_1.2 version (release tree with new patches)
|
||||
@@ -882,7 +882,7 @@ with the following patch:
|
||||
edit this line at the top and just add a hash # in front of it as shown:
|
||||
#PBX_LIBS+=$(shell $(CROSS_COMPILE_BIN)gtk-config --cflags >/dev/null 2>/dev/null && echo "pbx_gtkconsole.so")
|
||||
|
||||
- cd ./zaptel-1.2.21
|
||||
- cd ./zaptel-1.2.24
|
||||
- make clean
|
||||
- make
|
||||
- make install
|
||||
@@ -890,7 +890,7 @@ with the following patch:
|
||||
- make clean
|
||||
- make
|
||||
- make install
|
||||
- cd ../asterisk-1.2.24
|
||||
- cd ../asterisk-1.2.27
|
||||
- (1.2 tree) If you want to include Answering Machine Detection ability
|
||||
you will need to download app_amd.c and amd.conf and alter the
|
||||
apps/Makefile to compile it properly
|
||||
@@ -905,11 +905,11 @@ with the following patch:
|
||||
- wget http://www.eflo.net/files/amd2.conf
|
||||
- mkdir /etc/asterisk
|
||||
- mv amd2.conf /etc/asterisk/amd.conf
|
||||
*OPTIONAL*(1.2.23 thru 1.2.24) apply the meetme DTMF passthru patch
|
||||
*OPTIONAL*(1.2.23 thru 1.2.27) apply the meetme DTMF passthru patch
|
||||
- wget http://www.eflo.net/files/meetme_DTMF_passthru-1.2.23.patch
|
||||
- patch -p1 < ./meetme_DTMF_passthru-1.2.23.patch
|
||||
- File to patch: app_meetme.c
|
||||
*OPTIONAL*(1.2.12.1 thru 1.2.24) apply the meetme volume control patch
|
||||
*OPTIONAL*(1.2.12.1 thru 1.2.27) apply the meetme volume control patch
|
||||
*Different patches available for 1.2.7.1 through 1.2.14
|
||||
- wget http://www.eflo.net/files/meetme_volume_control_1.2.16.patch
|
||||
- patch -p1 < ./meetme_volume_control_1.2.16.patch
|
||||
@@ -921,7 +921,7 @@ with the following patch:
|
||||
- patch -p1 < ./cli_chan_concise_delimiter.patch
|
||||
- File to patch: cli.c
|
||||
|
||||
*OPTIONAL*(1.2.14 thru 1.2.24) rewrite of waitforsilence
|
||||
*OPTIONAL*(1.2.14 thru 1.2.27) rewrite of waitforsilence
|
||||
- wget http://www.eflo.net/files/app_waitforsilence.c
|
||||
- mv -f app_waitforsilence.c apps/app_waitforsilence.c
|
||||
|
||||
@@ -1023,13 +1023,13 @@ musiconhold audio files to be converted to native formats like GSM, ULAW and ALA
|
||||
mv -f *.mp3 ../orig-mp3/
|
||||
mkdir ../quiet-mp3
|
||||
cd ../quiet-mp3
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-sunshine.raw -r 8000 -c 1 -v 0.5 fpm-sunshine.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-sunshine.raw -r 8000 -c 1 -v 0.25 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
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-calm-river.raw -r 8000 -c 1 -v 0.5 fpm-calm-river.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-calm-river.raw -r 8000 -c 1 -v 0.25 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
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-world-mix.raw -r 8000 -c 1 -v 0.5 fpm-world-mix.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-world-mix.raw -r 8000 -c 1 -v 0.25 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 ../mohmp3/*.raw
|
||||
|
||||
@@ -0,0 +1,796 @@
|
||||
[general]
|
||||
bindport=4569
|
||||
iaxcompat=yes
|
||||
bandwidth=high
|
||||
allow=all
|
||||
allow=gsm ; Always allow GSM, it's cool :)
|
||||
jitterbuffer=no
|
||||
tos=lowdelay
|
||||
iaxthreadcount = 200
|
||||
iaxmaxthreadcount = 1000
|
||||
|
||||
;register => 1112223333:PASSWORD@iax.binfone.com
|
||||
register => ASTloop:test@127.0.0.1:40569
|
||||
register => ASTblind:test@127.0.0.1:41569
|
||||
|
||||
[vicihelp]
|
||||
host=67.134.219.20 ;voip.vicidial-group.com
|
||||
type=friend
|
||||
context=opengateway
|
||||
disallow=all
|
||||
allow=gsm
|
||||
allow=ulaw
|
||||
permit=67.134.219.20/255.255.255.255
|
||||
insecure=very
|
||||
|
||||
[ASTloop]
|
||||
type=friend
|
||||
accountcode=ASTloop
|
||||
context=default
|
||||
auth=plaintext
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
qualify=yes
|
||||
|
||||
[ASTblind]
|
||||
type=friend
|
||||
accountcode=ASTblind
|
||||
context=default
|
||||
auth=plaintext
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
qualify=yes
|
||||
|
||||
[1112223333]
|
||||
auth=md5
|
||||
type=friend
|
||||
username=1112223333
|
||||
secret=PASSWORD
|
||||
host=iax.binfone.com
|
||||
context=incoming-IAX-context-in-extensions.conf
|
||||
|
||||
[ASTtest2]
|
||||
type=friend
|
||||
accountcode=IAXtrunk2
|
||||
context=default
|
||||
auth=plaintext
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
qualify=yes
|
||||
|
||||
[firefly01]
|
||||
type=friend
|
||||
accountcode=firefly01
|
||||
context=default
|
||||
auth=plaintext
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
|
||||
[cc300]
|
||||
type=friend
|
||||
accountcode=cc300
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc301]
|
||||
type=friend
|
||||
accountcode=cc301
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc302]
|
||||
type=friend
|
||||
accountcode=cc302
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc303]
|
||||
type=friend
|
||||
accountcode=cc303
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc304]
|
||||
type=friend
|
||||
accountcode=cc304
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc305]
|
||||
type=friend
|
||||
accountcode=cc305
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc306]
|
||||
type=friend
|
||||
accountcode=cc306
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc307]
|
||||
type=friend
|
||||
accountcode=cc307
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc308]
|
||||
type=friend
|
||||
accountcode=cc308
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc309]
|
||||
type=friend
|
||||
accountcode=cc309
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc310]
|
||||
type=friend
|
||||
accountcode=cc310
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc311]
|
||||
type=friend
|
||||
accountcode=cc311
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc312]
|
||||
type=friend
|
||||
accountcode=cc312
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc313]
|
||||
type=friend
|
||||
accountcode=cc313
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc314]
|
||||
type=friend
|
||||
accountcode=cc314
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc315]
|
||||
type=friend
|
||||
accountcode=cc315
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc316]
|
||||
type=friend
|
||||
accountcode=cc316
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc317]
|
||||
type=friend
|
||||
accountcode=cc317
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc318]
|
||||
type=friend
|
||||
accountcode=cc318
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc319]
|
||||
type=friend
|
||||
accountcode=cc319
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc320]
|
||||
type=friend
|
||||
accountcode=cc320
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc321]
|
||||
type=friend
|
||||
accountcode=cc321
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc322]
|
||||
type=friend
|
||||
accountcode=cc322
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc323]
|
||||
type=friend
|
||||
accountcode=cc323
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc324]
|
||||
type=friend
|
||||
accountcode=cc324
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc325]
|
||||
type=friend
|
||||
accountcode=cc325
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc326]
|
||||
type=friend
|
||||
accountcode=cc326
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc327]
|
||||
type=friend
|
||||
accountcode=cc327
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc328]
|
||||
type=friend
|
||||
accountcode=cc328
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc329]
|
||||
type=friend
|
||||
accountcode=cc329
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc330]
|
||||
type=friend
|
||||
accountcode=cc330
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc331]
|
||||
type=friend
|
||||
accountcode=cc331
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc332]
|
||||
type=friend
|
||||
accountcode=cc332
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc333]
|
||||
type=friend
|
||||
accountcode=cc333
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc334]
|
||||
type=friend
|
||||
accountcode=cc334
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc335]
|
||||
type=friend
|
||||
accountcode=cc335
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc336]
|
||||
type=friend
|
||||
accountcode=cc336
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc337]
|
||||
type=friend
|
||||
accountcode=cc337
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc338]
|
||||
type=friend
|
||||
accountcode=cc338
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc339]
|
||||
type=friend
|
||||
accountcode=cc339
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc340]
|
||||
type=friend
|
||||
accountcode=cc340
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc341]
|
||||
type=friend
|
||||
accountcode=cc341
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc342]
|
||||
type=friend
|
||||
accountcode=cc342
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc343]
|
||||
type=friend
|
||||
accountcode=cc343
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc344]
|
||||
type=friend
|
||||
accountcode=cc344
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc345]
|
||||
type=friend
|
||||
accountcode=cc345
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc346]
|
||||
type=friend
|
||||
accountcode=cc346
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc347]
|
||||
type=friend
|
||||
accountcode=cc347
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc348]
|
||||
type=friend
|
||||
accountcode=cc348
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc349]
|
||||
type=friend
|
||||
accountcode=cc349
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
[cc350]
|
||||
type=friend
|
||||
accountcode=cc350
|
||||
context=default
|
||||
auth=md5
|
||||
host=dynamic
|
||||
permit=0.0.0.0/0.0.0.0
|
||||
secret=test
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
allow=alaw
|
||||
allow=gsm
|
||||
qualify=yes
|
||||
|
||||
@@ -1544,6 +1544,8 @@ if ($ACTION == 'VDADREcheckINCOMING')
|
||||
################################################################################
|
||||
if ($ACTION == 'VDADcheckINCOMING')
|
||||
{
|
||||
$VDCL_ingroup_recording_override = '';
|
||||
$VDCL_ingroup_rec_filename = '';
|
||||
$Ctype = 'A';
|
||||
$MT[0]='';
|
||||
$row=''; $rowx='';
|
||||
@@ -1716,7 +1718,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
$VDCL_xferconf_b_dtmf = $row[4];
|
||||
$VDCL_xferconf_b_number = $row[5];
|
||||
}
|
||||
echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n";
|
||||
echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number||||\n|\n";
|
||||
|
||||
$stmt = "select phone_number,alt_dial from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
|
||||
@@ -3938,12 +3938,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
else
|
||||
{LIVE_default_xfer_group = default_xfer_group;}
|
||||
|
||||
if ( (VDIC_data_VDIG[12].length > 0) && (VDIC_data_VDIG[12]!='DISABLED') )
|
||||
if ( (VDIC_data_VDIG[12].length > 1) && (VDIC_data_VDIG[12]!='DISABLED') )
|
||||
{LIVE_campaign_recording = VDIC_data_VDIG[12];}
|
||||
else
|
||||
{LIVE_campaign_recording = campaign_recording;}
|
||||
|
||||
if ( (VDIC_data_VDIG[13].length > 0) && (VDIC_data_VDIG[13]!='NONE') )
|
||||
if ( (VDIC_data_VDIG[13].length > 1) && (VDIC_data_VDIG[13]!='NONE') )
|
||||
{LIVE_campaign_rec_filename = VDIC_data_VDIG[13];}
|
||||
else
|
||||
{LIVE_campaign_rec_filename = campaign_rec_filename;}
|
||||
|
||||
@@ -13676,6 +13676,7 @@ if ($ADD==999999)
|
||||
<LI><a href="AST_VDADstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>VDAD REPORT</a></FONT>
|
||||
<LI><a href="AST_CLOSERstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>CLOSER REPORT</a></FONT>
|
||||
<LI><a href="AST_agent_performance_detail.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>AGENT PERFORMANCE DETAIL</a></FONT>
|
||||
<LI><a href="fcstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>FRONTER - CLOSER REPORT</a></FONT>
|
||||
<LI><a href="vicidial_sales_viewer.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>AGENT SPREADSHEET PERFORMANCE</a></FONT>
|
||||
<LI><a href="AST_server_performance.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>SERVER PERFORMANCE</a></FONT>
|
||||
<?
|
||||
|
||||
@@ -0,0 +1,591 @@
|
||||
<?
|
||||
### fcstats.php
|
||||
###
|
||||
### Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
###
|
||||
# CHANGES
|
||||
#
|
||||
# 70813-1526 - First Build
|
||||
# 71008-1436 - Added shift to be defined in dbconnect.php
|
||||
# 71217-1128 - Changed method for calculating stats
|
||||
# 71228-1140 - added percentages, cross-day start/stop
|
||||
# 80328-1139 - adapted for basic fronter/closer stats
|
||||
#
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
|
||||
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
|
||||
if (isset($_GET["group"])) {$group=$_GET["group"];}
|
||||
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
|
||||
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
|
||||
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
|
||||
if (isset($_GET["shift"])) {$shift=$_GET["shift"];}
|
||||
elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];}
|
||||
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
|
||||
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
|
||||
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);
|
||||
|
||||
if (strlen($shift)<2) {$shift='ALL';}
|
||||
|
||||
$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");
|
||||
if (!isset($group)) {$group = 'CL_TEST_L';}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="select group_id from vicidial_inbound_groups;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$groups_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $groups_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<STYLE type="text/css">
|
||||
<!--
|
||||
.green {color: white; background-color: green}
|
||||
.red {color: white; background-color: red}
|
||||
.blue {color: white; background-color: blue}
|
||||
.purple {color: white; background-color: purple}
|
||||
-->
|
||||
</STYLE>
|
||||
|
||||
<?
|
||||
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
|
||||
echo "<TITLE>VICIDIAL: In-Group Fronter-Closer Stats</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<SELECT SIZE=1 NAME=shift>\n";
|
||||
echo "<option selected value=\"$shift\">$shift</option>\n";
|
||||
echo "<option value=\"\">--</option>\n";
|
||||
echo "<option value=\"AM\">AM</option>\n";
|
||||
echo "<option value=\"PM\">PM</option>\n";
|
||||
echo "<option value=\"ALL\">ALL</option>\n";
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=hidden NAME=DB VALUE=\"$DB\">\n";
|
||||
echo "<INPUT TYPE=submit NAME=SUBMIT VALUE=SUBMIT>\n";
|
||||
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> <a href=\"./admin.php?ADD=3111&group_id=$group\">MODIFY</a> | <a href=\"./admin.php?ADD=999999\">REPORTS</a> </FONT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n\n";
|
||||
echo "PLEASE SELECT AN IN-GROUP AND DATE ABOVE THEN CLICK SUBMIT\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
# $time_BEGIN=$AM_shift_BEGIN;
|
||||
# $time_END=$AM_shift_END;
|
||||
#$query_date_BEGIN = "$query_date $time_BEGIN";
|
||||
#$query_date_END = "$query_date $time_END";
|
||||
|
||||
$Cqdate = explode('-',$query_date);
|
||||
|
||||
if ($shift == 'AM')
|
||||
{
|
||||
$query_date_BEGIN = date("Y-m-d H:i:s", mktime(1, 0, 0, $Cqdate[1], $Cqdate[2], $Cqdate[0]));
|
||||
$query_date_END = date("Y-m-d H:i:s", mktime(17, 45, 0, $Cqdate[1], $Cqdate[2], $Cqdate[0]));
|
||||
}
|
||||
if ($shift == 'PM')
|
||||
{
|
||||
$query_date_BEGIN = date("Y-m-d H:i:s", mktime(17, 45, 1, $Cqdate[1], $Cqdate[2], $Cqdate[0]));
|
||||
$query_date_END = date("Y-m-d H:i:s", mktime(24, 59, 59, $Cqdate[1], $Cqdate[2], $Cqdate[0]));
|
||||
}
|
||||
if ($shift == 'ALL')
|
||||
{
|
||||
$query_date_BEGIN = date("Y-m-d H:i:s", mktime(1, 0, 0, $Cqdate[1], $Cqdate[2], $Cqdate[0]));
|
||||
$query_date_END = date("Y-m-d H:i:s", mktime(24, 59, 59, $Cqdate[1], $Cqdate[2], $Cqdate[0]));
|
||||
}
|
||||
|
||||
echo "VICIDIAL: In-Group Fronter-Closer Stats $NOW_TIME\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TOTALS FOR $query_date_BEGIN to $query_date_END\n";
|
||||
|
||||
$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "' and status = 'SALE';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$A1_points = ($row[0] * 1);
|
||||
$A1_points = sprintf("%10s", $A1_points);
|
||||
$A1_tally = sprintf("%10s", $row[0]);
|
||||
|
||||
$TOT_tally = ($A1_tally + $A2_tally + $A3_tally + $A4_tally);
|
||||
$TOT_points = ($A1_points + $A2_points + $A3_points + $A4_points);
|
||||
$TOT_tally = sprintf("%10s", $TOT_tally);
|
||||
$TOT_points = sprintf("%10s", $TOT_points);
|
||||
|
||||
echo "STATUS CUSTOMERS\n";
|
||||
echo "SALES: $A1_tally\n";
|
||||
|
||||
echo "\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
##############################
|
||||
######### FRONTER STATS
|
||||
|
||||
$TOTagents=0;
|
||||
$TOTcalls=0;
|
||||
$TOTsales=0;
|
||||
$totA1=0;
|
||||
$totA2=0;
|
||||
$totA3=0;
|
||||
$totA4=0;
|
||||
$totA5=0;
|
||||
$totA6=0;
|
||||
$totA7=0;
|
||||
$totA8=0;
|
||||
$totA9=0;
|
||||
$totDROP=0;
|
||||
$totOTHER=0;
|
||||
|
||||
echo "\n";
|
||||
echo "---------- FRONTER STATS\n";
|
||||
echo "+--------------------------+-------+--------+--------+------+------+------+\n";
|
||||
echo "| AGENT |SUCCESS| XFERS |SUCCESS%| SALE | DROP |OTHER |\n";
|
||||
echo "+--------------------------+-------+--------+--------+------+------+------+\n";
|
||||
|
||||
#$stmt="select vicidial_xfer_log.user,full_name,count(*) from vicidial_xfer_log,vicidial_users where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_xfer_log.user is not null and vicidial_xfer_log.user=vicidial_users.user group by vicidial_xfer_log.user;";
|
||||
$stmt="select user,count(distinct lead_id) from vicidial_xfer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "' and user is not null group by user;";
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$users_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $users_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTcalls = ($TOTcalls + $row[1]);
|
||||
|
||||
$userRAW[$i]=$row[0];
|
||||
$user[$i] = sprintf("%-6s", $row[0]);while(strlen($user[$i])>6) {$user[$i] = substr("$user[$i]", 0, -1);}
|
||||
$USERcallsRAW[$i] = $row[1];
|
||||
$USERcalls[$i] = sprintf("%6s", $row[1]);
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$i=0;
|
||||
while ($i < $users_to_print)
|
||||
{
|
||||
$stmt="select full_name from vicidial_users where user='$userRAW[$i]';";
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$names_to_print = mysql_num_rows($rslt);
|
||||
if ($names_to_print > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($non_latin < 1)
|
||||
{
|
||||
$full_name[$i] = sprintf("%-15s", $row[0]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
|
||||
}
|
||||
else
|
||||
{
|
||||
$full_name[$i] = sprintf("%-45s", $row[0]); while(mb_strlen($full_name[$i],'utf-8')>15) {$full_name[$i] = mb_substr("$full_name[$i]", 0, -1,'utf-8');}
|
||||
}
|
||||
}
|
||||
else
|
||||
{$full_name[$i] = ' ';}
|
||||
|
||||
$A1=0; $A2=0; $A3=0; $A4=0; $A5=0; $A6=0; $A7=0; $A8=0; $A9=0; $DROP=0; $OTHER=0; $sales=0;
|
||||
$stmt="select vc.status,count(distinct vc.lead_id) from vicidial_xfer_log vx, vicidial_closer_log vc where vx.call_date >= '$query_date_BEGIN' and vx.call_date <= '$query_date_END' and vc.call_date >= '$query_date_BEGIN' and vc.call_date <= '$query_date_END' and vc.campaign_id='" . mysql_real_escape_string($group) . "' and vx.campaign_id='" . mysql_real_escape_string($group) . "' and vx.user='$userRAW[$i]' and vc.lead_id=vx.lead_id and vc.xfercallid=vx.xfercallid group by vc.status;";
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$lead_ids_to_print = mysql_num_rows($rslt);
|
||||
$j=0;
|
||||
while ($j < $lead_ids_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$recL=0;
|
||||
if ( ($row[0]=='SALE') and ($recL < 1) ) {$A1=$row[1]; $recL++; $sales=($sales + $row[1]);}
|
||||
# if ( ($row[0]=='A2') and ($recL < 1) ) {$A2=$row[1]; $recL++; $sales=($sales + $row[1]);}
|
||||
# if ( ($row[0]=='A3') and ($recL < 1) ) {$A3=$row[1]; $recL++; $sales=($sales + $row[1]);}
|
||||
# if ( ($row[0]=='A4') and ($recL < 1) ) {$A4=$row[1]; $recL++; $sales=($sales + $row[1]);}
|
||||
# if ( ($row[0]=='A5') and ($recL < 1) ) {$A5=$row[1]; $recL++;}
|
||||
# if ( ($row[0]=='A6') and ($recL < 1) ) {$A6=$row[1]; $recL++;}
|
||||
# if ( ($row[0]=='A7') and ($recL < 1) ) {$A7=$row[1]; $recL++;}
|
||||
# if ( ($row[0]=='A8') and ($recL < 1) ) {$A8=$row[1]; $recL++;}
|
||||
# if ( ($row[0]=='A9') and ($recL < 1) ) {$A9=$row[1]; $recL++;}
|
||||
if ( ($row[0]=='DROP') and ($recL < 1) ) {$DROP=$row[1]; $recL++;}
|
||||
if ($recL < 1) {$OTHER=($row[1] + $OTHER); $recL++;}
|
||||
$j++;
|
||||
}
|
||||
|
||||
$totA1 = ($totA1 + $A1);
|
||||
$totA2 = ($totA2 + $A2);
|
||||
$totA3 = ($totA3 + $A3);
|
||||
$totA4 = ($totA4 + $A4);
|
||||
$totA5 = ($totA5 + $A5);
|
||||
$totA6 = ($totA6 + $A6);
|
||||
$totA7 = ($totA7 + $A7);
|
||||
$totA8 = ($totA8 + $A8);
|
||||
$totA9 = ($totA9 + $A9);
|
||||
$totDROP = ($totDROP + $DROP);
|
||||
$totOTHER = ($totOTHER + $OTHER);
|
||||
$TOTsales = ($TOTsales + $sales);
|
||||
|
||||
if ( ($USERcallsRAW[$i] > 0) and ($sales > 0) ) {$Spct = ( ($sales / $USERcallsRAW[$i]) * 100);}
|
||||
else {$Spct=0;}
|
||||
$Spct = round($Spct, 2);
|
||||
$Spct = sprintf("%01.2f", $Spct);
|
||||
|
||||
|
||||
$A1 = sprintf("%4s", $A1);
|
||||
$A2 = sprintf("%4s", $A2);
|
||||
$A3 = sprintf("%4s", $A3);
|
||||
$A4 = sprintf("%4s", $A4);
|
||||
$A5 = sprintf("%4s", $A5);
|
||||
$A6 = sprintf("%4s", $A6);
|
||||
$A7 = sprintf("%4s", $A7);
|
||||
$A8 = sprintf("%4s", $A8);
|
||||
$A9 = sprintf("%4s", $A9);
|
||||
$DROP = sprintf("%4s", $DROP);
|
||||
$OTHER = sprintf("%4s", $OTHER);
|
||||
$sales = sprintf("%5s", $sales);
|
||||
$Spct = sprintf("%6s", $Spct);
|
||||
|
||||
echo "| $user[$i] - $full_name[$i] | $sales | $USERcalls[$i] | $Spct%| $A1 | $DROP | $OTHER |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
if ( ($TOTcalls > 0) and ($TOTsales > 0) ) {$totSpct = ( ($TOTsales / $TOTcalls) * 100);}
|
||||
else {$totSpct=0;}
|
||||
$totSpct = round($totSpct, 2);
|
||||
$totSpct = sprintf("%01.2f", $totSpct);
|
||||
$totSpct = sprintf("%6s", $totSpct);
|
||||
|
||||
$TOTagents = sprintf("%6s", $i);
|
||||
$TOTcalls = sprintf("%6s", $TOTcalls);
|
||||
$TOTsales = sprintf("%5s", $TOTsales);
|
||||
$totA1 = sprintf("%5s", $totA1);
|
||||
$totA2 = sprintf("%5s", $totA2);
|
||||
$totA3 = sprintf("%5s", $totA3);
|
||||
$totA4 = sprintf("%5s", $totA4);
|
||||
$totA5 = sprintf("%5s", $totA5);
|
||||
$totA6 = sprintf("%5s", $totA6);
|
||||
$totA7 = sprintf("%5s", $totA7);
|
||||
$totA8 = sprintf("%5s", $totA8);
|
||||
$totA9 = sprintf("%5s", $totA9);
|
||||
$totDROP = sprintf("%5s", $totDROP);
|
||||
$totOTHER = sprintf("%5s", $totOTHER);
|
||||
|
||||
|
||||
$stmt="select avg(queue_seconds) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$AVGwait = $row[0];
|
||||
$AVGwait_M = ($AVGwait / 60);
|
||||
$AVGwait_M = round($AVGwait_M, 2);
|
||||
$AVGwait_M_int = intval("$AVGwait_M");
|
||||
$AVGwait_S = ($AVGwait_M - $AVGwait_M_int);
|
||||
$AVGwait_S = ($AVGwait_S * 60);
|
||||
$AVGwait_S = round($AVGwait_S, 0);
|
||||
if ($AVGwait_S < 10) {$AVGwait_S = "0$AVGwait_S";}
|
||||
$AVGwait_MS = "$AVGwait_M_int:$AVGwait_S";
|
||||
$AVGwait = sprintf("%6s", $AVGwait_MS);
|
||||
|
||||
|
||||
echo "+--------------------------+-------+--------+--------+------+------+------+\n";
|
||||
echo "| TOTAL FRONTERS: $TOTagents | $TOTsales | $TOTcalls | $totSpct%|$totA1 |$totDROP |$totOTHER |\n";
|
||||
echo "+--------------------------+-------+--------+--------+------+------+------+\n";
|
||||
echo "| Average time in Queue for customers: $AVGwait |\n";
|
||||
echo "+--------------------------+-------+--------+--------+------+------+------+\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
##############################
|
||||
######### CLOSER STATS
|
||||
|
||||
$TOTagents=0;
|
||||
$TOTcalls=0;
|
||||
$totA1=0;
|
||||
$totA2=0;
|
||||
$totA3=0;
|
||||
$totA4=0;
|
||||
$totA5=0;
|
||||
$totA6=0;
|
||||
$totA7=0;
|
||||
$totA8=0;
|
||||
$totA9=0;
|
||||
$totDROP=0;
|
||||
$totOTHER=0;
|
||||
$TOTsales=0;
|
||||
|
||||
echo "\n";
|
||||
echo "---------- CLOSER STATS\n";
|
||||
echo "+--------------------------+--------+------+------+------+------+-------+\n";
|
||||
echo "| AGENT | CALLS | SALE | DROP |OTHER | SALE | CONV %|\n";
|
||||
echo "+--------------------------+--------+------+------+------+------+-------+\n";
|
||||
|
||||
$stmt="select user,count(*) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "' and user is not null group by user;";
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$users_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $users_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTcalls = ($TOTcalls + $row[1]);
|
||||
$userRAW[$i]=$row[0];
|
||||
$user[$i] = sprintf("%-6s", $row[0]);while(strlen($user[$i])>6) {$user[$i] = substr("$user[$i]", 0, -1);}
|
||||
$USERcalls[$i] = sprintf("%6s", $row[1]);
|
||||
$USERcallsRAW[$i] = $row[1];
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$i=0;
|
||||
while ($i < $users_to_print)
|
||||
{
|
||||
$stmt="select full_name from vicidial_users where user='$userRAW[$i]';";
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$names_to_print = mysql_num_rows($rslt);
|
||||
if ($names_to_print > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($non_latin < 1)
|
||||
{
|
||||
$full_name[$i] = sprintf("%-15s", $row[0]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
|
||||
}
|
||||
else
|
||||
{
|
||||
$full_name[$i] = sprintf("%-45s", $row[0]); while(mb_strlen($full_name[$i],'utf-8')>15) {$full_name[$i] = mb_substr("$full_name[$i]", 0, -1,'utf-8');}
|
||||
}
|
||||
}
|
||||
else
|
||||
{$full_name[$i] = ' ';}
|
||||
|
||||
$A1=0; $A2=0; $A3=0; $A4=0; $A5=0; $A6=0; $A7=0; $A8=0; $A9=0; $DROP=0; $OTHER=0; $sales=0; $uTOP=0; $uBOT=0; $points=0;
|
||||
$stmt="select status,count(*) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "' and user='$userRAW[$i]' group by status;";
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$lead_ids_to_print = mysql_num_rows($rslt);
|
||||
$j=0;
|
||||
while ($j < $lead_ids_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$recL=0;
|
||||
if ( ($row[0]=='SALE') and ($recL < 1) )
|
||||
{
|
||||
$A1=$row[1]; $recL++;
|
||||
$sales=($sales + $row[1]);
|
||||
$points = ($points + ($row[1] * 1) );
|
||||
}
|
||||
if ( ($row[0]=='A2') and ($recL < 1) )
|
||||
{
|
||||
$A2=$row[1]; $recL++;
|
||||
$sales=($sales + $row[1]);
|
||||
$uTOP=($uTOP + $row[1]);
|
||||
$points = ($points + ($row[1] * 2) );
|
||||
}
|
||||
if ( ($row[0]=='A3') and ($recL < 1) )
|
||||
{
|
||||
$A3=$row[1]; $recL++;
|
||||
$sales=($sales + $row[1]);
|
||||
$uBOT=($uBOT + $row[1]);
|
||||
$points = ($points + ($row[1] * 2) );
|
||||
}
|
||||
if ( ($row[0]=='A4') and ($recL < 1) )
|
||||
{
|
||||
$A4=$row[1]; $recL++;
|
||||
$sales=($sales + $row[1]);
|
||||
$uTOP=($uTOP + $row[1]);
|
||||
$uBOT=($uBOT + $row[1]);
|
||||
$points = ($points + ($row[1] * 3) );
|
||||
}
|
||||
# if ( ($row[0]=='A5') and ($recL < 1) ) {$A5=$row[1]; $recL++;}
|
||||
# if ( ($row[0]=='A6') and ($recL < 1) ) {$A6=$row[1]; $recL++;}
|
||||
# if ( ($row[0]=='A7') and ($recL < 1) ) {$A7=$row[1]; $recL++;}
|
||||
# if ( ($row[0]=='A8') and ($recL < 1) ) {$A8=$row[1]; $recL++;}
|
||||
# if ( ($row[0]=='A9') and ($recL < 1) ) {$A9=$row[1]; $recL++;}
|
||||
if ( ($row[0]=='DROP') and ($recL < 1) ) {$DROP=$row[1]; $recL++;}
|
||||
if ($recL < 1) {$OTHER=($row[1] + $OTHER); $recL++;}
|
||||
|
||||
$j++;
|
||||
}
|
||||
|
||||
$totA1 = ($totA1 + $A1); $TOTsales = ($TOTsales + $A1);
|
||||
$totA2 = ($totA2 + $A2); $TOTsales = ($TOTsales + $A2); $totTOP = ($totTOP + $A2);
|
||||
$totA3 = ($totA3 + $A3); $TOTsales = ($TOTsales + $A3); $totBOT = ($totBOT + $A3);
|
||||
$totA4 = ($totA4 + $A4); $TOTsales = ($TOTsales + $A4); $totTOP = ($totTOP + $A4); $totBOT = ($totBOT + $A4);
|
||||
$totA5 = ($totA5 + $A5);
|
||||
$totA6 = ($totA6 + $A6);
|
||||
$totA7 = ($totA7 + $A7);
|
||||
$totA8 = ($totA8 + $A8);
|
||||
$totA9 = ($totA9 + $A9);
|
||||
$totDROP = ($totDROP + $DROP);
|
||||
$totOTHER = ($totOTHER + $OTHER);
|
||||
$totPOINTS = ($totPOINTS + $points);
|
||||
|
||||
if ( ($USERcallsRAW[$i] > 0) and ($sales > 0) ) {$Cpct = ( ($sales / ( ($USERcallsRAW[$i] - 0) - $DROP) ) * 100);}
|
||||
else {$Cpct=0;}
|
||||
$Cpct = round($Cpct, 2);
|
||||
$Cpct = sprintf("%01.2f", $Cpct);
|
||||
$Cpct = sprintf("%6s", $Cpct);
|
||||
|
||||
if ( ($sales > 0) and ($uTOP > 0) ) {$TOP = ( ($uTOP / $sales) * 100);}
|
||||
else {$TOP=0;}
|
||||
$TOP = round($TOP, 0);
|
||||
$TOP = sprintf("%01.0f", $TOP);
|
||||
$TOP = sprintf("%3s", $TOP);
|
||||
|
||||
if ( ($sales > 0) and ($uBOT > 0) ) {$BOT = ( ($uBOT / $sales) * 100);}
|
||||
else {$BOT=0;}
|
||||
$BOT = round($BOT, 0);
|
||||
$BOT = sprintf("%01.0f", $BOT);
|
||||
$BOT = sprintf("%3s", $BOT);
|
||||
|
||||
if ( ($USERcallsRAW[$i] > 0) and ($points > 0) ) {$ppc = ($points / ( ($USERcallsRAW[$i] - 0) - $DROP) );}
|
||||
else {$ppc=0;}
|
||||
$ppc = round($ppc, 2);
|
||||
$ppc = sprintf("%01.2f", $ppc);
|
||||
$ppc = sprintf("%4s", $ppc);
|
||||
|
||||
|
||||
$A1 = sprintf("%4s", $A1);
|
||||
$A2 = sprintf("%4s", $A2);
|
||||
$A3 = sprintf("%4s", $A3);
|
||||
$A4 = sprintf("%4s", $A4);
|
||||
$A5 = sprintf("%4s", $A5);
|
||||
$A6 = sprintf("%4s", $A6);
|
||||
$A7 = sprintf("%4s", $A7);
|
||||
$A8 = sprintf("%4s", $A8);
|
||||
$A9 = sprintf("%4s", $A9);
|
||||
$DROP = sprintf("%4s", $DROP);
|
||||
$OTHER = sprintf("%4s", $OTHER);
|
||||
$sales = sprintf("%4s", $sales);
|
||||
|
||||
echo "| $user[$i] - $full_name[$i] | $USERcalls[$i] | $A1 | $DROP | $OTHER | $sales |$Cpct%|\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
if ( ($TOTcalls > 0) and ($TOTsales > 0) ) {$totCpct = ( ($TOTsales / ( ($TOTcalls - 0) - $totDROP) ) * 100);}
|
||||
else {$totCpct=0;}
|
||||
$totCpct = round($totCpct, 2);
|
||||
$totCpct = sprintf("%01.2f", $totCpct);
|
||||
$totCpct = sprintf("%6s", $totCpct);
|
||||
|
||||
if ( ($TOTcalls > 0) and ($totPOINTS > 0) ) {$ppc = ($totPOINTS / ( ($TOTcalls - $totOTHER) - $totDROP) );}
|
||||
else {$ppc=0;}
|
||||
$ppc = round($ppc, 2);
|
||||
$ppc = sprintf("%01.2f", $ppc);
|
||||
$ppc = sprintf("%4s", $ppc);
|
||||
|
||||
if ( ($TOTsales > 0) and ($totTOP > 0) ) {$TOP = ( ($totTOP / $TOTsales) * 100);}
|
||||
else {$TOP=0;}
|
||||
$TOP = round($TOP, 0);
|
||||
$TOP = sprintf("%01.0f", $TOP);
|
||||
$TOP = sprintf("%3s", $TOP);
|
||||
|
||||
if ( ($TOTsales > 0) and ($totBOT > 0) ) {$BOT = ( ($totBOT / $TOTsales) * 100);}
|
||||
else {$BOT=0;}
|
||||
$BOT = round($BOT, 0);
|
||||
$BOT = sprintf("%01.0f", $BOT);
|
||||
$BOT = sprintf("%3s", $BOT);
|
||||
|
||||
$TOTagents = sprintf("%6s", $i);
|
||||
$TOTcalls = sprintf("%6s", $TOTcalls);
|
||||
$totA1 = sprintf("%5s", $totA1);
|
||||
$totA2 = sprintf("%5s", $totA2);
|
||||
$totA3 = sprintf("%5s", $totA3);
|
||||
$totA4 = sprintf("%5s", $totA4);
|
||||
$totA5 = sprintf("%5s", $totA5);
|
||||
$totA6 = sprintf("%5s", $totA6);
|
||||
$totA7 = sprintf("%5s", $totA7);
|
||||
$totA8 = sprintf("%5s", $totA8);
|
||||
$totA9 = sprintf("%5s", $totA9);
|
||||
$totDROP = sprintf("%5s", $totDROP);
|
||||
$totOTHER = sprintf("%5s", $totOTHER);
|
||||
$TOTsales = sprintf("%5s", $TOTsales);
|
||||
|
||||
echo "+--------------------------+--------+------+------+------+------+-------+\n";
|
||||
echo "| TOTAL CLOSERS: $TOTagents | $TOTcalls |$totA1 |$totDROP |$totOTHER |$TOTsales |$totCpct%|\n";
|
||||
echo "+--------------------------+--------+------+------+------+------+-------+\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
if ($DB) {echo "\nRun Time: $RUNtime seconds\n";}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
|
||||
Reference in New Issue
Block a user