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.<br><br><div class="gmail_quote">On Wed, Nov 16, 2011 at 7:02 PM, <span dir="ltr"><<a href="mailto:adamk@3a.hu">adamk@3a.hu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello Hans,<div class="im"><br>
<br>
On 11-16-2011 14:46, Hans Goossen wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>
<br>
</blockquote>
<br></div>
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.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>
<br>
</blockquote>
<br></div>
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).<br>
<br>
regards<br>
adam<div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
______________________________<u></u>______________________________<u></u>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/<u></u>mailman/listinfo/asterisk-<u></u>users</a><br>
</div></div></blockquote></div><br>