I run it, make a call, and after the call disconnects, when I run the
script again, I do get changed numbers:
[EMAIL PROTECTED] ~]$ total_account_codes /var/log/asterisk/cdr-csv/Master.csv
"" total is 151974 seconds or 2532.9 minutes or 42.22 hours
[EMAIL PROTECTED] ~]$ pbxmonitor
Mojo > 7478633
[EMAIL PROTECTED] ~]$ total_account_codes /var/log/asterisk/cdr-csv/Master.csv
"" total is 151983 seconds or 2533.05 minutes or 42.22 hours
[EMAIL PROTECTED] ~]$
Is this what you mean? As you can see, I even allow blank accountcodes
('cause we don't even use accountcodes), so there shouldn't be any
issue. Maybe * is not logging the call duration under certain
disconnect circumstances.
As per the line near the top of my script, if I change the 12 to a 13 to
capture BillSeconds instead of duration, I get the following:
[EMAIL PROTECTED] ~]$ total_account_codes /var/log/asterisk/cdr-csv/Master.csv
"" total is 151639 seconds or 2527.32 minutes or 42.12 hours
which is slightly less than before... You might try this and see if it
helps.
Moj
Jeremy wrote:
Can you think of any reason that this would not pick up on times after call
is placed, and then disconnected. I noticed that the time does not change on
the call times after a call has been made.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mojo with
Horan & Company, LLC
Sent: Monday, March 27, 2006 3:22 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Master.csv Shell Script
If you've got PHP installed, here's one I made for our office:
http://horanappraisals.com/asterisk/total_account_codes/
Run it with no parameters to check Master.csv in the current directory, or
pass the filename to parse as the first parameter.
# ./total_account_codes /var/log/asterisk/cdr-csv/Master.csv
"test" total is 310 seconds or 5.17 minutes or 0.09 hours "" total is 33130
seconds or 552.17 minutes or 9.2 hours
#
The second line totals all lines with no account code specified.
hth moj
Jeremy wrote:
Im not looking for anything super detailed, just something to run
through the master.csv file and give total time per account code. . .
.does anyone out there have a script like this I could work from?
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
Mojo <[EMAIL PROTECTED]>
Office Manger, Horan & Company, LLC
(907) 747-6666 x112
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
Mojo <[EMAIL PROTECTED]>
Office Manger, Horan & Company, LLC
(907) 747-6666 x112
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users