Michelle Dupuis
2011-Jul-15 12:29 UTC
[asterisk-users] Controlling max simultaneous calls for a group/.call files
We are building an app that will initiate outbound calls using .call files, and each call can be a different duration (eg: 1min to 5min). These calls will go through an Asterisk service with other calls/apps running. I need to control the MAX number of channels in use so I don't overload this server. What is the best way to ensure I stay within an arbitrary limit (eg: 10 simultaneous call files in process at once)? The call files will be written to the spool directory by a bash file, so ideally the bash file should have visibility into the number of .call files in process. Thanks! M -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110715/2816ec30/attachment.htm>
Matt Riddell
2011-Jul-17 21:38 UTC
[asterisk-users] Controlling max simultaneous calls for a group/.call files
On 16/07/11 12:29 AM, Michelle Dupuis wrote:> We are building an app that will initiate outbound calls using .call > files, and each call can be a different duration (eg: 1min to 5min). > These calls will go through an Asterisk service with other calls/apps > running. > I need to control the MAX number of channels in use so I don't overload > this server. What is the best way to ensure I stay within an arbitrary > limit (eg: 10 simultaneous call files in process at once)? > The call files will be written to the spool directory by a bash file, so > ideally the bash file should have visibility into the number of .call > files in process.Use the Asterisk manager instead. Or do something like: asterisk -rx'core show channels'|grep "active channels"|cut -d' ' -f1 and either store the output in a variable or pipe it to a file. The other alternative would be to do "core show channels concise"|grep accountcode (where accountcode is what you originated the call with) and then do a "wc -l" on the output to count the lines. That's the cue for someone to explain some cleaner way to do it with a single bash command :-) -- Cheers, Matt Riddell _______________________________________________ http://www.venturevoip.com/news.php (Daily Asterisk News) http://www.venturevoip.com/exchange.php (Full ITSP Solution) http://www.venturevoip.com/cc.php (Call Centre Solutions)