SingleCallByVoice

Updated at:

Sends a voice notification to a phone number by using a voice notification file.

Operation description

Note

Due to business adjustments, the updates of the voice notification and voice verification code services have been stopped in regions outside the Chinese mainland and the services have been discontinued since March 2022. Only qualified customers can continue using the voice notification and voice verification code services.

You can call the SingleCallByTts operation to send voice notifications with variables.

QPS limits

You can call this operation up to 1,200 times per second per account.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dyvms:SingleCallByVoice

none

*All Resource

*

None

None

Request parameters

Parameter

Type

Required

Description

Example

CalledShowNumber

string

No

The number displayed to the called party.

  • You do not need to specify this parameter if you use a voice notification file that uses the common outbound call mode. For more information, see FAQ about the common outbound call mode.

  • If you use a voice notification file that uses the dedicated outbound call mode, you must specify a number that you purchased. You can specify only one number. You can log on to the Voice Messaging Service console and choose Real Number Service > Real Number Management to view the number that you purchased.

0571****5678

CalledNumber

string

Yes

The number for receiving voice notifications.

Number format:

  • In the Chinese mainland:

    • Mobile phone number, for example, 159****0000.

    • Landline number, for example, 0571****5678.

  • Outside the Chinese mainland: country code + phone number, for example, 85200****00.

Note

159****0000

VoiceCode

string

Yes

The voice ID of the voice notification file.

You can log on to the Voice Messaging Service console, choose Voice Messages > Voice Notifications or Voice File Management, and then click the Voice Notification Files tab to view the voice ID.

2d4c-4e78-8d2a-afbb06cf****.wav

PlayTimes

integer

No

The number of times the voice notification file is played. Valid values: 1 to 3.

3

Volume

integer

No

The playback volume of the voice notification file. Valid values: 0 to 100. Default value: 100.

100

Speed

integer

No

The playback speed of the voice notification file. Valid values: -500 to 500.

100

OutId

string

No

The ID reserved for the caller. This ID is returned to the caller in a receipt message.

The value must be of the STRING type and 1 to 15 bytes in length.

22596****

Response elements

Element

Type

Description

Example

object

The response parameters.

Code

string

The response code.

  • The value OK indicates that the request was successful.****

  • For more information about other response codes, see API error codes.

OK

Message

string

The returned message.

OK

RequestId

string

The request ID.

E50FFA85-0B79-4421-A7BD-00B0A271966F

CallId

string

The unique receipt ID for the call.

You can call the QueryCallDetailByCallId operation to query the details of the call.

116004767703^102806****

Examples

Success response

JSON format

{
  "Code": "OK",
  "Message": "OK",
  "RequestId": "E50FFA85-0B79-4421-A7BD-00B0A271966F",
  "CallId": "116004767703^102806****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.