Web and In-App Calls

Infobip Web and In-App Calls provides a simplified and secure way of real-time communication over the web and inside mobile applications.

It’s powered by Web Real-Time Communications (WebRTC) technology, the leading real-time communication standard built into more than a billion devices. This means it’s safe and easy to use both for you and your end users

With Web and In-App Calls you will enrich your web browsers and mobile applications with real-time audio and video communication capabilities, allowing you to focus on your app’s user experience and business logic.  

Web and In-app Voice

Calls between 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, your users can still be connected thanks to the interoperability of our Voice platform. 

We currently support 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 and they can be recorded.

In order to start using Web and In-App Calls, you need to have this service enabled on your account. 

Please contact your Customer Success Manager to enable Web and In-App Calls or contact us
Also, let us know you if you would like to use our demo applications for testing so we can set it up as well. 

NOTE

Please note that Recording and Video calls are in an Early Access stage.

Testing With Demo Apps

Infobip Web and In-App calls can be tested over our demo applications but you need to have these enabled on your account.
Please contact your Customer Success Manager or contact us.

There are three demo applications available for you to test with:

  1. Web demo application which you can download via the provided link
  2. Android demo application which you can download from the Google Play store
  3. iOS demo application which you can download from the Apple store

Any user who has access to the Infobip web interface can log in to the demo application using the same credentials.

Demo applications support testing audio and video Web and In-App Calls; Web and In-App Calls to and from phone numbers as well as audio and video calls to Conversations

Web Demo Overview

To access the web demo application, you need to supply the username and password. Use the same user credentials as you would for the Infobip web interface

Web and In-App Calls - Web demo app

Tick the GENERATE RANDOM IDENTITY box if you do not want to have your user represented by your username.
You cannot place a call to yourself, so this serves somewhat as a single person test.
This option is available on web demo only.


Use ADVANCED options to select the data center you would like to use for testing. The closer the data center to your location, the calls quality should be better. 

Web and In-App Calls - Demo app side panel

The hamburger button in the top left corner expands a side panel and shows full details on available options:

  • Make a call is the home page from where you can place calls to another user or a phone number.
  • Call history will list call details placed from and to users on your account. 
    It will contain information on:
    • call ID
    • source
    • destination
    • start time
    • end time
    • call duration
    • whether the call was answered
  • Settings are used to change Audio and Video input or output devices.
  • Other users section will allow you to see and search all active users on the account. If you click on the icon that represents the user, it will prefill the username value in the Make a call WEBRTC section. 

Located in the top right corner you will find the user options section with your username. 
For another user to place a call to you from the demo application, they would need to provide that information.

The Make a call page consists of three tabs:

  1. WEBRTC - this tab is used to place a call to another user in the application. In the call options you need to enter the username of the person you are trying to reach and use the appropriate buttons to start the call. 
  2. PHONE - used to place a call to someone on the phone. If you have purchased Voice number(s) from Infobip you will be able to select one you would like to use as sender. You need to enter the phone number in E.164 format (e.g.: +33755531080)
  3. CONVERSATIONS - used to place an audio or video call to an agent in Conversations.

If you encounter any issues, please take a note of the error and refer to our error codes section.

Android Demo Overview

To access the Android demo application, you need to supply the username and password.
Use the same user credentials as you would for the Infobip web interface

Select ADVANCED options to choose the data center you would like to use for testing. The closer the data center is to your location, the calls quality should be better. 

Web and In-App Calls - Android demo app

Web and In-App Calls - Android demo app tabs

Four tabs can be found in the application home page:

  1. WEBRTC -  this tab is used to place a call to another user in the application. In the call options you need to enter the username of the person you are trying to reach and use the appropriate buttons to start the call.
  2. PHONE - used to place a call to someone on the phone. 
  3. CC - used to place an audio or video call to an agent in Conversations
  4. ACTIVE - this tab will allow you to see and search all  active users on the account. If you click on the icon that represents the user, it will prefill the username value in the Make a call WEBRTC section. 

The hamburger button allows access to the following menu items:

  1. About - offers basic information on the app
  2. Settings - used to change Audio and Video input or output devices.
  3. Feedback - you can use the feedback section to let developers know if there are some issues. For troubleshooting purposes, you can also include logs. 
  4. Sign out - use this option to leave the application or change the user.

iOS Demo Overview

To access the iOS demo application, you need to supply the username and password.
Use the same user credentials as you would for the Infobip web interface

Select ADVANCED options to choose the data center you would like to use for testing. The closer the data center is to your location, the calls quality should be better. 

