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

Mike list at virtutel.ca
Tue Jun 8 08:02:30 CDT 2010


If your server is good enough to handle those queries, I would have a cron
job use the CDR to calculate the time spent this current day every minute or
so, put this value in a text file (or anywhere really) and read it every
call you make to check, and use this as the absolute timeout value for your
call. Then again, if you have one hour left, you should divid this by six
(in case everyone calls out at the same time). 

So if you have 2 hours left, only allow one call to use 120minutes/6

Mike.



> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-
> bounces at lists.digium.com] On Behalf Of Laurent CARON
> Sent: Tuesday, June 08, 2010 8:53
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [asterisk-users] Limit total length of calls to a specifig SIP
> peer
> 
> Hi,
> 
> I'm currently using a cheap SIP provider for outbound calls.
> 
> I do have 6 channels to them.
> 
> In their terms of service there is the following limit:
> 
> The total duration of calls during one single day should not exceed 24
> hours or we do have the right to terminate the contract...blah blah
> 
> What is the best way to use this provider as long as we are below let's
> say 22h in a single day ?
> 
> Thanks
> 
> Laurent
> 
> --
> _____________________________________________________________________
> -- 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




More information about the asterisk-users mailing list