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. Call API will read 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 you 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 or the part after the question mark. If the request method is POST then the data is sent a multi-part form data just like when a browser submits a form.
Any time the Call API makes a request to your application it will include the following data as request parameters.
The unique identifier for this 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. The 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 inbound calls.
In your response to the request from the Call API you want to 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.
You can use different combinations of the verbs below 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.