Hi all!
I am a REAL n00b with Asterisk and have been tasked with the following:
We have 4 lines, and we used them all for outbound calls. What we would like to implement is something that measures the minutes and when it reaches a value in minutes, stop using that line until certain day of the month (when the free minutes count by the operator is reset to 0).
Is it possible? How can I do it? Could any of you be so kind to point me in the right direction?
Thanks a lot in advance!
Sorry if this was posted before, I dont even know the VOIP Terminology to search for this.
There is not an specific option in Asterisk for archive such function, but you can get this work, using php and mysql for write an asterisk counter script, if not try to use a2billing
to limit the duration of a call and tell caller/callee that call is about to finish.To do this, you can use the L option in your dialplan.
L(x[:y][:z]) - Limit the call to ‘x’ ms. Play a warning when ‘y’ ms are
left. Repeat the warning every ‘z’ ms. The following special
variables can be used with this option:
* LIMIT_PLAYAUDIO_CALLER yes|no (default yes)
Play sounds to the caller.
* LIMIT_PLAYAUDIO_CALLEE yes|no
Play sounds to the callee.
* LIMIT_TIMEOUT_FILE File to play when time is up.
* LIMIT_CONNECT_FILE File to play when call begins.
* LIMIT_WARNING_FILE File to play as warning if ‘y’ is defined.
The default is to say the time remaining.
So you with the L option and GotoifTime you can simply write such a dialplan you want .
A2Billing is very nice but I think it is more complex to use for this simple scenario .
What Asterisk doesn’t provide is automatic accumulation of the time used so far, and it does not allow you to revise the time limit for a call when a second, parallel, call is attempted. I think that is why the initial response said it was not supported.
I see…
Thanks a lot for your replies, I am going to try to get this working!