[Asterisk-Users] limiting calls per day based on amount of time
Tzafrir Cohen
tzafrir at cohens.org.il
Mon Sep 19 06:16:17 MST 2005
On Sun, Sep 18, 2005 at 01:09:40PM -0600, Joseph wrote:
> How to implement call limitation based on amount of time call per day.
Something that is not very accurate:
check once in a while based on the number of records in the CDR. There
should be ways to make that check cheap.
More accurate: hold a counter. Incremet it in the dial macro. This may
require a simple agi.
>
> I've implemented the Dial "L" parameter but in addition I would like to
> limit an extension to certain amount of call time per day.
So make that counter per-extension. The database is probably a place for
that counter. DbGet and DbPut for setting/reading. Not sure about any
way of atomically incrementing it. But then again, can you have two
calls to the same lie at the same time?
--
Tzafrir Cohen | tzafrir at jbr.cohens.org.il | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir at cohens.org.il | | best
ICQ# 16849755 | | friend
More information about the asterisk-users
mailing list