Call start message
In 1-to-1 calls, a caller and a callee can send a limited size of message to each other during the call setup process. This message is called a call start message.
Supported call type | Supported SDK version |
---|---|
1-to-1 call | All versions |
A call start message is functionally equivalent to "Call Init data" available in PlanetKit 5.0.x or lower. Only the name of the feature has been changed since PlanetKit 5.1.
Sending a call start message
A caller and a callee can send a call start message at a different point in time during the call setup process.
To learn more about the call setup flow, see 1-to-1 call flow.
Caller side
A caller can send a call start message when making a call.
To send a call start message on the caller side, create a PlanetKitCallStartMessage
, set the PlanetKitCallStartMessage
in a PlanetKitMakeCallParam
, and pass the PlanetKitMakeCallParam
when calling makeCall()
.
val callStartMessage = PlanetKitCallStartMessage.create("Call start message from a caller")
val param = PlanetKitMakeCallParam.Builder()
.myId(myUserId)
.myServiceId(myServiceId)
.peerId(peerUserId)
.peerServiceId(peerServiceId)
.callStartMessage(callStartMessage)
.build()
val result = PlanetKit.makeCall(param, makeCallListener)
The message is delivered to the callee in the onVerified
callback.
Callee side
A callee can send a call start message when accepting a call.
To send a call start message on the callee side, create a PlanetKitCallStartMessage
and pass the PlanetKitCallStartMessage
when calling acceptCall()
.
val callStartMessage = PlanetKitCallStartMessage.create("Call start message from a callee")
call = PlanetKit.getCall(instanceId)
call?.acceptCall(acceptCallListener, callStartMessage)
The message is delivered to the caller in the onConnected
callback.
Size limitation
The maximum size of a call start message is 200 bytes including the null termination character.
Comparison of a call start message and app server data
A call start message and app server data have the following differences:
Source and destination | Supported call type | |
---|---|---|
Call start message | App client of a caller → App client of a callee App client of a callee → App client of a caller | Only 1-to-1 call |
App server data | App client of a caller or participant → App server | 1-to-1 call, group call (conference) |
Related API
APIs related to the call start message function are as follows.