Getting started with InboundXML is simple and straightforward.
Steps for creating an InboundXML document:
- Host a file on your server containing the InboundXML syntax.
- Set the Voice URL or SMS URL paths for the hosted InboundXML document.
- Initiate calls or SMS messages to the hosted InboundXML file to receive a response.
The following is a sample InboundXML document:
<Response> <Say type='ssml'>The number you called is currently not set up. Please visit app.ytel.com to login to your account and setup up your number.</Say> <Hangup/> </Response>
The InboundXML document can be as simple as the sample above or more complex. The above sample can be found at: https://customapps.ytel.com/m360/examples/welcome/index.php
A Note about Number and Date Formats
For all requests in Ytel API, the API tries to convert all phone numbers to E.164 format. An E.164-formatted phone number will be in the form of (123)-456-7890 or 1234567890. If a number cannot be converted, the raw format will be used.
Dates in Ytel API are in the format of RFC 2822 format. The date: "8:04 PM PDT on November 2nd, 2016" would be converted to format yyyy-mm-dd HH:MM:SS as "2016-11-02 20:04:00" to conform to 24 hrs format.
When handling an inbound call, the Ytel API requests the Voice Request URL (or any other subsequent URLs Ytel API may interact with) using standard HTTP GET or POST methods. The HTTP method used (GET or POST) can be specified on a case-by-case basis but both HTTP methods send a set of default request parameters to the API.
Refer to the table below for a list of default call parameters that are sent. This is how Ytel API contains information about the type of call taking place.
If the initial request method is GET, values are sent as URL query parameters. If it is POST, they are sent as POST parameters.
The AccountSid string value for the account the call occurred
The valid 10-digit number (E.164 format) that is called
The valid 10-digit number (E.164 format) that initiated the call
The callSid string value for the call object
Status for the call.
The base URL that connected with the call
Every number tied to your Ytel API account can be configured to respond to voice calls or SMS messages with an InboundXML document.
Updated 11 months ago