Calls over AMI vanishing - anyone seen this before?

I’ve been using asterisk for almost 4 years now and yet still have not found a solution to this. Basically if I place a block of outbound calls, say 20 at a time, using AMI commands about 2 of those calls will just vanish into thin air with absolutely nothing in the logs in asterisk to show that they were ever received by AMI. What’s more the log in the calling application clearly shows AMI accepted the commands. Weird huh? Anyone else seen this?


If you are sending the AMI commands to Asterisk via a php script add a


just before you close the socket. You might want to play with the number of seconds.

Sometimes whatever you are using to send AMI commands to Asterisk executes and closes the socket before Asterisk can respond.

I hope this helps.



^ thanks! I found a sleep of about 3-4 seconds every 10 or so calls worked but does anyone know if this has been fixed in a latest release?

If not, do you know how to capture if AMI was successful or not and therefore retry the command/call again if it failed the first time? I am using AMI over windows sockets so not connecting interactive mode.