Web and In-App Calls - ios demo app

Web and In-App Calls - ios demo app tabs

Four tabs can be found in the application home page:

  1. WEBRTC -  this tab is used to place a call to another user in the application. In the call options you need to enter the username of the person you are trying to reach and use the appropriate buttons to start the call.
  2. PHONE - used to place a call to someone on the phone. If you have purchased Voice number(s) from Infobip you will be able to select one you would like to use as sender. You need to enter the phone number in E.164 format (e.g.: +33755531080)
  3. CC - used to place an audio or video call to an agent in Conversations
  4. ACTIVE - this tab will allow you to see and search all  active users on the account. If you click on the icon that represents the user, it will prefill the username value in the Make a call WEBRTC section. 

The hamburger button allows access to the following menu items:

  1. About - offers basic information on the app
  2. Settings - used to change Audio and Video input or output devices.
  3. Feedback - You can use the feedback section to let developers know if there are some issues. For troubleshooting purposes, you can also include logs. 
  4. Sign out - use this option to leave the application or change the user.

Getting Started

In this article, we’ll help explain how you can start using Web and In-App Calls on your website or inside your mobile application.

But first let’s have short overview of the most important terms that will be used throughout the documentation:

  1. Application
    Application is used for setting up Infobip Web and In-App Calls. It contains configuration details and security information.
    Each call is linked to application and when call is received Infobip’s platform will handle it as it is defined there. 
    You can have one or more applications linked to your account. 
  1. Identity
    Identity is your customer's unique identifier on the Web and In-App Calls platform. It is an alphanumeric string and has nothing to do with your customers' personal identification information. In the context of Web and In-App Calls, user management is entirely on your side.
    Web and In-App Calls platform doesn’t not track personal data or roles for identities.
    You need to know which of your customers' identity belongs to and who is to be connected to whom. Our role here is simply to connect calls.

          Identities are registered on the account level.
          This implies that if you have more than one application linked to your account, you can connect any of their users in a call.

  1. Token 
    The token is used to authorize your customers to make calls. Your backend requests token on behalf of your customer over the API. Infobip platform registers customers identity, creates and signs the token and returns it via the API response. Your customer needs to provide this token when making call.  

  2. Push
    Push refers to silent push notifications that are used as wake-up mechanism for your application. If push is configured it will be used to inform the application that it is about to receive an incoming call. In such cases when the application is not running on the device at that moment, it can be started. This does not require any interaction with your customer/application user.

  3. Source
    Source represents the identifier of the customer who has initiated call. When a call was started from the application, source will refer to the customer's identity. If a call originated on a phone network, the source will be the phone number of the person who made that call.

  4. Destination
    Similarly, destination represents the identifier of customer that call was delivered to. When a call was terminated in the application, the source will refer to the customer's identity. If the call was placed to a phone, the source will be the phone number of the person who received it. 

Set up Web and In-App Calls

  1. Create your application via the Infobip web interface.

  1. Setup SDKs into your application project. Use the following guides on Github to help you begin:

Create and Configure Application

  1. Navigate to APPS > Web and In-App Calls module.

Web and In-App Calls module

  1. Select Applications from the module tab and click Create new.
  2. Add the application name and description

Configure Push

This is an optional step but using push is highly recommended if you want to place calls to users in the application.
For iOS: 

  • You need to upload APNs Certificate
  • Additionally, if the certificate is encrypted you must enter the password 

For Android:

  • You need to enter the FCM Server API Key

Configure Application Options

Here you can define in which modes the application will be used. Setup options correspond to SDK method options.

  1. App to App
    a) Select this option when your application is used for establishing Web and In-App Calls. Users are being connected over the internet inside your application.
    b) SDK Call method (Web, Android, iOS) is used 

  2. App to Conversations
    a) Select this option when your application is used for establishing Web and In-App Calls to Infobip Conversations
    b) SDK CallConversations method (Web, Android, iOS) is used 
  1. App to SIP
    a) Select this option when your application is used for forwarding Web and In-App Calls to your SIP Server. Your platform should support SIP protocol and should be reachable over the public Internet via static and public IP address.
    b) Link the application to the correct SIP Trunking configuration
    c) SDK CallSIP method (Web, Android, iOS) is used
    d) Currently, Video calls are not supported with this option.
  1. App to Dynamic Destination
    a) Select this option when not all Web and In-App call parameters are not known at the moment when the call is initiated. It is also required when incoming phone calls are to be routed to the application user.
    b) Link the application to the correct Dynamic destination resolving configuration.
    c) SDK CallDynamicDestinationRequest method (Web, Android, iOS) is used.
    d) Learn more about Dynamic destination resolving.
  1. App to Phone
    a) Select this option when your application is used for connecting Web and In-App Calls to phone numbers. 
    b) Buy a Voice number if you want to have a designated caller ID. Otherwise the caller ID for this call will be some random number from the pool defined for that connection.
    c) SDK CallPhoneNumber method (Web, Android, iOS) is used.

