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

Querying Call Status (queryCallState)

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

Scenario

This interface is invoked to query the call status.

Method

POST

URI

https://Domain name/apiaccess/CC-Management/v1/mobileAgent/queryCallState (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

No

App key, which is the user ID.

2

Authorization

String

Yes

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

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

callSerialNo

String

Yes

Call SN.

Length limit: string (50)

Response Description

  • Status code: 200
Table 3 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

retCode

String

Yes

Return code. The value 0 indicates success, and other values indicate failure.

1: Failed to query the status.

3: The format of the call SN is incorrect.

1.2

retMsg

String

Yes

Failure cause.

1.3

result

Object

No

Result content.

1.3.1

state

Number

No

Call status.

0: to be called

1: calling

2: talking

3: ended

Length limit: number (1)

1.3.2

reasonCode

Number

No

Code of the reason for ending a call.

The value ranges from 0 to 65535.

0: The call ends and the called party hangs up.

1: The call ends and the calling party hangs up.

2: The outbound call fails to be made to the calling party.

3: The called party fails to be called.

4: The calling party does not answer the call.

5: The called party does not answer the call.

6: Failed to initiate the call.

xxx: Other exceptions occur.

Length limit: number (5)

For details about reason codes for ITA bidirectional calls, see Table 4.

1.3.3

callData

String

No

Call data customized by a third party.

Length limit: string (1024)

1.3.4

caller

String

No

Calling number.

Length limit: string (32)

1.3.5

called

String

No

Called number.

Length limit: string (32)

1.3.6

startTime

String

No

Start time of an outbound call. The value is a timestamp, for example, 1572794607000.

1.3.7

endTime

String

No

Call end time, which is a timestamp, for example, 1572794607000.

1.3.8

callerPresent

String

No

CLIP number.

Length limit: string (32)

1.3.9

agentPresent

String

No

CLIP number displayed to the customer manager.

Table 4 Reason codes for ITA bidirectional calls

retCode

Description

0

N/A

1

The number cannot be found.

2

Failed to route to the network.

3

Failed to route to the destination.

4

Special messages are sent.

5

Incorrect trunk prefix.

6

The channel cannot be accessed.

7

A channel has been created.

8

Preemption.

9

Preemption reservation.

16

Normal call clearance.

17

The user is busy.

18

No answer.

19

No user answers the call.

20

The user is unreachable.

21

Call rejected.

22

The number has been changed.

23

Redirection.

25

The switching route is incorrect.

26

No user permission.

27

The target is disordered.

28

Invalid number format.

29

Rejected by the device.

30

Status query.

31

Normal.

34

Unreachable route.

38

Poor network quality.

39

Service out of connection.

40

Connecting.

41

Temporarily failed.

42

The device is congested.

43

Discarded information.

44

The channel cannot be accessed.

46

Call blocked.

47

No available resource.

49

Invalid quality.

50

The device is not reserved.

53

Outbound calls barred within the CUG.

55

Inbound calls barred within the CUG.

57

No permission for transmission.

58

Invalid transmission.

62

The levels are inconsistent.

63

Invalid service.

65

Transmission cannot be performed.

66

The channel cannot be implemented.

69

Invalid device.

70

Valid transmission.

79

The CV service is not configured.

81

An invalid value is referenced.

82

The channel does not exist.

83

The ID does not exist.

84

The call ID does not exist.

85

No call is suspended.

86

Anonymous call.

87

The CUG has no member.

88

Incompatible destination.

90

The CUG does not exist.

91

Invalid network.

95

Invalid information.

96

Not hosting element.

97

Type not found.

98

The information is not implemented.

99

The information element does not exist.

100

Invalid information element.

101

Inconsistent call status.

102

The timer times out.

103

The parameter does not exist.

110

The message contains unidentified parameters.

111

Protocol error.

127

Unspecified interaction.

  • 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: 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

  • Scenario: Query call status.

    Request header:

    x-app-key:9******************************3  
    Authorization:Bearer e******************************e  
    Content-Type:application/json

    Request parameters:

    {
    	"callSerialNo": "645735364434067472"
    }

    Response header:

    {
    	"connection": "keep-alive",
    	"content-type": "application/json;charset=UTF-8"
    }

    Response parameters:

    {
    	"retMsg": "Query call state successfully",
    	"retCode": "0",
    	"result": {
    		"caller": "88889050",
    		"called": "88889060",
    		"callerPresent": "640003",
    		"startTime": 1621823865000,
    		"state": 3,
    		"reasonCode": 0,
    		"agentPresent": "640060",
    		"endTime": 1621823872000
    	}
    }

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