Starter Deal! First 3 month from only  $9.9 /month!
Starter Deal! First 3 month from only  $9.9 /month!
Grab It Now 
Call
  • Overview
  • Web
    • Run Sample Demo
    • Integration
      • Web&H5 (React)
      • Web&H5 (Vue3)
    • AI Noise Suppression
    • Virtual Background
    • UI Customization
    • On-Cloud Recording
    • More Features
      • Configuring Nicknames and Avatars
      • Configure Resolution and Fill Mode
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • API Documentation
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallEvent
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • Release Notes
  • Android
    • Run Sample Demo
    • Integration
    • AI Noise Suppression
    • Virtual Background
    • UI Customization
    • Offline Call Push
    • On-Cloud Recording
    • More Features
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • API Documentation
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • Type Definition
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • Release Notes
  • iOS
    • Run Sample Demo
    • Integration
    • AI Noise Suppression
    • Virtual Background
    • UI Customization
    • Offline Call Push
      • VoIP
      • APNs
    • On-Cloud Recording
    • More Features
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • API Documentation
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • Type Definition
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • Release Notes
  • Flutter
    • Run Sample Demo
    • Integration
    • AI Noise Suppression
    • Virtual Background
    • UI Customization
    • offline Call Push
      • Notification
      • VoIP (Optional)
    • On-Cloud Recording
    • More Features
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Beauty Effects
      • Custom Ringtone
      • Monitoring Call Status
    • API Documentation
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • Type Definition
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • Upgrading
    • Release Notes
  • Overview
    • Overview
  • Activate the Service
  • Pricing
    • Call Monthly Packages
    • Pay-As-You-Go
    • Free Minutes
  • ErrorCode
  • FAQs
    • All Platform
      • FAQs
      • UserSig
    • Web
    • Flutter
    • iOS
    • Android
Call

Type Definition

Common structures

TUIResult

The return value of calling the API
Value
Type
Description
code
String
If the code is empty "", it means the call succeeded, if the code is not empty "", it means the call failed.
message
String?
Error message

TUIRoomId

Room ID for audio and video in a call. Note:
(1) intRoomId and strRoomId are mutually exclusive. If you choose to use strRoomIdintRoomId needs to be filled in as 0. If both are filled in, the SDK will prioritize intRoomId.
(2) Do not mix intRoomId and strRoomId because they are not interchangeable. For example, the number 123 and the string "123" represent two completely different rooms.
Value
Type
Description
intRoomId
int
Numeric room ID.
strRoomId
String
String room number.

VideoRenderParams

Video render parameters
Value
Type
Description
fillMode
FillMode
Video image fill mode
rotation
Rotation
Video image rotation direction

VideoEncoderParams

Video encoding parameters
Value
Type
Description
resolution
Video resolution
resolutionMode
Video aspect ratio mode

TUICallParams

Call params
Value
Type
Description
roomId
TUIRoomId
Room Id.
offlinePushInfo
Offline push vendor configuration information.
timeout
String
Call timeout period, default: 30s, unit: seconds.
userData
String
An additional parameter.

TUIOfflinePushInfo

Offline push vendor configuration information,please refer to:Offline call push
Value
Type
Description
title
String
offlinepush notification title
desc
String
offlinepush notification description
ignoreIOSBadge
bool
Ignore badge count for offline push (only for iOS), if set to true, the message will not increase the unread count of the app icon on the iOS receiver's side.
iOSSound
String
Offline push sound setting (only for iOS). When sound = IOS_OFFLINE_PUSH_NO_SOUND , there will be no sound played when the message is received. When sound = IOS_OFFLINE_PUSH_DEFAULT_SOUND , the system sound will be played when the message is received. If you want to customize the iOSSound, you need to link the audio file into the Xcode project first, and then set the audio file name (with extension) to the iOSSound.
androidSound
String
Offline push sound setting (only for Android, supported by IMSDK 6.1 and above). Only Huawei and Google phones support setting sound prompts. For Xiaomi phones, please refer to: Xiaomi custom ringtones . In addition, for Google phones, in order to set sound prompts for FCM push on Android 8.0 and above systems, you must call setAndroidFCMChannelID to set the channelID for it to take effect.
androidOPPOChannelID
String
Set the channel ID for OPPO phones with Android 8.0 and above systems.
androidVIVOClassification
int
Classification of VIVO push messages (deprecated interface, VIVO push service will optimize message classification rules on April 3, 2023. It is recommended to use setAndroidVIVOCategory to set the message category). 0: Operational messages, 1: System messages. The default value is 1.
androidXiaoMiChannelID
String
Set the channel ID for Xiaomi phones with Android 8.0 and above systems.
androidFCMChannelID
String
Set the channel ID for google phones with Android 8.0 and above systems.
androidHuaWeiCategory
String
Classification of Huawei push messages, please refer to: Huawei message classification standard.
isDisablePush
bool
Whether to turn off push notifications (default is on).
iOSPushType
iOS offline push type,default is APNs

