SIGN UP

Making calls

Please be sure that you are familiar with the SDK initialization before you continue with this part, since we will be assuming that you have SDK already initialized and connected to the Voximplant Cloud.

After the SDK was initialized and connected to the Voximplant Cloud it's now time to make your first call. Since the call can end in different ways there is a group of the call events that can be dispatched by the Call class instance. The call function of the VoxImplant.Client class is used to make an outgoing call from the SDK.

const call = voximplant.call("numbertocall");
call.addEventListener(VoxImplant.CallEvents.Connected, event => {
  // event - the instance of VoxImplant.CallEvents.Connected class,
  // use event.call to get the instance of VoxImplant.Call for this call
  // call was connected succesfully
});
call.addEventListener(VoxImplant.CallEvents.Disconnected, event => {
  // event - the instance of VoxImplant.CallEvents.Disconnected class,
  // use event.call to get the instance of VoxImplant.Call for this call
  // call was disconnected
});
call.addEventListener(VoxImplant.CallEvents.Failed, event => {
  // event - the instance of VoxImplant.CallEvents.Failed class, use
  // event.call to get the instance of VoxImplant.Call for this call, or
  // event.code and event.reason to get the status code and the reason of
  // the call failure call failed
});
call.addEventListener(VoxImplant.CallEvents.ProgressToneStart, event => {
  // event - the instance of VoxImplant.CallEvents.ProgressToneStart class,
  // use event.call to get the instance of VoxImplant.Call for this call
  // Event dispatched when progress tone playback starts
});
call.addEventListener(VoxImplant.CallEvents.ProgressToneStop, event => {
  // event - the instance of VoxImplant.CallEvents.ProgressToneStop class,
  // use event.call to get the instance of VoxImplant.Call for this call
  // Event dispatched when progress tone playback stops
});

 

Manage calls

The SDK allows you to make different number of outgoing calls which can be controlled on both SDK and VoxEngine side. There are a few functions to control calls on the SDK side and it's a good idea to have access to each call instance via some variable. The list of the functions is available at VoxImplant.Call page from the Web SDK Reference. Here are just a few simple examples:

call.muteMicrophone(); // don't send audio from microphone to the call
call.sendTone("0"); // send tone for 0 key
call.unmuteMicrophone(); // start sending audio from microphone to the call
call.hangup(); // hangup the call
Get your free developer account or talk with our sales team to learn more about Voximplant solutions
SIGN UP
Contact sales

Please complete this field.

Please complete this field.

Please complete this field.

Choose the solution

Please complete this field.

Please complete this field.