Captain Kirk was always demanding more out of his Chief Engineer on Star Trek by saying, “Scotty, we need more power.”

While there is no limit on the number of inbound SMS messages your application can receive, Tropo’s 10 digit numbers are limited by the SMS carriers to sending 10 outbound messages per minute per number.  All 10 digit US SMS numbers have such a rate limit but it’s up to each API provider to adhere to their request.

Our SMS Shortcodes, on the other hand, have no limit on outbound SMS messages but there is a leasing fee to acquire these “Warp Speed” numbers.  Contact sales@tropo.com if you are interested!

If you feel like Captain Kirk when using 10 digit numbers and you want more power but you are not ready to move up to our SMS Shortcodes, here’s a trick!  You can attach an unlimited number of 10 digit voice/sms numbers to your Tropo application.  Each number is capable of sending 10 messages per minute per number.  Simply spread your outbound SMS messages over a larger pool of 10 digit Tropo numbers!

Here is an example of how I was able to help a customer do this using Ruby:

rate = 10 #per minute
totalmessages = 30
numbers = ["15123330824", "15713575541"]
count = 0
total = 0
starttime = Time.new

while total <  totalmessages do
  if Time.now - starttime < 60 and count < rate
    numbers.each do |number|
      # Send SMS
      message "hello "   count.to_s, {
        :to => "tel: 14803194368",
        :from => "tel: "   number,
        :network => "SMS"}
    end
    count = count   1
    total = total   1

  elsif Time.now - starttime > 60
    # Reseting counters
    starttime = Time.new
    count = 0
  end
end

In this example, we set the rate limit and the totalmessages that we would like to send out. We attached multiple phone numbers to our Tropo application and list them in the numbers array. Next, we loop through the numbers sending an SMS message for each number until we hit our rate limit for the minute. Finally, we wait for the rest of the minute and reset the timer and counters and loop through the rest of next batch of numbers until our totalmessages are hit.

Originally from Voxeo Blogs