Developer EvangelistJohn Foland
Please visit our most up-to-date documentation on migrating from Twilio to SignalWire.
It's no secret that we're busy developing the world's most advanced cloud communications platform. Our infinitely scaling elastic infrastructure, coupled with messaging, voice, and video technologies, is best demonstrated through our real-time RELAY APIs.
In this post, we'll cover another facet of our effort to democratize complex communications tech, because our mission doesn't stop at developing advanced cloud communications. We also make it ridiculously easy to switch from other API providers and immediately cut costs that act as a barrier to innovation.
Before SignalWire began the software-defined telecom revolution, there weren't many choices out there and price gougers took advantage of this. As a result, developers have been stranded on backward-looking platforms and paying outrageous mark-ups for basic carrier services.
SignalWire services are priced to disrupt this model, allowing customers to shift valuable resources to where it matters: developing the most innovative communications tools of the 21st century.
What is LāML?
In order to smooth the transition to our advanced cloud platform, we've developed a backward-compatible language that easily allows coders to switch from Twilio to SignalWire: LāML - Legacy Antiquated Markup Language. With LāML, anyone can convert their existing TwiML projects in a matter of seconds.
At their core, LāML documents are just basic XML that give instructions for programmable voice and messaging. These documents can be connected via webhooks to voice and/or messaging on any phone number, and they can even be stored serverlessly in LāML bins.
When conditional logic is needed, or when building your own complex application is required, this is where the LāML REST API comes into play. Simply code in your preferred programming language and organize your projects into reusable LāML apps within the SignalWire interface.
Two Simple Ways to Switch
Transferring a TwiML bin to a LāML bin requires absolutely no modifications to code (except perhaps any <Redirect> within the XML that may point back to Twilio resources). Here are step-by-step instructions:
1. Open a browser tab and access your existing TwiML bins.
2. In a second browser tab, head to your SignalWire Dashboard. Once there, select your project, then navigate to LāML > Bins (unique_space.url/laml-bins). Click the button to Create a LāML Bin.
3. For each TwiML bin you wish to migrate, simply copy the bin's XML from your TwiML bin repository and paste it into a fresh LāML bin. Give each bin a friendly name so they're easy to identify.
4. Each LāML bin you've created is now listed with a request URL. Use the copy URL function to get the link into your clipboard.
You may now use your bin request URL anywhere within your apps or by specifying it for use with a specific phone number. To perform the latter, edit settings for a phone number, then simply specify the handling of voice or message by LāML Webhooks, then paste the URL in the appropriate fields.
Migrating your TwiML app to use the LāML REST API is almost just as easy, but is specific to your preferred programming language. Below is an outline of all the necessary steps:
1. From within any project in your SignalWire space, go to the API page and create a new token.
2. Armed with your new token, your project key, and your space URL, visit our LāML REST API documentation and select your preferred programming language to the right.
3. Modify your application accordingly. This will include changing your credentials and specifying your project name to import into your project. Depending on your language, you'll only have a few lines to edit at most. All the application logic stays the same!
You may now use your application URLs by specifying the handling of voice or message by LāML Webhooks within any phone number's settings, or you can create a reusable "LāML app" in the SignalWire interface for shared use with multiple phone numbers.