[asterisk-users] Processed Call Counter
Eric Wieling
EWieling at nyigc.com
Thu Mar 8 10:48:27 CST 2012
1.4:
pbx> core show channels
[snip]
167 active channels
84 active calls
1.8:
pbx> core show channels
[snip]
23 active channels
12 active calls
9567 calls processed
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Steve Edwards
Sent: Thursday, March 08, 2012 11:40 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Processed Call Counter
On Thu, 8 Mar 2012, [Digital^Dude] (r) wrote:
> How can I reset the value of asterisk' "calls processed" without
> restarting asterisk? Where does it save/access the value of all
> processed calls since last restart from?
(I'm just a 1.2 Luddite, so my input may be a bit dated.)
Where are you seeing 'calls processed?'
There is a 'channels created' counter. That's the bit after the '.' in ${UNIQUEID}.
Resetting this is probably a bad idea, but if you're really determined you could write a small Asterisk application (app_reset_call_counter()?) that would lock the appropriate data structure, reset it, and unlock the data structure.
Probably a better idea would be for you to maintain a counter in a global variable. Then you are free to do with it as you please without having to consider the implications of changing something internal to Asterisk.
If you stored your counter in a database, it could persist beyond that instance of Asterisk in case of an unlikely crash. If you go this route, 2 AGIs (increment-call-counter and reset-call-counter) would help keep your dialplan 'clean.'
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
More information about the asterisk-users
mailing list