Rate this page:

How to make an audio call

This article will guide you through the process of initiating an audio call. To do that, you have to set everything up for a Voximplant scenario and an SDK client.

Prerequisites

To make calls from SDKs you need to create an application and a user first. Use the following code in your scenario to initiate a call. The scenario executes according to your routing setup.

To process audio calls, implement the following scenario in the VoxEngine:

VoxEngine scenario

VoxEngine scenario

Instead of easyProcess you can use the following: VoxEngine.forwardCallToUser(null, true);

Initiate a call from SDKs

To make calls from SDKs you need to Import the SDK to your application, establish the connection with Voximplant Cloud and authorize the user.

Then, use the following code to perform and audio call from SDKs.

Audio calls from SDKs

Audio calls from SDKs

Answer a call

To receive incoming calls, you have to subscribe to the IncomingCall event. Use the following code to subscribe:

Please note

To receive incoming calls, the application must be connected to Voximplant Cloud and the user must be authorized. If the application or web page is closed you need to set up push notifications.

Subscribe to the IncomingCall event

Subscribe to the IncomingCall event

When the event is triggered, we'll get the Call object representing the incoming call and allowing you to control it. In order to answer the call, use the Call.answer method.

Answer a call

Answer a call

CallConnected event

The call is considered established when the CallConnected event is triggered. It means that the call has been answered on the remote side.

After the call is established, you can enable/disable video sending, put a call on hold and take it off hold, or enable screen sharing.

To handle this event, subscribe to it:

Subscribe to the CallConnected event

Subscribe to the CallConnected event