tencent cloud

Tencent Real-Time Communication

Release Notes and Announcements
Release Notes
Recent Product Announcement
TRTC Live (TUILiveKit) Product Launch Announcement
TRTC Conference Official Editions Launched
The commercial version of Conference is coming soon
Terms and Conditions Applicable to $9.9 Starter Package
Rules for the "First Subscription $100 Discount" Promotion
Announcement on the Start of Beta Testing for Multi-person Audio and Video Conference
TRTC Call Official Editions Launched
License Required for Video Playback in New Version of LiteAV SDK
TRTC to Offer Monthly Packages
Product Introduction
Overview
Concepts
Features
Strengths
Use Cases
Performance Statistics
Tencent RTC Quickplay: Experience Ultimate Real-Time Audio and Video Interaction!
Purchase Guide
Billing Overview
Free Minutes
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
FAQs
Refund Instructions
User Tutorial
Free Demo
Call
Overview
Activate the Service
Run Demo
Integration
Offline Call Push
Conversational Chat
On-Cloud Recording
AI Noise Reduction
UI Customization
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
Release Notes
FAQs
Conference
Overview(TUIRoomKit)
Activate the Service (TUIRoomKit)
Run Demo(TUIRoomKit)
Integration(TUIRoomKit)
Screen Sharing (TUIRoomKit)
Schedule a meeting (TUIRoomKit)
In-meeting Call (TUIRoomKit)
UI Customization(TUIRoomKit)
Virtual Background (TUIRoomKit)
Conference Control (TUIRoomKit)
Cloud Recording (TUIRoomKit)
AI Noise Reduction (TUIRoomKit)
In-Conference Chat (TUIRoomKit)
Robot Streaming (TUIRoomKit)
Enhanced Features (TUIRoomKit)
Client APIs (TUIRoomKit)
Server APIs (TUIRoomKit)
FAQs (TUIRoomKit)
Error Code (TUIRoomKit)
SDK Update Log (TUIRoomKit)
Live
Billing of Video Live Component
Overview
Activating the Service (TUILiveKit)
Run Demo
No UI Integration
UI Customization
Live Broadcast Monitoring
Video Live Streaming
Voice Chat Room
Advanced Features
Client APIs
Server APIs
Error Codes
Release Notes
FAQs
RTC Engine
Activate Service
SDK Download
API Examples
Usage Guidelines
API Reference Manual
Advanced Features
AI Integration
Overview
Configure MCP Server
Install Skills
Integration Guide
FAQ
RTC RESTFUL API
History
Introduction
API Category
Room Management APIs
Stream mixing and relay APIs
On-cloud recording APIs
Data Monitoring APIs
Pull stream Relay Related interface
Web Record APIs
AI Service APIs
Cloud Slicing APIs
Cloud Moderation APIs
Making API Requests
Call Quality Monitoring APIs
Usage Statistics APIs
Data Types
Appendix
Error Codes
Console Guide
Application Management
Package Management
Usage Statistics
Monitoring Dashboard
Development Assistance
Solution
Real-Time Chorus
FAQs
Migration Guide
Billing
Features
UserSig
Firewall Restrictions
How to Downsize Installation Package
Android and iOS
Web
Flutter
Electron
TRTCCalling for Web
Audio and Video Quality
Others
Legacy Documentation
RTC RoomEngine SDK(Old)
Integrating TUIRoom (Web)
Integrating TUIRoom (Android)
Integrating TUIRoom (iOS)
Integrating TUIRoom (Flutter)
Integrating TUIRoom (Electron)
TUIRoom APIs
On-Cloud Recording and Playback (Old)
RTC Analytics Monthly Packages (Previous Version)
Protocols and Policies
Compliance
Security White Paper
Notes on Information Security
Service Level Agreement
Apple Privacy Policy: PrivacyInfo.xcprivacy
TRTC Policy
Privacy Policy
Data Processing And Security Agreement
Glossary

Callback after Call Ends

PDF
Focus Mode
Font Size
Last updated: 2025-12-05 10:25:26

Feature Description

The App backend can monitor in real-time the dynamics of call ending through this callback. Five seconds after call termination, call details can be queried through the call record inquiry API.

Must-Knows

To enable the callback, you must configure the callback URL through the REST API and turn on the switch corresponding to this callback protocol. For the configuration method, see Set Callback Configuration.
The direction of the callback is that the Call backend initiates an HTTP POST request to the App backend.
After receiving a callback request, the App backend needs to verify whether the value of the SDKAppID parameter in the request URL is its own SDKAppID.

Callback Triggering Scenarios

Call termination.

Callback Triggering Timing

When the number of call participants is less than or equal to 1, trigger call termination and reclaim.

API Description

Sample Request URL

In the following example, the callback URL configured for the App is https://www.example.com.
Example:
https://www.example.com?SdkAppid=$SDKAppID&CallbackCommand=$CallbackCommand&contenttype=json&ClientIP=$ClientIP&OptPlatform=$OptPlatform

Request Parameters

Parameter
Description
https
The request protocol is HTTPS, and the request method is POST
www.example.com
Callback URL
SdkAppid
Assigned SDKAppID in the Chat console when creating an application
CallbackCommand
Fixed as Call.CallbackAfterEndCall
contenttype
The value is fixed as json
ClientIP
Client IP address, in the format of 127.0.0.1
OptPlatform
Client platform. For the parameter values, see the description of the OptPlatform parameter in Third-Party Callback Introduction: Callback Protocol

Sample Request Packet

{
"CallbackCommand":"Call.CallbackAfterEndCall",
"CallRecord": {
"CallId": "055662e1-bc8a-469c-a334-1126c8c17d58",
"Caller_Account": "10001",
"MediaType": "Audio",
"CallType": "SingleCall",
"StartTime": 1741231146,
"EndTime": 1741231296,
"AcceptTime": 0,
"CallResult": "NotAnswer",
"CalleeList_Account": ["10001", "user2"],
"RoomId": "roomid-1434",
"RoomIdType": 2
}
"EventTime":1703589922780
}

Request Packet Fields

Field
Type
Description
CallbackCommand
String
Callback command
CallRecord
Struct
Call record information
CallId
String
Call ID
Caller_Account
String
Caller ID
MediaType
String
Media type:
Video video call
Audio audio call
CallType
String
Call type:
SingleCall one-to-one call
MultiCall group call
StartTime
Integer
Call initiation timestamp (in seconds)
EndTime
Integer
Call end timestamp (in seconds)
AcceptTime
Integer
Call connection timestamp (in seconds)
CallResult
String
Call result
Cancel: Caller cancels the call before connecting.
Reject: recipient decline the call
NotAnswer: recipient timeout before answering
NormalEnd: Call connected and ended normally
CallBusy: call busy
Interrupt: Call interrupted due to reasons such as network issues
Offline: The server detects heartbeat expiry, causing the call to end.
CalleeList_Account
Array
Call Member List
RoomId
String
TRTC Room ID
RoomIdType
Integer
RoomId type:
1 Digit room number
2 String room number
EventTime
Integer
Event-triggered timestamp in milliseconds

Sample Response Packet

The response packet is returned after the App backend synchronizes the data.
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0 // Ignore the callback result.
}

Response Packet Fields

Field
Type
Required
Description
ActionStatus
String
Required
Request processing result. OK: successful processing; FAIL: processing failed
ErrorInfo
String
Required
Error message
ErrorCode
Integer
Required
Error code. Enter 0 here to ignore the callback result

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback