[asterisk-users] Limit monthly calls by context

Sammy Govind govoiper at gmail.com
Wed Nov 16 12:24:50 CST 2011


I'd say try a2billing- thats abit of an overkill for just this
functionality but you'll get lot or options to play with there.

On Wed, Nov 16, 2011 at 7:02 PM, <adamk at 3a.hu> wrote:

> Hello Hans,
>
>
> On 11-16-2011 14:46, Hans Goossen wrote:
>
>  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 would create a macro which calls an agi.  The agi searches the CDR table
> (mine is in sql) and calculates if the call can go through.  Then i'd call
> this macro from every extension in the dial plan just before the dial cmd.
>
>
>  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.
>>
>>
> It depends on the number of simultaneous calls from within the same
> context.  The agi can return a number of seconds (calculated from sql)
> which the dial cmd can use as an absolute limit and after that amount of
> seconds it can hang up the call (see S or L flags).
>
> regards
> adam
>
>
> --
> ______________________________**______________________________**_________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>              http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/**mailman/listinfo/asterisk-**users<http://lists.digium.com/mailman/listinfo/asterisk-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111116/c66761b0/attachment.htm>


More information about the asterisk-users mailing list