requestCall (14)
The requestCall message is sent to a contact to initiate a real-time voice or video call session. It signals the desire to open a media stream and contains the necessary information for the recipient to respond.
Under the hood, this message is a specialized version of the appRequest message, where the application identifier is spixi.voip.
Core Data Types
IxiBytes: See IxiBytes Encoding.string: A standard UTF-8 encoded string.
Payload Structure
The payload follows the structure of an AppDataMessage, which is the standard for Mini-App communications.
| Field | Data Type | Min | Max | Description |
|---|---|---|---|---|
sessionId | IxiBytes | * | * | A unique identifier generated for this specific call session. |
data | IxiBytes | 0 | * | Optional. Contains call setup parameters, such as supported codecs or call type (audio/video). |
appInfo | string | * | * | A composite string identifying the application. For a call request, this MUST be set to spixi.voip. |
Behavioral Notes
- Sending: To start a call, the client generates a unique
sessionId, constructs theAppDataMessagepayload withappInfoset tospixi.voip, and sends it within aSpixiMessageof typeappRequest. - Receiving: The recipient's client receives an
appRequestand parses theappInfofield. If it identifies the request asspixi.voip, it treats it as an incoming call. It then uses thesessionIdto manage the call state and presents a UI to the user to accept or reject the call. - Response: The recipient must respond with either an
acceptCallorrejectCallmessage, referencing the samesessionId.