Reference Turnkey Applications Tutorials Visual Designer
    • REST API
      • Overview
      • API Endpoint
      • Authentication
      • Requests
      • Responses
      • Paging
      • Reason Codes Dictionary
    • Management APIs
      • Accounts
      • Identity Access Management Early Access
        • 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
        • Delete a phone number
        • List of Phone Numbers
        • Incoming Phone Number Regex Support
      • Notifications
      • Usage 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
    • SMS
      • Messages
        • Send SMS
        • Get SMS List
        • Get single SMS Information
        • SMS Attributes
      • Email
    • RCML
      • Overview
        • Interacting with Your Application
        • RCML Verbs
      • Dial
        • Client
        • Conference
        • Number
        • SIP
      • Email
      • Gather
      • Say
      • Play
      • SMS
      • 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
  • Enterprise:Refer

Refer

Refer

During a programmable SIP call, the RCML <Refer> verb instructs Restcomm to initiate a SIP Refer (i.e transfers) towards a SIP infrastructure and handles any NOTIFY messages.

The <Refer> feature can also be invoked via REST API.

Refer Attributes

Name Allowed Values Default Value

action

relative or absolute URL

none

method

GET, POST

POST

Action Attribute

The 'action' attribute takes a URL as an argument. When the refer call ends, Restcomm will make a GET or POST request to this URL including the parameters below.

If you provide an 'action' URL, Restcomm will continue the current call after the refer finished, using the RCML received in your response to the 'action' URL request.

Any RCML verbs occuring after a <Refer> which specifies an 'action' attribute are unreachable.

If no 'action' is provided, <Refer> will finish and Restcomm will move on to the next RCML verb in the document.

If there is no next verb, Restcomm will end the phone call.

Method Attribute

The 'method' attribute takes the value 'GET' or 'POST'.

This tells Restcomm whether to request the URL via HTTP GET or POST.

Refer Action Request HTTP Parameters

The Restcomm parameters passed to your application in its asynchronous request to the Refer action URL. The list of basic parameters can be found in the RCML Voice Request documentation.

The <Refer> request also passes these additional parameters:

Parameter Description

ReferCallStatus

This provides the application with our understanding (based on SIP NOTIFY messages) of the status of the new call created in response to the REFER. If the REFER fails or the endpoint does not send any NOTIFY requests, this parameter will be omitted.

ReferSipResponseCode

The SIP response code received in response to the REFER request Restcomm sends to the SIP endpoint.

NotifySipResponseCode

This is the last SIP response code received on the referred leg, as determined by examining the SIP NOTIFY messages. E.g. If the SIP endpoint initiated a new call but received a SIP 404 response due to the target not being found, this parameter would be set to "404". If the REFER fails or the endpoint does not send any NOTIFY requests, this parameter will be omitted.

Nesting

You may nest the following nouns within <Refer>: SIP

As specified by SIP spec, the sip URL may contain header parameters. These headers will be used by Transferee to compose the INVITE message.

If reserved headers (Call-ID, Route…​) are attempted to be used, the Refer verb will fail with ReferSipResponseCode 400.

Examples

For examples of how to use the <Refer> verb see below.

Refer to a phone number.

<Response>
    <Refer>
        <Sip>sip:phone_number@domain.com</Sip>
    </Refer>
</Response>

Refer to a phone number with request follow actions.

<Response>
    <Refer action="/handleRefer" method="GET">
        <Sip>sip:phone_number@domain.com</Sip>
    </Refer>
</Response>

Refer two active calls during parallel Dial.

<Response>
    <Refer>
        <Sip>sip:phone_number@domain.com?</Sip>
    </Refer>
</Response>

Refer to with custom headers.

<Response>
    <Refer>
        <Sip>sip:phone_number@domain.com?myCustomHeader=value</Sip>
    </Refer>
</Response>

Refer Call Flows

The following flow diagrams illustrate the possible call flow scenarios for the RCML <Refer> verb.

Successful Unattended Transfer

The diagram below outlines dialing to a Restcomm IVR. After the subscriber press a digit, call transferred to the destination subscriber.

Successful Unattended Transfer Call Flow

Successful Attended Transfer

The diagram below outlines dialing to a Restcomm IVR. The RCML application will instruct a Dial with call screening feature to query the target destination whether to accept transfer or not.

Via LCM request, the refer/transfer operation will be invoked in the inbound leg.

Successful Attended Transfer Call Flow
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.