By John Foland, Developer Evangelist
The telecommunications industry is fraught with old, antiquated technologies. They’re difficult to understand and even harder to deploy. All of that gives way to exorbitant carrier charges and dependence on backward-looking services that thrive on the obscurities and complex nature of the sector. Well, that was the case until the Original Geeks from SignalWire came along to set it all straight.
Making communications technologies programmable and accessible to developers is no simple task, but that is precisely our mission at SignalWire. Our OGs are working day and night to expose complex functionalities and make them as easy as possible to manipulate via our advanced cloud platform.
My goal in this article is to quickly familiarize you with your SignalWire Space and help you to get started developing with it immediately. We’ve packed a lot of power into your Space, so taking it all in at once can sometimes require precious time that many developers don’t have to spare. This walkthrough will provide you with an overview of SignalWire’s capabilities and where to start.
You can develop anything with SignalWire: Inbound and outbound voice, WebRTC video, SMS and MMS, SIP, ASR (with our Google Cloud Speech-to-Text support), and can even integrate AI into your project by building and importing a Dialogflow agent.
To achieve your development goals, you may find yourself using one of our advanced Relay APIs or perhaps even our backward-compatible LāML API.
Getting started: The very first steps
Each SignalWire Space can be divided into as many projects as needed. Projects can be used to separate distinct applications, different clients, or both. With that in mind, create a project and give it a name that describes its purpose.
Once your project is created, it’s best to grab a phone number (a normal DID is only 8 cents) so that you can immediately begin to configure and test. When you find a number that suits your requirements and purchase it, you’ll see a number of ways in which you can handle voice and messaging through that number. Let’s leave those fields blank for the time being while we take a look at where this project will take us; we’ll come back and fill them in later with the appropriate values.
Choosing a development path
Deciding which part of SignalWire’s functionalities you’ll need to use depends on your objectives. As a developer, you know that there are often dozens of ways to accomplish the same task, so here I will provide you with the most straightforward paths for the following common use cases:
- Creating an interactive voice or messaging application.
- Creating a basic serverless app with raw XML
- Implementing artificial intelligence
- Setting up voice lines using SIP
Creating an interactive voice or messaging application
SignalWire offers two main ways of developing interactive applications within your preferred programming language: the Lāml REST API and our Relay APIs. Whichever one you’ll choose hinges on your project’s requirements and your familiarity with programmable communications. For beginners or those looking to get their feet wet, I would suggest the Lāml REST API. For more experienced developers and those who require simultaneous bi-directional data transfer for real-time communications, our advanced Relay API over WebSockets is the only way to go.
The documentation for our LāML REST API and our advanced Relay API can be found by clicking on the respective preceding links. We also provide a Relay REST API with a set of endpoints that make interacting with Relay simple and familiar.
Whichever you end up choosing, you’ll definitely need to set up an API token so that your application can authenticate to your Space’s project. Do that by heading to your Space’s API page. On that same page, you have access to all relevant data points for your application: Your Project Key, your Space URL, and your newly created API token.
Creating a basic serverless app with raw XML
Just need to perform a simple action when a call or message comes in, like sending an SMS, reading text aloud, or recording incoming audio? You’ll find all of that extremely easy to do with LāML XML and our serverless LāML bins.
To get started with writing your own LāML code, check out our LāML XML specification documentation. An easy-to-use interface for storing your LāML code serverlessly can be found on the Bins sub-page in the LāML section of your Space. From that page, once you’ve saved your code to a bin, use the copy URL functionality and paste the resulting URL into your phone number’s settings by choosing to handle your incoming calls or messages with LāML webhooks.
Implementing artificial intelligence
SignalWire offers tight integration with Dialogflow, Google’s AI-powered conversation engine. With Dialogflow, conversational robots can be created to interact with users and make use of external data and contextual relationships. Bots in Dialogflow are called “agents”, and functionalities that users can query are referred to as “intents”.
Once you’ve created your bot (there are some nifty pre-built agents to play around with for those short on time), simply connect your Google account and import your agent by heading over to the Dialogflow page in your SignalWire Space. From the import page, you will be able to choose your desired voice engine for your bot to use and set an optional welcome message. Once your agent is imported, point your phone number to it by editing its settings and choosing to handle its incoming calls with a Dialogflow agent.
Setting up voice lines using SIP
Maybe you just need to set up some VoIP… Well, it couldn’t get much easier. SignalWire provides a feature-packed interface that’s dead simple to use. You can start inbound and outbound calling on any SIP compatible device or softphone in less than two minutes.
Head over to the SIP page, and Create a SIP Endpoint. Choose your credentials and which number you’d like to appear as when calling normal PSTN lines. Once you’ve saved your new endpoint, head on back over to your phone number’s settings and specify that it should handle incoming calls as a SIP Endpoint. You’re done.