WebRTC
Infobip Web and In-Application Calls offers a secure way of establishing real-time communication over the web and within mobile or web applications. This helps you focus on user experience and business logic within your app.
It’s powered by Web Real-Time Communication (WebRTC) technology, the leading real-time communication standard built into more than a billion devices.
You can use Web and In-App Calls as a standalone product or combined with different voice capabilities. To enable Web and In-App Calls, contact your dedicated Account Manager or our Sales team.
Infobip currently supports several types of one-to-one calls:
- Web browser to web browser audio and video calls.
- Mobile application to mobile application audio and video calls.
- Web browser to mobile application audio and video calls and vice versa.
- Web browser and mobile application audio calls to phone calls and vice versa.
- Web browser and mobile application voice calls to SIP server.
Web and In-app calls support Dynamic Destination Resolving.
Additionally, WebRTC can be recorded. Recording is available as an add-on so please contact your dedicated Account Manager to set it up. Learn more about Recording.
COUNTRY REGULATIONS AND COMPLIANCE
Certain types of Voice and Video calls and call recordings might be subjected to specific country regulations. Before you set up and start using Voice and Video, make sure you've checked the country's telecom regulations.
Here's how WebRTC works.
Calls between end users in your app need to be private. This is where Infobip Web and In-App Calls comes into place. Calls are made over VoIP without using any phone networks. However, if a phone network service is needed, end users can still be connected thanks to the interoperability of the Infobip Voice platform.
You can integrate Web and In-App Calls within your app using the Infobip RTC SDKs.
Features
Video Calls With Web and In-App calls you can offer your end users, using mobile or web applications the capability to use video calls to stay in touch. |
Screen Share End users can share their screen while on calls. |
Media Switch End users can seamlessly switch between using audio and video calls. For example, at any point turn off the video and use just audio. |
Network Events Provide information about network quality or network issues during web and in-app calls. |
Conferencing (Early Access)
This feature enables you to set up conference calls with Web and In-App Calls. |
Dynamic Destination Resolving Offer your end users to talk to each other in full privacy and protect their identities. |
Record Video Calls With the Recording add-on, you can record all one-on-one video and audio calls in Web and In-App Calls.
|
Technical Requirements
Here are the technical details you need to know before you start using Web and In-App Calls.
Bandwidth Requirements
The approximate data rate for each stream of Web and In-App Calls:
Audio only |
50 Kbps |
|
---|---|---|
Low-resolution video |
240x180 |
180 Kbps |
SD video |
640x480 |
600 Kbps |
HD video |
1280x720 |
1500+ Kbps |
Codecs
Audio | Video |
---|---|
OPUS, PCM |
VP8, H.264 |
Platform Compatibility
For supported Android versions, see the supported list.
For supported iOS versions, see iOS system requirements.
For supported browsers and OS, see browser compatibility list.
Feature Platform Compatibility
Check out the table below for information about feature availability with different operating systems (OS).
Web | iOS | Android |
React Native |
|
---|---|---|---|---|
1-on-1 calls |
✓ | ✓ | ✓ | ✓ |
Conferencing | ✓ | ✓ | ✓ | - |
Screen-share |
✓ |
✓ (Only in-app) |
✓ | - |
Recording | ✓ | ✓ | ✓ | ✓ |
IO device management |
✓ | ✓ | ✓ | ✓ |
Network quality events |
✓ | ✓ | ✓ | - |
Getting Started
To start using Web and In-App Calls, you need to have an Infobip account and Web and In-App Calls enabled as a service on that account. Log in or create an account to continue.
To enable Web and In-App Calls, contact your dedicated Account Manager or contact our Sales team.
To get started and set up Web and In-App Calls, follow the instructions below.
Step 1 - Create your application and define the type. You can create the application in the web interface or via API.
Step 2 (optional) - Set up push notifications.
Step 3 - Set up SDKs for your application project.
Depending on your use case, these could be optional steps:
Step 4 - Configure SIP trunk in case you want to forward the calls to your SIP platform.
Step 5 - Configure Dynamic Destination Resolving.
To enable WebRTC, go through these 5 steps.
Configure Application
The Web and In-App calls application can be configured via API or in the web interface. Follow the instructions below to create and configure your application over web interface.
-
Navigate to the Channels and Numbers module located at the bottom left > Web and In-App Calls > Applications > ADD NEW.
-
Name your application and add the description.
Set Up Push Notifications
This is optional. However, we highly recommend you set this up if you want to place calls to end users within the application.
For iOS:
-
Upload APNs Certificate.
-
If the certificate is encrypted, enter the password.
For Android:
-
Enter the FCM Server API Key.
Set Up Application Options
Here you can define in which modes the application will be used. Setup options correspond to SDK method options.
App to App
-
Select this option if you plan to use your application for establishing Web and In-App Calls. End users will be connected via the Internet within your app.
App to Conversations
-
Select this option if you plan to use your application for establishing Web and In-App Calls to Infobip Conversations.
App to SIP
This step is optional. Required only if you will use Forwarding to your SIP platform.
-
Select this option if you plan to use your application for forwarding Web and In-App Calls to your SIP platform. Your platform should support SIP protocol and should be reachable over the public Internet via static and public IP address.
-
Link the application to the correct SIP Trunking configuration.
-
Currently, Video calls are not supported with this option.
App to Dynamic Destination Resolving
-
Select this option if not all Web and In-App call parameters are known when the call is initiated. DDR is required when you want to route incoming phone calls to the application user.
-
Link the application to the correct Dynamic Destination Resolving configuration.
-
SDK
CallDynamicDestinationRequest
method (Web, Android, iOS) is used. -
Learn more about Dynamic Destination Resolving.
App to Phone
-
Select this option if you plan to use your application for connecting Web and In-App Calls to phone numbers.
-
Lease a Voice number if you want to have a dedicated caller ID. Otherwise, the caller ID for this call will be a random number designated for that connection.
FORWARD WEB AND IN-APP CALLS TO SIP PLATFORM
In case you would like to receive calls from the web browser and mobile applications directly to your SIP platform, configure SIP trunking first.
Create SIP Trunking Configuration
-
Navigate to the Channels and Numbers module located at the bottom left > Web and In-App Calls > SIP Trunking > ADD NEW.
-
Select SIP Trunking from the module tabs.
-
Enter the following parameters and click CREATE SIP TRUNK:
- IP Address - Enter the IP address of the SIP Server to which calls should be forwarded to
- Port - Define the TCP/UDP port used for SIP communication
- Data Center - Select the Infobip data center closest to your platform location
The same SIP trunking configuration can be used for placing the calls over our Voice platform. Learn more about Voice SIP trunking.
After you're done with the SIP trunking configuration, you can go back to the Web and In-App calls Application and enable App to SIP. This is to forward the calls to your SIP platform.
Dynamic Destination Resolving
People's privacy is crucial. Brands need to ensure that they are keeping all personal data safe. This includes but is not limited to, names and phone numbers.
Infobip Dynamic Destination Resolving feature in Web and In-App calls enables your end users to talk to each other in full privacy and protect their identities.
At the same time, you avoid off-platform transactions and have full control of the communication flowing in to allow for advanced routing and cost optimization.
This is what a high-level overview looks like:
Your end user can initiate a call from the application or call the Voice number. When the call reaches the Infobip platform, the platform calls HTTP API endpoint that you have specified when configuring your application. On your platform via API, you decide what you want to do with the call.
To set up Dynamic Destination Resolving, specify the HTTP API URL that Infobip platform needs to call.
NOTE
If you are interested in phone calls only, skip to Number Masking.
Here's how to set up Dynamic Destination Resolving configuration.
Create Dynamic Destination Resolving Configuration
-
Navigate to the Channels and Numbers module located at the bottom left > Web and In-App Calls > Dynamic Destinations > ADD NEW.
-
Enter the following parameters and click CREATE DYNAMIC DESTINATION.
- Authorization header (optional) – Enter the Authorization request header as the general HTTP authentication framework. That is, if you want to have it included in the request we send towards your platform. It adds an additional layer of security to intraplatform communication.
- Callback URL (API endpoint) – Define where you would like us to send the request to.
- Status URL (API endpoint) – Define where would you like to receive status reports once the call is finished.
-
You can go back to the Web and In-App Calls Application and enable App to Dynamic Destination Resolving to use this configuration.
-
Align your platform with the Infobip platform when receiving incoming calls. To set this up, refer to Incoming Calls with Dynamic Destination Resolving.
Incoming Calls with Dynamic Destination Resolving
Incoming call can be initiated by:
-
Web and In-App Calls from end users using a mobile or web application,
-
Placing a phone call to Voice number.
In both cases, when the call reaches the platform, we will send a POST request to your API endpoint.
Depending on the type of the incoming call, the request will contain different information:
If the call originated from the application, it will contain source and customData fields.
-
Source is the identity (unique identifier) of the user who initiated the call.
-
CustomData can be passed through Web, Android and iOS SDKs when calling our
callDynamicDestination
method.
CustomData can be used to collect information for routing.
If the incoming call was a phone call it will contain the source and destination fields.
-
Source is the phone number of the person who made the call.
-
Destination is the DID number that the phone call has been placed to.
Request example:
(call originating from Web and In-App Calls)
{
"source": "Alice",
"customData": {
"myUserId": "myBob"
}
}
Request example:
(call originating from an actual phone number)
{
"source": "41793026727",
"destination": "41793026731"
}
In the response, define where the call will be delivered. Specify the action and destination fields.
-
With the action, you define whether the call will terminate as Web and In-App Call towards the end user in the application or if it will be delivered to a phone number. Set the action field value to call or call_phone_number.
-
With the destination field, you provide the information which end user or phone number to forward the call to. Optional field in the response is source but it is necessary when you want to guarantee anonymity to your customers. If you don't' set it up, the original source that was received with the call will be used.
Response example:
(call terminating to Web and In-App Calls)
{
"action": "call",
"source": "AnotherAlice",
"destination": "AnotherBob”
}
Response example:
(call terminating to an actual phone number)
{
"action": "call_phone_number",
"source": "41793026728",
"destination": "41793026732"
}
If you configured the status URL after the call has been completed, the platform will send another HTTP POST request to that endpoint. It will contain general information regarding the call status.
Request example:
{
"callId": "000a15f9-187b-425e-8f16-63acb54eeb4c",
// obtained by calling "id()" method on "Call" object in our SDKs
"source": "Alice",
"destination": "Bob",
"status": "finished", // or "failed"
"duration": 15
}
The Infobip platform doesn't expect a response. Your platform needs to return the 200 OK status so we know you have successfully received the information.
Video Calls
Video calls are an integral part and an embedded functionality with Web and In-App Calls. While your end users are on the call, they can either turn the video on or off.
Media Switch
Seamless switch between audio and video calls. You can start the call as video or audio and then switch video on and off as needed during your call.
Screen Share
Share screen during calls.
Types of sharing screen:
-
Full - Share the entire screen.
-
In-app - Select one app you want to share during your call.
Full Screen Share is available on browsers (see Compatibility list) and Android OS, while In-app Screen Share is available on iOS.
Network Events
Inform your end users about network quality or networking issues during their Web and In-App calls. Offer a better user experience using our network quality events feature.
If network problems occur during a call between two users, the platform will inform the user experiencing this issue that their network is too slow to support a high-quality call.
At the same time, the other user will be informed about their peer's network quality issues, so they are aware the problem lies on the other side of the call.
Depending on the platform where you'll incorporate this feature, use the following links:
Conferencing
NOTE
Conferencing is in an Early Access phase.
The Conferencing feature enables you to create a conference call on Web and In-App calls.
It is available using SDKs:
-
Audio conferencing - Available in browsers and mobile applications.
-
Video conferencing - Available in browsers and mobile applications.
Depending on the platform where you'll incorporate the Conferencing feature, use the following links:
INFO
Conference calls are limited to 12 participants per conference room. You can have up to 50 conference rooms.
Check out the table below for more information about the WebRTC feature availability:
Web | iOS | Android | |
---|---|---|---|
Conferencing | ✓ | ✓ | ✓ |
Smart video distribution | ✓ | ✓ | ✓ |
Screen-share | ✓ | ✓ (in-app only) | ✓ |
Recording | - | - | - |
IO device management | ✓ | ✓ | ✓ |
Network quality events | - | - | - |
Smart video distribution refers to the distribution of the participants' video stream in a conference. Streams are ordered based on the user activity and display 3 web or 1 mobile users' cameras in high quality (720p).
Recording WebRTC Calls
You can record video and audio calls with Web And In-App Voice Calls.
You can record all video calls. Recording is available as an add-on so please contact your dedicated Account Manager.
To turn on the Recording feature, set the capability option for recording to ALWAYS or ON_DEMAND when creating the token for the session. After the recorded audio or video call has ended, recorded files will be available to you. You may search, download and/or delete them over API or via web interface.
Additionally, we provide the option of turning the recording on and off for each individual call, overriding the default setup option. When configuring this option per call, you can specify the type of media you want to record - audio, video, or both.
For more details on managing files over the web interface as well as detailed information on recording in general, refer to Recording.
COUNTRY REGULATIONS AND COMPLIANCE
Certain types of Voice and Video calls and call recordings might be subjected to specific country regulations. Before you set up and start using Voice and Video, make sure you've checked the country's telecom regulations.