is there a way to check the state of your sms server? READY or BUSY or something that kind?
If so, you could do the following:
1. Write a method. That returns the current state of the sms server.
2. Write a method that returns you the next n sms from your queue.
3. Write a handler that checks periodically the state of the sms server.
If the server is in state READY, get the next n sms and send them to the sms server.
After that, check the state of the sms server again