Patrick Archibald
2012-Sep-28 01:01 UTC
[asterisk-users] 100 outgoing calls - 10 at a time - /var/spool/asterisk/outgoing/
Hi, Is there a way to move 100 .call files in to /var/spool/asterisk/outgoing/ at once and have Asterisk call at maximum 10 at a time? The maxcalls setting in asterisk.conf will limit the number of calls but not gracefully. The calls over 10 just fail. I need to queue them up. I can certainly write a program to limit the number of simultaneous outgoing calls but before I do that I thought I would ask if there is another solution. Thanks in advance. Rock on, PLA Patrick L Archibald http://PatrickArchibald.com
Patrick Lists
2012-Sep-28 04:27 UTC
[asterisk-users] 100 outgoing calls - 10 at a time - /var/spool/asterisk/outgoing/
On 09/28/2012 03:01 AM, Patrick Archibald wrote:> Hi, > > Is there a way to move 100 .call files in to > /var/spool/asterisk/outgoing/ at once and have Asterisk call at > maximum 10 at a time?Afaik that is not possible. Wouldn't it make more sense to move call files in batches of 10 to outgoing/? Regards, Patrick
A J Stiles
2012-Sep-28 08:10 UTC
[asterisk-users] 100 outgoing calls - 10 at a time - /var/spool/asterisk/outgoing/
On Friday 28 September 2012, Patrick Archibald wrote:> Hi, > > Is there a way to move 100 .call files in to > /var/spool/asterisk/outgoing/ at once and have Asterisk call at > maximum 10 at a time?Yes: Move them in batches of 10. Could be as simple as last if ++$n_files > 9; if the script is in Perl. You know how many calls you can deal with at once; it's up to you to stay within your own limits. Asterisk just tries its damnedest to do whatever it's been told, without imposing any sort of judgement as to whether it's sane or wholesome. -- AJS Answers come *after* questions.
Leif Madsen
2012-Sep-28 11:27 UTC
[asterisk-users] 100 outgoing calls - 10 at a time - /var/spool/asterisk/outgoing/
On 27/09/12 09:01 PM, Patrick Archibald wrote:> Is there a way to move 100 .call files in to > /var/spool/asterisk/outgoing/ at once and have Asterisk call at > maximum 10 at a time?<snip>> I can certainly write a program to limit the number of simultaneous > outgoing calls but before I do that I thought I would ask if there is > another solution.Generally the preferred method when you're doing this programatically anyways is to use an external script through the Asterisk Manager Interface to generate your calls. Luckily, Russell Bryant has recently create an amioriginate.py[0] script which he's using as an example in the upcoming Asterisk: The Definitive Guide 4e book. [0] https://github.com/russellb/amiutils -- Leif Madsen http://www.oreilly.com/catalog/asterisk