Features available during a call
Here you can learn what you can do during an active call.
Contents
How to mute the microphone
During an active call, use the muteMicrophone method to mute your microphone.
Use the unmuteMicrophone method to unmute it.
How to mute the sound
To mute the sound from all the participants, use the mutePlayback method.
Use the unmutePlayback method to turn the sound on.
How to hold a call
You can hold a call and play some music for your interlocutor. To hold a call in a web or mobile application, use the following methods: setActive for Web SDK, setHold for iOS SDK, or hold for Android SDK. Refer to the API Reference for other platforms.
To play music to your interlocutor while waiting, you need to process the call scenario. Create a player via the createURLPlayer method and play the file when the OnHold event is triggered. See this scenario example as a reference:
How to send a tone signal
To send a DTMF signal to the call, use the sendTone method. It accepts the following values: numbers (0-9), *, #.
To process an incoming DTMF tone to your call, subscribe to the ToneReceived in your scenario
How to send data to the call
Extra headers
You can send extra headers when you answer or make a call. To send an extra header, add it to the extraHeaders parameter of the callUser method:
To send extra headers while answering a call, pass them via the extraHeaders parameter of the Call.answer method:
To receive extra headers after the call is disconnected, get them from the headers property of the call object. See the scenario example below.
Send a message
You can send a message during a call. To do this, call the sendMessage method within the Call class. See the code example to understand how it works:
To receive a message sent to the call, subscribe to the MessageReceived event. Additionally, you can receive extra headers from this event.
You can also use the sendInfo() method to pass SIP INFO messages to the call. It accepts 3 parameters: mime-type, message body, x-headers. Refer to the example to understand how it works:
Custom data
Custom data is a property where you can store any additional information. There are two custom data properties:
In the VoxEngine instance
In the Call object itself
You can use these properties to store a string of up to 2000 characters.
How to toggle video sending
You can enable and disable sending video to your call. To do this, use the sendVideo method. Pass false to this method to stop sending video or pass true to this method to resume sending video.
If you initialize your SDK with both sendVideo and receiveVideo parameters set to false, you cannot enable video during the call. To be able to toggle sending video, please initialize your SDK with at least the receiveVideo parameter set to true.