[asterisk-users] Limit monthly calls by context

Andrew Latham lathama at gmail.com
Wed Nov 16 07:50:24 CST 2011


On Wed, Nov 16, 2011 at 10:46 AM, Hans Goossen <goossen at planet.com.py> wrote:
> Hello group,
>
> I have this situation:
>
> I have several contexts with a few extensions each one. I need to give every context a limited quantity of minutes they can use. All the extensions in the context will share the same "bag" of minutes. Meaning ext 101 use 1900 mins, ext 102 60 mins and ext 40 mins.
> The limit must be monthly.
>
> I guess some "billing" solution can do the trick, but I think it's too much for that little. I don't need any other feature.
>
> I was thinking something like checking the CDR before make the call, I know it may permit some "extra" minutes to be used, but it really doesn't need to be that exact. A couple of extra minutes won't hurt.
>
> Ideas, suggestions ?
>
> Hans Goossen
> Investigación & Desarrollo
> Planet S.A.
> http://www.pla.net.py

You can use the DB[1] to add a table with user and seconds. Then use
the start and end seconds to do this.  I know there are many ways of
doing this with AGI, Manager, Realtime, etc...

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+10+Function_DB

-- 
~ Andrew "lathama" Latham lathama at gmail.com http://lathama.net ~



More information about the asterisk-users mailing list