Reference Turnkey Applications Tutorials Visual Designer
Reference Turnkey Applications Tutorials Visual Designer
    • REST API
      • Overview
      • API Endpoint
      • Authentication
      • Requests
      • Responses
      • Paging
      • Reason Codes Dictionary
    • Management APIs
      • Accounts
      • Identity Access Management BETA
        • Identity Access Management Overview
        • Identity Access Management API
          • User Management
            • Create a User
            • Update a User
            • Retrieve a User
            • Delete a User
          • API Keys Management
            • Create an API Key
            • Update an API Key
            • Retrieve an API Key
            • Delete an API Key
      • Applications
      • Clients
        • Create a Client
        • Delete a Client
        • Change Client’s Password
        • Get a List of Available Clients
      • Incoming Phone Numbers
        • IncomingPhoneNumber Instance Resource
        • IncomingPhoneNumbers List Resource
        • Local IncomingPhoneNumber Factory Resource
        • Toll-Free IncomingPhoneNumber Factory Resource
        • Mobile IncomingPhoneNumber Factory Resource
        • Attach a phone number to an application
        • Enable Incoming MMS for an Application
        • Delete a phone number
        • List of Phone Numbers
        • Incoming Phone Number Regex Support
      • Notifications
      • Usage Records
      • Trace Records
    • Voice
      • Calls
        • Call List Resource URI
        • Making a Call
        • Modifying Live Calls
        • Examples
        • List Filter
        • Paging Information
      • Conference Management
        • Supported Operations
        • Conference List Resource URI
      • Conference Participants Management
        • Participants List Resource URI
      • Gather DTMF
      • Gather Speech
      • Say
      • Play
      • Hold
      • Recordings
      • Refers
        • Resource Properties
        • Supported Operations
        • Paging Information
      • Resume
      • SIP Refer Support
    • Messages API - BETA
      • Overview
      • Channel Identities
      • Send Message
      • Status Callback Parameters
      • Status Callback Events
      • Receive Message
        • Incoming Message Request Parameters
      • Get Message List
      • Get Single Message
      • Message Attributes
      • Status Description
    • SMS
      • Messages
        • Send SMS
        • Get SMS List
        • Get single SMS Information
        • SMS Attributes
      • Error Codes
    • Email
    • RCML
      • Overview
        • Interacting with Your Application
        • RCML Verbs
      • Dial
        • Client
        • Conference
        • Number
        • SIP
      • Email
      • Gather
      • Say
      • Play
      • SMS
      • Message - Beta
      • Hold
      • Resume
      • Hangup
      • Pause
      • Redirect
      • Record
      • Reject
      • Refer
    • Visual Designer API
      • List Application Templates
      • :List a Specific Application Template
      • Create a Visual Designer Application
      • Get Application Details
      • Save Application Changes
      • Create Application Parameters
      • List Application Parameters
      • Delete Application Parameters
      • Upload Application Media Files
      • List Application Media Files
      • Play Application Media Files
      • Delete Application Media Files
      • Get Application Logs
      • Delete Application Logs
      • Get Application Settings
      • Modify Application Settings
      • Rename an Application
      • Delete an Application
      • Get Visual Designer Configuration
    • Turnkey Apps APIs
      • Smart 2FA
        • Sending One-Time Passwords
        • Verifying One-Time Passwords
        • Cancel One-Time Passwords
        • Session Detail Record (SDR)
        • Get list of One-Time Passwords
        • Get a Single One-Time Password
        • Usage Record One-Time Passwords
        • Common Response Error Code
        • Limit
          • Create Limit
          • Update Limit
          • Delete Limit
          • Get List of Limits
      • Call Queuing
      • Auto Attendant
        • Users
        • Announcement
        • Auto Attendant System
        • Menu
        • Schedule
        • Phone Number
        • Usage Records
        • Third Party Integration
      • Number Masking
        • Application
        • Mask Number Pool
        • Context
        • Participants
        • Interactions
        • Usage Records
      • Task Router
docs 1.0
  • docs
    • 1.0
  • docs
  • Enterprise:RCML

REST Communications Markup Language Overview

The REST Communications Markup Language represents a set of instructions you can use to tell CPaaS what to do when you receive an incoming call or SMS.

When someone makes a call or sends an SMS to one of your CPaaS numbers#, CPaaS will look up the URL associated with that phone number and make a request to that URL. CPaaS will read RCML 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.

For example, the following will say a short message#, and then record the caller’s voice:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say voice="woman">Please leave a message after the tone.</Say>
    <Record maxLength="20" />
</Response>

RCML is similar to HTML.Only one RCML document is rendered to the caller at once#, but many documents can be linked together to build complex interactive voice applications.

Calls from a CPaaS number to an outside number are controlled using RCML in the same manner as incoming calls.The initial URL for the call is provided as a parameter to the CPaaS REST API request you make to initiate the call.

How CPaaS Interacts with Your Application

CPaaS Request

The way CPaaS 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.

CPaaS Voice Request.Any time CPaaS makes a request to you applications it will include the following data as request parameters.

Request Parameters

Parameter Description

CallSid

The unique identifier for this call.You can use the CallSid to modify the call by POSTing to Calls/{CallSid} with a new RCML URL (LCM is not supported for P2P calls).

AccountSid

Your account id.

From

The phone number of the originator of the call.

To

The phone number of the call recipient.

CallStatus

The status of the call.The possible values are queued (for outbound calls only), initiated, ringing, in-progress, busy, completed, failed, or no-answer.

ApiVersion

The version of the CPaaS API used to handle this call.

Direction

The direction of the call. The possible values are inbound, outbound-api and outbound-dial.

CallerName

The caller ID for the caller in the case of inbound calls.

CPaaS Response

In your response to the request from CPaaS you want to provide RCML that will instruct CPaaS on how to handle the current call.

MIME Types. CPaaS supports the MIME types described in the table below.

Supported MIME Types

Parameter Description

text/xml, application/xml

CPaaS interprets the returned document as an XML instruction set.

When your application returns the RCML document the root element of the document must always be <Response> or the parser will complain.

+IMPORTANT: Your application should return properly XML escaped RCML document.

The RCML Verbs

You can use different combinations of the verbs below to create all kinds of interactive voice and messaging applications.

  • Dial

    • Client

    • Conference

    • Number

    • SIP

  • Email

  • Gather

  • Hangup

  • Pause

  • Play

  • Record

  • Redirect

  • Reject

Platform

Programmable Voice

Programmable SMS

Turnkey Applications

Smart 2FA

Call Queue

Auto Attendant

Number Masking

Task Router

Campaign Manager

Learn

Terms And Conditions

About

ABOUT

CONTACT US

© 2020, All rights reserved.