Recently Seesaw open sourced Tin Can. I worked on this awhile ago when I was at Seesaw. We used it to provide authentication with phone numbers via SMS and verification links.
It's a simple Rack app you can mount in your own app. It provides a simple API for sending a verification SMS and then verifying it.
To get started:
$ gem install tincan
For more information, check it out on GitHub.