Share This Post:

How to submit calls in batch mode

Will be using your API via a web app. Not sure how many lines we will be using initially, but when I program a series of calls to be made (let’s say I have 100 calls & have 8 lines available), programatically, do I initiate a ‘CallText’ for all 100 calls (knowing that only 8 @ a time will be processed) – then, do I have to do a ‘CallStatus’ on all 100 to see their statuses? — OR –
Do I have to do a ‘Loop’-ing style function where I initiate a ‘CallText’ for 8 calls, wait to get all of those statues back, then do the next 8, check the statuses, etc…until all 100 calls have been made?
Don’t see anything explaining this in any of your docs.

Either way should work since the gateway has it’s own outbound call scheduler. However, it is recommended not to submit too many calls (compared with the available lines) to the gateway, especially if these calls are scheduled to be called at the same time period. Calls that cannot be made in time have to be re-scheduled, cause more locking, disk operation, and computing.

For Voicent programs like BroadcastByPhone, the number of submitted calls are maintained to be exactly as the number of lines available on the gateway. Whenever a call is finished, a new call will be submitted. There is no need to poll the call status very often since phone calls take time. You can try to poll every 5 seconds, for example.

The other choice is to submit all your calls at the same time, but set the appropriate call time for them. For example, to set the first 8 calls at some time, and the next 8 calls at 2 minutes after that time, and so on. The time is going to be an estimate, but it is easier to implement.

Share This Post:

This entry was posted in Developer. Bookmark the permalink.