Objective
How can I implement a ringing or calling application with Vonage Video API?
Applies To
- Vonage Video API
- Ringing
- Calling
Procedure
Calling or ringing another user is not a feature of the Vonage Video API. Nonetheless, the ringing or calling logic can be implemented separately in the application. Once App users have rung or called each other, and agreed to proceed with the call, Vonage Video API can be used to implement the actual audio or video call.
Below, we have an illustration of how the ringing or calling logic might be established.
In this illustration:
- User A wants to call user B using the App.
- Both user A and user B are registered in the application server (App Server) with a unique ID (UID), for example, their email address, or a unique ID provided by the system.
- Vonage session IDs and tokens are generated securely by the App Server, which holds Vonage API keys and secrets and do not reveal these to users.
A simple sequence of events can be as follows:
- User A sends its intention to ring user B (includes user B's UID) to App Server.
- App Server uses a designated Vonage API key and secret to create a session ID and 2 tokens (1 for each user).
- App Server sends the common session id and respective token to user A and B.
- The sending method can be via a cloud messaging method that sends a server push notification to the device of each user.
- Examples of cloud messaging providers include Firebase Cloud Messaging, OneSignal, Airship, etc.
- Upon receiving the push notification, the App at user B can perform a "ringing" operation to alert user B to the call.
- User B can decide to accept or decline the call.
- This decision is sent to the App Server.
- App Server informs user A of this decision.
- If user B accepted the call:
- Using the session id and token (from the server push notification), both user A and B can connect to the same session for a Vonage Video API powered video call.
- If user B declined the call, the App at both users terminates the ringing feature.
The above is only meant as a simple illustration of how ringing or calling can be implemented and used together with Vonage Video API. Many improvements can be made, for example, session and tokens can be generated and sent to users only after user B accepts the call.
Additional Information
For details on session creation, please refer to our documentation below.
Vonage Video API Opentok Environment
Vonage Video API Unified Environment
For information about token creation, please refer to our developer documentation below.
Vonage Video API Opentok Environment
Articles in this section
- Why isn't the Video Inspector displaying user information and events?
- Has the Video Session Monitoring Callback data changed?
- Vonage Scalable Video Simulcast
- How can I find the creation or expiration time of a token?
- What does OT.checkSystemRequirements() check?
- How to Get HD/FHD Resolution Recordings and Live Streaming in Vonage Video API Sessions
- How can I implement a ringing or calling application with Vonage Video API?
- How can I get information about multiple sessionIds in one Insights GraphQL query?
- What codecs are supported on the Vonage Video API platform?
- Can I set the Audio Output device when using the Vonage Video API in Javascript