I have a custom script that takes a phone number from a database or an xml document, after that I use a place call step to call the phone number and then make a redirect call to another script and connect the customer to one agent. The problem is that I need to validate that if there is no available agent, then my script shouldn't proceed with another outbound call, but when the script calls the first customer and connect with the only available agent and both are talking together, the script is calling the second customer, I don't know why if there is zero ready agents.
I am attaching the script for you to take a look at it. (please change the file extension to .aef)
Gabriel.