a very importante question

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

a very importante question

Postby brett05 » Tue Sep 29, 2009 1:17 pm

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
Jasperreports & Queuemetrics & SugarCRM integration - Customization and Add-ons
Freepbx||Billing||Centos||Opensuse||Debian||Centos||Fedora||Sangoma||Diguim
brett05
 
Posts: 571
Joined: Sun May 24, 2009 5:48 pm
Location: tunisia

Postby williamconley » Tue Sep 29, 2009 10:11 pm

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.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # 888-883-8488 # +44(203) 769-2294
williamconley
 
Posts: 20427
Joined: Wed Oct 31, 2007 4:17 pm
Location: Bartow, FL (In the boondocks)

thanks

Postby brett05 » Wed Sep 30, 2009 8:27 am

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
..................
Jasperreports & Queuemetrics & SugarCRM integration - Customization and Add-ons
Freepbx||Billing||Centos||Opensuse||Debian||Centos||Fedora||Sangoma||Diguim
brett05
 
Posts: 571
Joined: Sun May 24, 2009 5:48 pm
Location: tunisia

Postby williamconley » Wed Sep 30, 2009 10:28 pm

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 ...)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # 888-883-8488 # +44(203) 769-2294
williamconley
 
Posts: 20427
Joined: Wed Oct 31, 2007 4:17 pm
Location: Bartow, FL (In the boondocks)

Postby heinz » Thu Oct 01, 2009 1:51 am

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
heinz
 
Posts: 106
Joined: Mon Oct 08, 2007 1:30 am
Location: South Africa

a very importante question

Postby brett05 » Thu Oct 01, 2009 7:16 am

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
Jasperreports & Queuemetrics & SugarCRM integration - Customization and Add-ons
Freepbx||Billing||Centos||Opensuse||Debian||Centos||Fedora||Sangoma||Diguim
brett05
 
Posts: 571
Joined: Sun May 24, 2009 5:48 pm
Location: tunisia

Postby heinz » Thu Oct 01, 2009 3:14 pm

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]".
heinz
 
Posts: 106
Joined: Mon Oct 08, 2007 1:30 am
Location: South Africa

Re: a very importante question

Postby williamconley » Thu Oct 01, 2009 8:40 pm

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 ...
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # 888-883-8488 # +44(203) 769-2294
williamconley
 
Posts: 20427
Joined: Wed Oct 31, 2007 4:17 pm
Location: Bartow, FL (In the boondocks)

thanks

Postby brett05 » Fri Oct 02, 2009 12:41 pm

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]
Jasperreports & Queuemetrics & SugarCRM integration - Customization and Add-ons
Freepbx||Billing||Centos||Opensuse||Debian||Centos||Fedora||Sangoma||Diguim
brett05
 
Posts: 571
Joined: Sun May 24, 2009 5:48 pm
Location: tunisia

Postby heinz » Sun Oct 04, 2009 1:32 am

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
heinz
 
Posts: 106
Joined: Mon Oct 08, 2007 1:30 am
Location: South Africa

thanks

Postby brett05 » Sun Oct 04, 2009 7:56 pm

ok i will try it again maybe it will work
thanks :wink:
Jasperreports & Queuemetrics & SugarCRM integration - Customization and Add-ons
Freepbx||Billing||Centos||Opensuse||Debian||Centos||Fedora||Sangoma||Diguim
brett05
 
Posts: 571
Joined: Sun May 24, 2009 5:48 pm
Location: tunisia

thanks

Postby brett05 » Mon Oct 05, 2009 8:00 am

thanks heinz i love you it work very good
can you also help me in other thing please :cry: 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 :wink:
Jasperreports & Queuemetrics & SugarCRM integration - Customization and Add-ons
Freepbx||Billing||Centos||Opensuse||Debian||Centos||Fedora||Sangoma||Diguim
brett05
 
Posts: 571
Joined: Sun May 24, 2009 5:48 pm
Location: tunisia


Return to Support

Who is online

Users browsing this forum: No registered users and 92 guests