The script will queue a call to csq1 and then dequeueAll. It then queues the call to csq2 and dequeueAll and so on.

Sometimes during the processing on dequeueAll, due to timing, the dequeueAll for csq2 may be processed after call is queued to csq3 and so the call gets incorrectly dequeued from csq3. If an agent was already allocated for this call in csq3, then this agent can toggle between ready and reserved.