Voice Service lets you configure global callback settings in the console. When a customer calls back a number, you can play a specified audio file or set up a dynamic Interactive Voice Response (IVR). This document describes how to configure dynamic IVR.
Prerequisites
Before you configure dynamic IVR call transfers, you must enable SIP tagging for voice calls. For more information, contact your account manager.
Background information
When you set the inbound service for a number to dynamic IVR, Voice Service uses a callback to a URL that you provide. This callback uses the caller's number, the called number, and any keys pressed to retrieve a transfer number and an outbound display number. You can configure this at two levels: for a specific number or as a global default. The system first tries to use the URL for the specific number. If no URL is specified for the number, the system uses the default setting.
Callback triggers:
If the key-press query for transfer is disabled, the callback is triggered immediately when an inbound call is received.
If the key-press query for transfer is enabled, the callback is triggered after the IVR prompt plays and the user finishes pressing keys.
Scenarios
The call transfer callback API can be used in the following scenarios:
Multiple agents or service staff use the same number for outbound voice calls. When a user who received a call calls that number back, the inbound call can be transferred to a specific agent's number. This allows for precise customer service.
A shopping platform with multiple small merchants can provide a single, unified inbound service number and extension numbers for each merchant. When a user calls the service number, they are prompted to press keys to transfer the call to a specific merchant's extension. This allows the platform to offer a unified service number and quickly provide customer service hotlines for many small and medium-sized businesses. This feature is also useful for corporate switchboards to handle simple extension transfers.
The Alibaba Cloud Communications platform uses the caller's number, the called number, and key-press information to query a URL. It then retrieves the number to transfer the call to and connects the call to the specified agent or service staff.
Limits
This feature is available for numbers requested after November 26, 2018.
This feature is available for numbers that have a default inbound call configuration and for any new numbers that you request.
This feature does not affect numbers whose inbound call configurations have been modified individually.
Configuration changes take about 5 to 10 seconds to take effect.
Set the inbound call type to dynamic IVR
You can enable the dynamic IVR call transfer feature by setting the inbound call type to dynamic IVR and specifying a URL.
Log on to the Voice Service console.
In the left navigation pane, choose General Settings.
On the Configure Call Settings tab, click Modify Global Settings or click Add Incoming Configuration for Specified Number.
Set Configuration Type to Dynamic IVR.
You can enter the URL.
This URL is a user-defined HTTP address for retrieving the transfer number. When a callback event is triggered, Voice Service collects call information and automatically adds this information as fixed request parameters to the URL before sending a request.
Use the following format:
http://IP_address:port/test?action=getTransferNumberExample with added parameters:
http://10.10.10.1:7001/test?action=getTransferNumber&caller=1700000****&serviceNumber=05108348****×tamp=1691402001&uuid=7e34bb6c-ec99-11e8-b18b-af10dc1a7640&dtmf=123NoteThe IP address must be a public IP address.
To set the inbound configuration for a specific number, select the Company Name and Called Number.
Select the audio prompts for Playback Upon Failure to Access URL, Playback When the Queried Extension Does Not Exist, and Call Forwarding Audio.
Click to enable the Forbidden Call Forwarding Period. You can then select a Forbidden call forwarding period and the audio for Playback Upon Prohibited Call Forwarding.
To enable querying for transfers by key press, turn on Call Forwarding for Touchtone Query and configure the parameters.
Configuration
Description
Initial inbound call playback
The audio that plays after the called number is connected.
No key press timeout playback
The audio that plays when the waiting time for a key press expires.
No key press timeout duration
The duration to wait for the user to press a key.
Hang up after timeout count
The maximum number of timeouts.
Replay key configuration
The key to press to replay the audio file.
Input end key configuration
The key to press to end the input.
Click Confirm Modification.
API specifications
Specification | Description |
Protocol | HTTP |
Request method | POST |
Call timeout | 3 seconds |
Character encoding | UTF-8 |
Request example
http://10.10.10.1:7001/test?action=getTransferNumber&caller=1700000****&serviceNumber=05108348****×tamp=1691402001&uuid=7e34bb6c-ec99-11e8-b18b-af10dc1a7640&dtmf=123Request parameters
During a call, Voice Service automatically adds the following fixed parameters to the URL request.
No. | Parameter name | Type | Required | Description |
1 | caller | String | Yes | The inbound caller's number. |
2 | serviceNumber | String | Yes | The inbound called number. |
3 | timestamp | String | Yes | Current timestamp |
4 | uuid | String | Yes | The unique call ID. |
5 | dtmf | Integer | No | The information about the keys pressed by the user. |
Response examples
The following examples show responses in JSON format:
Successful call:
{ "result":"success", "msg":"Success", "data":{"called":"1390000****", "showNumber":"057100005848"} }Failed call:
{"result":"fail","msg":"fail reason","data":{}}
Response parameters
Parameter | Type | Required | Description | Example |
result | String | Yes | The call result.
| fail |
msg | String | Yes | A description of the call result:
| No valid transfer number was found |
data | JSON | Yes | The returned data in JSON format. Note If the call fails, data is empty. | {"called":"1390000****","showNumber":"057100005848"} |
called | String | Yes | The number to which the call will be transferred. | 1390000**** |
showNumber | String | No | The number to display for the transferred call. If this is empty, the inbound service number is used for the outbound call by default. | 0571****5848 |