TUICallRecords

Call recording information
Value
Type
Description
callId
String
Call recording ID.
inviter
String
Inviter ID.
inviteList
List<String>
List of invited user IDs.
scene
Call scenario.
mediaType
Media type.
groupId
String
Group ID.
role
Role.
result
Call result type.
beginTime
int
Start time.
totalTime
int
Total time.

TUICallRecentCallsFilter

Call recording filtering conditions.
Value
Type
Description
begin
double
Start time.
end
double
End time.
resultType
Call result type.

enum definition

TUICallMediaType

Call media type
Type
Value
Description
none
0
Unknown
audio
1
Audio call
video
2
Video call

TUICallRole

Call role
Type
Value
Description
none
0
Unknown
caller
1
Caller(inviter)
called
2
Callee(invitee)

TUICallStatus

Call status
Type
Value
Description
none
0
Unknown
waiting
1
The call is currently waiting
accept
2
The call has been accepted

TUICallScene

Call scene
Type
Value
Description
groupCall
0
Group call
multiCall
1
Anonymous group calling (not supported at this moment, please stay tuned).
singleCall
2
one to one call

TUINetworkQuality

Network quality
Type
Value
Description
unknown
0
Unknown
excellent
1
Excellent
good
2
Good
poor
3
Poor
bad
4
Bad
vBad
5
Vbad
down
6
Down

FillMode

If the aspect ratio of the video display area is not equal to that of the video image, you need to specify the fill mode:
Type
Value
Description
fill
0
Fill mode: the video image will be centered and scaled to fill the entire display area, where parts that exceed the area will be cropped. The displayed image may be incomplete in this mode.
fit
1
Fit mode: the video image will be scaled based on its long side to fit the display area, where the short side will be filled with black bars. The displayed image is complete in this mode, but there may be black bars.

Rotation

We provides rotation angle setting APIs for local and remote images. The following rotation angles are all clockwise.
Type
Value
Description
rotation_0
0
No rotation
rotation_90
1
Clockwise rotation by 90 degrees
rotation_180
2
Clockwise rotation by 180 degrees
rotation_270
3
Clockwise rotation by 270 degrees

ResolutionMode

Video aspect ratio mode
Type
Value
Description
landscape
0
Landscape resolution, such as Resolution.Resolution_640_360 + ResolutionMode.Landscape = 640 × 360.
portrait
1
Portrait resolution, such as Resolution.Resolution_640_360 + ResolutionMode.Portrait = 360 × 640.

Resolution

Video resolution
Type
Value
Description
resolution_640_360
0
Aspect ratio: 16:9;resolution: 640x360;recommended bitrate: 500kbps
resolution_640_480
1
Aspect ratio: 4:3;resolution: 640x480;recommended bitrate: 600kbps
resolution_960_540
2
Aspect ratio: 16:9;resolution: 960x540;recommended bitrate: 850kbps
resolution_960_720
3
Aspect ratio: 4:3;resolution: 960x720;recommended bitrate: 1000kbps
resolution_1280_720
4
Aspect ratio: 16:9;resolution: 1280x720;recommended bitrate: 1200kbps
resolution_1920_1080
5
Aspect ratio: 16:9;resolution: 1920x1080;recommended bitrate: 2000kbps

TUICallIOSOfflinePushType

iOS offline push type
Type
Value
Description
APNs
0
APNs
VoIP
1
VoIP

TUICamera

Camera type.
Type
Value
Description
front
0
Front camera.
back
1
Rear camera.

TUIAudioPlaybackDevice

Audio playback device.
Type
Value
Description
speakerphone
0
Speaker
earpiece
1
Earpiece

TUICallResultType

Call recording type.
Type
Value
Description
unknown
0
Unknown
missed
1
Missed
incoming
2
Incoming call
outgoing
3
Outgoing Call