Execute many calls in same time

Hi, guys! How to execute many calls in same time when I use nodejs service of ipcortex-pabx? For example, I have 5 calls at 8:00am and my system has to call all of them without queue. Maybe you know some solutions?) p.s. It’s need for “wake up alarm” (automatically calls for guests).

Hi,
Just use the dial method, it is asynchronous (non-blocking), and then monitor the call status via the line status change callbacks. This does beg the question exactly which lines are you invoking the dial on though (you will need enough free lines on a handset to execute all the dials on).

My take on this would be to issue a dial on the target device, to a central IVR that explains this is an alarm call. As long as you don’t set the autoanswer parameter in the dial() call to true, the handset will ring first, and then connect on pickup.

How I can execute parallel calls from different accounts at the same time using nodejs service? Is it real?

I guess you could if you have different contexts (HTTP request cookie space) for each thread, not entirely sure how to do that in Node and probably not the best idea for scalability.

If you create and then use a user with the admin role for API access then it will be able to enumerate all the devices on the system, and can then fire a call against any or all of them inside your timer handler function.

As previously explained device.call() is non-blocking, you give it a callback to invoke when you get the call result from the PBX and just monitor the line status to check the call result. You can therefore fire all your call()s serially and they will execute within milliseconds of each other (for a reasonable number of calls). This should be fine provided you don’t murder the PBX by effectively DOSing it with lots of dials at the same time. If you are trying to place a very large number of calls (which will depend on the size of the box) in the same few seconds, then you may want to implement some sort of queue/scheduler to rate limit these.