Telephone Call style workflow design pattern

Hi All,

I want to create an app that follows a telephone call style workflow, in that:

  1. User_1 initiates a call to User_2
  2. User_1 is shown a ringing message to indicate that User_2 is being called
  3. User_2 is notified that User_2 is trying to call them
  4. User_2 is able to either accept or reject the call

Working through the example of OpenVidu, the API is constructed around a video conferencing workflow, in that all participants voluntarily join a session at a pre-agreed time. Is there a call initiation API in OpenVidu or does the notification functionality need to be implemented outside of OpenVidu?

cheers
Philip

Hello Philip,

Notifications are dependant on the client framework. It works differently for web applications and mobile applications. For these last ones, it will be different for hybrid technologies such as Ionic or React Native than for native applications built directly for Android or iOS. Mobile apps will generally require some kind of push notification system for your application to be able to trigger notifications without the app running in background. Web apps simply require users to accept the web page permission’s request to trigger desktop notifications.

As you can see this is overall outside OpenVidu’s scope, but I hope I have provided you with some useful insight.

Best regards.

1 Like

Many thanks, this is a really useful suggestions.

In my case I would have the caller using an ionic angular capacitor ios app (which I have working), and the callee being a support person logged into a web dashboard built using ionic angular frame work. So I don’t necessarily need to rely on push notification, as all users are “logged in”

One idea I had was to make this work would be to have a background “Call Initiation” session which all users join and use that session to send signals to raise a call request to another user, using the data payload to indicate who the caller is, then dynamically create a new call session if the call is accepted by the user.

I guess to make this would I would need to create a “call initiation session” per callee who is able to take a call so that the signaling is not a total broadcast to all…

Would this make sense, if this a pattern that others have used?

cheers
Philip

I mean, if you want to avoid having to implement a server-to-client communication channel in your backend, you could use that strategy to take advantage of OpenVidu signaling API. But you could also just establish a simple bidirectional WebSocket connection between your calle-backend and caller-backend to handle this kind of “lobby room”, without having to create “fake” OpenVidu Sessions with no media only dedicated to pass messages between clients. This second strategy will also allow you to add whatever pre-check buisness logic you may need in your application’s backend before starting the video calls. Remember that OpenVidu signaling API is silent from the application’s point of view (you cannot intercept its messages in your application’s backend for decision-making). To sum it up: if you want your application’s backend to be extra simple and avoid implementing stateful connections with your clients, you can go with your idea. If you want a little bit more control, build the “Call Initiation” on your own and only use OpenVidu for the video call itself.

Best regards.

1 Like