This article was created and published by Fred Lackey on August 26, 2017. Go check out Fred’s site for other great developer articles.
In today’s mobile world, people just assume every phone number is a cell phone… even if it’s clearly listed as “office” on your business card. And, in most cases, if the phone number belongs to a corporate phone system or PBX, any text messages sent to that number are lost forever in the great bit bucket in the sky. Until now, that is! If you are using Flowroute as your backend SIP trunking provider, you can now receive any SMS text message via email.
Here’s how to do it…
1. Setup My Proxy App Using Docker
I’ve whipped up a simple Node app to make life easy for you. In short, it receives all SMS text messages, from Flowroute, and emails them to you at either a single email address or custom “wild card” domain. Assuming you have Docker installed a public server, install it via the following command:
docker run --name flowroute-proxy -p 3000:3000 \ -e TO_EMAILemail@example.com \ -e SMTP_PASS=robin4ever \ -e SMTP_USERfirstname.lastname@example.org \ -e SMTP_HOST=smtp.batcave.com fredlackey/flowroute-proxy
The settings are all done by environment variables. A complete list is in the Docker Hub:
Of course, it will be up to you to ensure your DNS and server settings are both setup with a FQDN pointing to that docker container. You’ll also need to have an SMTP account for outgoing messages.
2. Activate the API with Flowroute
Once you have a Flowroute account, head over to their Developer Portal and click on the Get API Access button. This will bounce you over to the Flowroute portal where you will enter the URL to the Docker container you setup above.