[asterisk-users] Limit total length of calls to a specifig SIP peer

Laurent CARON lcaron at lncsa.com
Wed Jun 9 11:44:17 CDT 2010


On 08/06/2010 19:19, Steve Edwards wrote:
> The ONLY way (how's that for humble) to do this in a reliable and robust
> method is to use a real database. Personally, I like MySQL and I prefer to
> do database work in an AGI in a compiled language like C.
>
> Maintaining the accumulated duration in a global variable will fail if you
> need to restart Asterisk at any time. A global variable will also "fail"
> if you have more than 1 call finish at the same time.
>
> Parsing log files is guaranteed to be a resource pig and still has race
> conditions.
>

Hi,

I'm gonna follow your advice and store the CDR in a PostgreSQL database. 
It will allow to easily plug an AGI script to it.

Thanks

Laurent



More information about the asterisk-users mailing list