The API Call Markup Language (ACML) represents a set of instructions you can use to tell the Call API what to do when you receive an incoming call.
When someone makes a call to one of your Call API numbers, the service will look up the URL associated with that phone number and make a request to that URL. The Call API will read the markup instructions at that URL to determine what to do: record the call, play a message for the caller, prompt the caller to press digits on their keypad, etc.
<?xml version="1.0" encoding="UTF-8"?><Response><Say voice="woman">Please leave a message after the tone.</Say><Record maxLength="20" /></Response>
ACML is similar to HTML. Only one ACML document is rendered to the caller at once, but many documents can be linked together to build complex interactive voice applications.
Calls from a Call API number to an outside number are controlled using ACML in the same manner as incoming calls. The initial URL for the call is provided as a parameter to the Call API request you make to initiate the call.
The way the Call API passes data to your application depends on the request method for the given URI. If the request method is GET then the data is passed in the query string (the part after the question mark). If the request method is POST then the data is sent as multi-part form data just like when a browser submits a form.
When the Call API makes a request to your application it will include the following data as request parameters.
The unique identifier for the call.
Your account id.
The phone number of the originator of the call.
The phone number of the call recipient.
The status of the call. Possible values are queued, ringing, in-progress, completed, busy, failed, and no-answer.
The version of the Call API used to handle this call.
The direction of the call. The possible values are inbound and outbound-dial.
The caller ID for the caller in the case of an inbound call.
In the response to the request from the Call API, you should provide ACML that will instruct our service on how to handle the current call.
MIME Types. Call API supports the MIME types described in the table below.
Call API interprets the returned document as an XML instruction set.
Using combinations of the verbs below allow you to create all kinds of interactive voice and messaging applications.
Say Say some words with text to speech
Play Play a wav or mp3 file to the caller
Gather Gather digits or words and send them back to your server
Record Record the current call
Message Send a text message
Hangup Hangup on the call
Pause Pause the call for a moment (maybe to wait for digits)
Reject Reject this call
Redirect Redirect this call to another URL
Email Send an email with data
References to ACML, RCML or CML are all the same.