Create SIP Trunking Configuration

  1. Navigate to APPS > Web and In-App Calls module.

  2. Select SIP Trunking from the module tabs.

  3. Click Create new:
    • 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
  1. Confirm the action by clicking on the CREATE SIP TRUNK button.

Please note that the same configuration can be used for placing the calls over our Voice platform. Learn more about Voice SIP trunking.

Web and In-App Calls - create SIP trunk

Create Dynamic Destination Resolving Configuration

  1. Navigate to APPS > Web and In-App Calls module.
  2. Select Dynamic Destinations from the module tabs.
  3. Click create new:
    • IP CallbackURL – define the API endpoint to where you would like us to send the request 
    • StatusUrl – define the API endpoint to where you would like to receive status reports after the call is finished
    • Optional: Authorization header - enter the Authorization request header as per general HTTP authentication framework 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. 

Web and In-App Calls - create dynamic destination

Dynamic Destination Resolving

We live in such times when people find their privacy to be paramount and brands need to ensure that they are keeping all personal data safe. This includes but it is not limited to, names and phone numbers.

 Infobip Dynamic destination resolving feature for Web and In-App calls gives you the ability to enable your customers to talk to each other while you provide them full privacy and protect their identities. At the same time, you avoid off-platform transactions and have full control of the communication flows in order to allow for advanced routing and cost optimization.  

The concept is simple:

Your client can initiate a call from the application or call the Voice DID number. When the call reaches the Infobip platform, the platform will call HTTP API endpoint that you have specified in the configuration of your application. Your platform will decide what you want to do with the call and provide the instructions in the API response. 

NOTE

If you are interested in phone calls only, please, take a look at the Number Masking solution.

Web and In-App Calls - Dynamic destination resolving - process flow

To set up Dynamic destination resolving you need to specify the URL of HTTP API that Infobip platform needs to call.  

An incoming call can be initiated by Web and In-App Calls user form the mobile or the web application or it can be phone call placed to Voice DID 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:

  1. If the call originated form 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 you need to perform routing
  2. 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 you define where the will call be delivered. The action and destination fields must be specified in the response.

With the action field you define whether the call will terminate as Web and In-App Call to the user in the application or if it will be delivered to a phone number.
This is done by setting the action field value to call or call_phone_number.  
With the destination field you provide the information which 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 not set, 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 thestatus 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 
}

We do not expect anything in response, you just need to return the 200 OK status so we know you have successfully received the information.

Web and In-App Calls and Video Recording(Early Access)

Web and In-App Voice Calls supports recording of the audio*Early Access and video*Early Access communication. 
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.

For more details on managing files over the web interface as well as detailed information on recording in general please refer to the Recording page

Video and Web and In-App Calls Reporting

Web and In App Calls are part of Voice calls reports in Analyze. Video reports data, while in beta, is merged in the same report.

Bandwith Requirements

Approximate data rate for each stream of Web and In-App Calls is around:
 

Audio only   50 Kbps
Low resolution video 240x180 180 Kbps
SD video 640x480 600 Kbps
HD video 1280x720 1500+ Kbps

Charging Web and In-App Calls 

One-on-one Web and In-App Calls are being charged by the web and in-app call pricing. Only answered calls are billed. 

Additional charges might apply when using interconnected Voice calls or add-on features:

  • Web browser to web browser voice calls – single leg of Web and In-app Calls will be charged 

  • App to App voice calls – single lag of Web and In-app Calls will be charged 

  • Web browser to app calls and vice versa – single leg of Web and In-App Calls will be charged 

  • Web browser and app voice calls to regular (PSTN) phones and vice versa - one leg of Web and In-app Calls will be charged as well as the corresponding Voice call leg: 

    • In case the call was initiated by a regular (PSTN) phone - inbound call charges apply 

    • In case the call was initiated as Web and In-app Call but was terminated on the regular phone - outbound call charges apply 

In addition, you will need to pay for the usage of the Recording feature if calls are recorded.