Page 1 of 1
a very importante question

Posted:
Tue Sep 29, 2009 1:17 pm
by brett05
hi to all members here
i have a question for the "User Stats"
can i change the status in the "OUTBOUND CALLS FOR THIS TIME PERIOD: "
so for exemple i have the variable "A"-->Answer machine so here can i seach the user stats with the name of status not with variable "A" or "NI" or "INCALL" ....
it is possible please

Posted:
Tue Sep 29, 2009 10:11 pm
by williamconley
give exact URL (without your IP, we don't need that) and the actual area you are looking at changing on the page. Probably involves a slight php change but will also need some mysql tossed in.
thanks

Posted:
Wed Sep 30, 2009 8:27 am
by brett05
first thanks william for your answer
first this is a exemple a url where we can find our status:
"http://192.168.2.100/vicidial/user_stats.php"
and then for the status we can see this :
- Code: Select all
OUTBOUND CALLS FOR THIS TIME PERIOD: (10000 record limit)
# DATE/TIME LENGTH STATUS PHONE CAMPAIGN GROUP LIST LEAD HANGUP REASON
1 2009-09-28 14:48:18 8 INCALL 325014354 TEST ADMIN 101 410 AGENT
2 2009-09-28 14:48:11 3 A 325014339 TEST ADMIN 101 406 AGENT
3 2009-09-28 14:46:13 53 HC 325014257 TEST ADMIN 101 387 AGENT
4 2009-09-28 14:45:49 6 A 325014242 TEST ADMIN 101 382 AGENT
5 2009-09-28 14:45:02 21 HC 325014225 TEST ADMIN 101 375 AGENT
6 2009-09-28 14:44:57 4 A 325014219 TEST ADMIN 101 373 AGENT
7 2009-09-28 14:44:20 5 A 325014204 TEST ADMIN 101 365 AGENT
8 2009-09-28 14:44:12 4 A 325014208 TEST ADMIN 101 367 AGENT
9 2009-09-28 14:43:49 4 A 325014189 TEST ADMIN 101 360 AGENT
10 2009-09-28 14:43:11 6 A 325014171 TEST ADMIN 101 353
and i have see he is the same thing in all vicidial also i have see this in reports ,i know we need to change same datebase to work it but just i want some thing as this :
- Code: Select all
1 2009-09-28 14:48:18 8 Lead Being Called 325014354 TEST ADMIN 101 410 AGENT
2 2009-09-28 14:48:11 3 ANSWERING MACHINE 325014339 TEST ADMIN 101 406 AGENT
..................

Posted:
Wed Sep 30, 2009 10:28 pm
by williamconley
easiest method: write your own SQL Call and put it on your own page to get this report in ANY format you like.
use phpMyAdmin to browse through your database to find the data, and then have a php programmer pop in a web page that will reach in and get the data you want, filtered the way you want.
slightly harder method (but not very if you have MySQL guy handy): modify the vicidial code to get the alternate data (text instead of code). This will likely require a pull of data from a second table to get the text (matching the code to the text). It's not a "simple" query, but it is fairly basic. It won't be simple to find it in the code, either, but once again not actually hard.
i'd recommend the first version, because then you'll have a very easy to modify report that YOU generated. with all custom data on it. but i admit i have a tendency to "just write the code" by reflex sometimes (and i'm more mysql than php ...)

Posted:
Thu Oct 01, 2009 1:51 am
by heinz
Hi brett05,
as far as I understand you wild like to see the status name instead of the status id?
I don't know if it's really worth the trouble but I can point you in the right direction.
In user_stats.php you'll find an sql-statement after
##### vicidial agent outbound calls for this time period #####
- Code: Select all
$stmt="select * from vicidial_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;";
You have to join the vicidial_log table with the vicidial_statuses and vicidial_campaign_statuses and edit the output to get the full status name.
Thanks,
heinz
a very importante question

Posted:
Thu Oct 01, 2009 7:16 am
by brett05
thanks for your answer
can you please give me more ways or a simple exemple to how join this two table ,
sorry i'am more good in php than the mysql
thanks

Posted:
Thu Oct 01, 2009 3:14 pm
by heinz
Hi,
if you don't use custom campaign statuses you can use this statement:
(not tested!!)
- Code: Select all
$stmt="select vicidial_log.*,vicidial_statuses.status_name from vicidial_log left join vicidial_statuses on vicidial_log.status = vicidial_statuses.status where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;";
Then in the table data replace "$row[8]" with "$row[15]".
Re: a very importante question

Posted:
Thu Oct 01, 2009 8:40 pm
by williamconley
brett05 wrote:thanks for your answer
can you please give me more ways or a simple exemple to how join this two table ,
sorry i'am more good in php than the mysql
thanks
the samples given were meant to be put IN a php file. verbatim ...
thanks

Posted:
Fri Oct 02, 2009 12:41 pm
by brett05
thanks but not work
it give me this :
- Code: Select all
OUTBOUND CALLS FOR THIS TIME PERIOD: (10000 record limit)
# DATE/TIME LENGTH STATUS PHONE CAMPAIGN GROUP LIST LEAD HANGUP REASON
1 2009-10-01 20:04:22 54 AGENT 326072888 TESTCAMP ADMIN 101 68 AGENT
2 2009-10-01 20:03:18 53 AGENT 326611279 TESTCAMP ADMIN 101 57 AGENT
3 2009-10-01 20:02:34 13 AGENT 326822623 TESTCAMP ADMIN 101 54 AGENT
at the place of staus name it show me the name of agent[/quote]

Posted:
Sun Oct 04, 2009 1:32 am
by heinz
Hi,
then it's not $row[15] but maybe 16 or 17...
Just check for yourself - it's the last element in the $row array.
Thanks,
heinz
thanks

Posted:
Sun Oct 04, 2009 7:56 pm
by brett05
ok i will try it again maybe it will work
thanks

thanks

Posted:
Mon Oct 05, 2009 8:00 am
by brett05
thanks heinz i love you it work very good
can you also help me in other thing please

because you are very good in mysql as me
look can i make the same thing in this file :call_report_export.php
to do the export with status name
thanks
