Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Cognitive Engagement Center/ API Reference/ Voice Notification Interface Reference/ Creating a Voice Notification (V1.0.0) (createVoiceNotification)

Creating a Voice Notification (V1.0.0) (createVoiceNotification)

Updated on 2023-09-27 GMT+08:00

Scenario

When the voice notification function is used, this API is invoked to request the voice call platform to play a voice notification to a specified user.

Method

POST

URI

https://Domain name/apiaccess/rest/voiceNotification/v1/createVoiceNotification (For example, the domain name is service.besclouds.com.)

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

X-APP-Key

String

Yes

App key field, which is the user ID. Contact the operation personnel to obtain the app key.

2

Authorization

String

Yes

Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.)

For details about the generation mode, see C1 System Configuration Interface Authentication.

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

reqBody

Object

Yes

-

1.1

voiceContent

String

Yes

The value contains a maximum of 1000 characters.

  • Voice IDs can be transferred. The voice IDs are separated by tildes (~), and can be queried using the /rest/voiceNotification/v1/queryVoiceNotificationRecording interface. If you upload a voice file on the AICC, the voice ID is the value of Voice Id on the IVR Voice page.
  • Texts can be transferred. The format is ${Text}$. The texts are separated by tildes (~), for example, $Tom$~$Jack$.
  • Voice IDs and texts can be transferred together. The format is {Voice ID}~${Text}$~{Voice ID}, for example, 1133*********999~$Tom$~2225*********149.

1.2

callerPresent

String

No

Calling number displayed on the user side. If this parameter is not carried, the access code of the tenant space is used by default. If this parameter is carried, the access code must be carried. If a non-access code number needs to be transferred, contact O&M personnel to enable the calling number anonymization feature. After this feature is enabled, the number verification rule is as follows: access code or a number of 11 to 14 digits.

1.3

called

String

Yes

Called number.

1.4

callBackUrl

String

No

URL for a customer to receive status reports.

Use Base64 to encrypt this parameter using the UTF-8 standard character set.

The AICC pushes the call status information during business triggering to the server, and the client server determines the user status based on the call status information.

The URL can be set to https://IP address:Port number or a domain name. The domain name is recommended. HTTP and HTTPS are supported. The domain name can correspond to multiple servers to ensure that notifications can be received when a single point of failure occurs.

HTTP involves security risks and is not recommended.

The URL can contain only letters, digits , and the following special characters: -:./_#?&

The IP address and port number, or domain name of the URL must have been added to the mobile agent callback URL trustlist by the system administrator.

1.5

priority

String

No

Playback priority of a voice notification.

The value is an integer ranging from 1 to 9. The default value is 9.

A smaller value indicates a higher priority.

NOTE:

If TTS is involved, sign in to the AICC as a system administrator, choose Configuration Center > Flow Configuration > Intelligent IVR > System Management > TTS/ASR Management, and specify the TTS vendor. The configuration takes effect one minute later.

Response Description

  • Status code: 200
    Table 3 Response body parameters

    No.

    Parameter

    Type

    Mandatory or Not

    Description

    1

    schema

    Object

    Yes

    -

    1.1

    retCode

    String

    Yes

    Returned code (0 indicates success).

    1: A task is in progress. Try again later.

    2: The value length of callData exceeds 1024 characters.

    3: Creation failed. No call SN is generated.

    4: The format of softphone does not match the rule.

    5: The value of caller or called is not transferred, or the format does not match the rule.

    6: The VDN is not enabled.

    7: callerPresent or agentPresent fails to pass the verification.

    8: The value of voiceContent is empty, exceeds the upper limit, or does not exist.

    9: The value of callBackUrl does not meet the requirements.

    16: The tenant is in trial commercial use state, and the called number is not in the trustlist.

    36: The value of priority is in an incorrect format.

    1.2

    retMsg

    String

    No

    Return result description.

    1.3

    result

    Object

    No

    This parameter is mandatory when retCode is set to 0.

    1.3.1

    callSerialNo

    String

    Yes

    Call SN.

  • Status code: 400

    Incorrect request. Check the request path and parameters.

  • Status code: 401

    Unauthorized operation.

    1. Check whether you have purchased related services.

    2. Contact customer service to check the status of your account.

  • Status code: 403

    Authentication fails.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Error Codes

None

Example

Request header:

{
"Content-Type": application/json
"x-app-key": *****
"Authorization": Bearer ****
}

Request parameters:

{
    "voiceContent": "1133*********999~$Tom$~2225*********149",
    "callerPresent": null,
    "called": "88880000"
}

Response parameters:

{
    "result": {
        "callSerialNo": "11827********7090"
    },
    "retCode": "0",
    "retMsg": "Created successfully."
}

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback