Extending OpenVidu sessions with traditional phone calls
We have experience a huge rise of remote working in the last years, firstly as a necessity but it came to stay and currently is a very important part of many companies. Therefore it is mandatory to have an adequate tool that fits the company necessities. OpenVidu make it simple to create a tailored application with integrated videocalls. But sometimes the users might have difficulties to join videocalls due to lack of sufficient internet access or a appropriate device (computer/smartphone). Hence extending the functionality of OpenVidu for conventional phones.
Including phone calls within the OpenVidu based applications would enable some new features:
Make outbound calls from the application
This way an user in an OpenVidu session could make a “phone-call” from the session and the person at the other end of the call would be automatically added as an audio only user into de OpenVidu session. It will be very simple to add any person to an OpenVidu call even when the user isn’t on the computer or smartphone.
Receive inbound calls to an OpenVidu session from any traditional phone.
It will make possible for the users to join scheduled sessions from their phones through a simple phonecall, as it can be already done in generalist videocall services.
But depending on the application itself more complex use cases can be implemented!
Components
In order to add this capabilities to the OpenVidu sessions we would need in addition to the core OpenVidu components:
- VoIP provider, that would provide the connection between the internet communications and the traditional telephone network.
- Custom gateway to configure and manage the connection of OpenVidu with the VoIP provider.
- Media Server that can transform the audio from the OpenVidu sessions to a single unique audio stream to send to the VoIP provider and get the audio Stream from the VoIP provider to the OpenVidu selected Media Server.
VoiP provider
The provider would provide a SIP -Session Initiation Protocol- Interface and the SIP proxy data to connect to and where it will listen for SIP messages an the appropriate parameters to configure the endpoint:
* Proxy location: IP or DNS name and port
* Transport: SIP transport supported, it may be UDP, TCP or TLS
This would allow the OpenVidu Gateway to configure the necessary domain and users to connect the OpenVidu sessions with the VoiP service.
Some VoIP providers are for example Twilio and FreeSwitch.
OpenVidu SIP Gateway and Kurento customised Media Server
The OpenVidu SIP Gateway and the Kurento are the key components. It is the responsible of:
* The REST API to add the telephone capabilities to already existing OpenVidu session by request of the client application
* Manage the audio streams from and to the OpenVidu session.
* Manage the SIP communication, and register the SIP domains and users into the SIP provider.
Client Application
In the end the feature must be activated from the client application and it is where the specific use cases would be implemented. However those applications that are already making use of OpenVidu needn’t to be modified to continue working.