[asterisk-users] concurrent call tracking
Steve Edwards
asterisk.org at sedwards.com
Wed May 11 17:13:05 CDT 2011
On Thu, 12 May 2011, Dovid Bender wrote:
> What I do is when ever a call comes in I update a table in MySQL to
> active = (active +1). On hang up I do active = (active -1).
>
> I have a cron that checks once a minute to see how many active and
> stores it along with epoch in db.
>
> I then have a graph that shows channel usage. If you want the code let
> me know.
How do you handle table locking in case more than 1 call arrives 'at the
same time?'
How do you handle a crash?
Using group() and group_count() with a bit of AMI to retrieve the count
and stuff it in the database sounds like a 'better practice.'
--
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