Processing voice calls in SDKs
This article will help you to make and receive calls in your web or mobile application.
Before you implement calling functionality in your web or mobile application, you need to create your application, import our SDK, connect to Voximplant and login with your user. See this guide to learn how to do this.
Contents
How to make an audio call
After you start a call in your mobile or web application, you receive this call in the platform. Create a proper routing rule to match the destination in the first parameter of the call method in your SDK.
In the scenario, depending on your destination (a user/phone number/sip), call one of the methods described in this article to create a proper call. You can retreive your call destination value from the e.destination
property. Then unite the application call and the scenario call via the easyProcess method.
Read the How to process calls in a scenario article to learn more about processing inbound and outbound calls in scenarios.
Use the hangup method in your application to end the call.
How to process an inbound call
All the inbound calls in Voximplant are processed by routing rules. Before you process an inbound call, create a routing rule and set it up for your specific scenario. Follow this guide to learn how to do this.
To make calls into an application, you need to call a user that is currently logged into the application.
Then, in the application, subscribe to the IncomingCall event, and use the call.answer event to answer a call or the call.decline event to decline a call.
Refer to the API Reference of your platform to find information about the methods. Here is a code example on how to answer and decline a call in a Web/iOS/Android application:
Download our demos
Here you can download our audio calls demos for multiple platforms for your instance: