How to send data to the call
You can send info from a call to Voximplant servers and vice versa. Learn how and when you can do it.
Headers
You can send extra headers while:
- Creating a call
- Answering a call
You can receive extra headers when a call is disconnected:
Send message
There is a sendMessage method within the Call class. It allows sending arbitrary data in string format from Voximplant servers to a user endpoint.
To handle such data coming to a call from an SDK, use the MessageReceived event.
You can also retrieve X-headers from this event, examine the code below.
CustomData
There are two kinds of the customData values: one is for a JavaScript session (i.e., VoxEngine object), another is for the particular call (i.e., Call.customData and Web SDK parameter of the method). It's possible to use them at the same time because they are independent entities.
Remember that if you receive some value from the Wed SDK, it doesn't overwrite the VoxEngine's value. Any of customData's type values can be later obtained from Call History using HTTP API or Control Panel.