In this guide, we’ll show you how to initiate a basic outbound call using the Telnyx API, and control the call using TeXML.
By Pete Christianson
TeXML Translator makes it easy to write a new application in minutes, using simple TeXML commands — called verbs — which you wrap in an XML file.
In this guide, we’ll show you how to initiate a basic outbound call using the Telnyx API, and control the call using TeXML.
Watch this video with Telnyx Programmable Voice Product Manager Rafal to see how it's done in less than five minutes.
Before we get started, follow the TeXML setup instructions in our Developer Center to set up your account, number and TeXML application.
Log in to the Mission Control Portal and navigate to Programmable Voice and TeXML Bin. Create a new TeXML Bin. Input the TeXML instructions in the Content field. Rafal used the simple text-to-speech xml code from the previous tutorial. Save the file.
Now in the Developer Center, navigate to Voice -> Programmable Voice -> TeXML -> TeXML REST commands page. Click on “Curl” under the “Request Samples” section on the right and copy the code and paste into your favorite notepad editor.
Then, you’ll need to input your TeXML application ID into the code you just pasted in the step above. To find that, navigate to the TeXML application you created in the previous tutorial, copy the app ID and paste it into the code in your editor.
Next, you’ll need your API Key, which can be found on the right side of the home page in the Mission Control Portal. Click “Manage Keys” and copy the API Key. If you don’t have one, you can create a new one. Paste it into your notepad editor.
Then, in your notepad editor, enter the number you are calling into the “To” line, and enter your Telnyx phone number from the “My Numbers” in the “From” line. Be sure to assign that number to your TeXML application with the dropdown menu under “SIP Connection/App.”
Finally, navigate back to the TeXML Bin file from step one, copy the URL, paste that into your terminal, and submit your Curl request. Your call will be made and an automated message will play using Amazon Polly text-to-speech.
If you have any questions on how to get started with Telnyx Voice API using TeXML, feel free to reach out to our team of experts!
Related articles