We are launching our new product Feta on ProductHunt soon!
Subscribe & Get 3 Months Free
Back to blog

Bridging Your Telephony Calls to a Video Call

Bridging Your Telephony Calls to a Video Call

This blog post offers an in-depth look at the world of telecommunication technologies, focusing on how traditional telephony and modern video conferencing are being integrated together. We will clarify complex concepts like VOIP, SIP, PSTN, and WebRTC, examining their interactions and the methods used to combine these technologies.

Bridging telephony calls with video calls is not just a technical feat; it serves practical and impactful use cases in various sectors. Here are some reasons why this integration is crucial:

  • Telehealth Services: In healthcare, integrating telephony with video conferencing enables doctors to offer more comprehensive telehealth services. Patients can initially contact healthcare providers through regular phone calls and, if necessary, switch to a video call for a more thorough consultation.
  • Network Restrictions: Let’s be honest, not every place has great internet, especially mobile internet, which is far more unstable indoors or while on the move. Network restrictions shouldn’t block your customers from accessing your services.
  • Customer Service: Customer support centers can benefit significantly from this integration. A customer calling through a traditional phone line can be quickly transferred to a WebRTC voice call with a support agent, allowing for more personalized and effective problem-solving.

Now, let’s get to understand what technologies we are dealing with to make all of this possible

PSTN (Public Switched Telephone Network):

PSTN is the traditional telephone network that has been in use for many years. It is a circuit-switched network that relies on copper wires, fiber optic cables, microwave transmission links, satellites, and undersea telephone cables

Most of your regular phone calls use PSTN to connect with each other

VOIP

VoIP (Voice over Internet Protocol) is a technology that allows voice communication to be transmitted over the Internet or other IP-based networks. It represents a significant shift from traditional telephony, which relies on circuit-switched networks such as the Public Switched Telephone Network (PSTN).

VoIP is an umbrella term that encompasses many different protocols for voice communications over the Internet, including voice calls

  • VoIP service providers typically use gateways to connect VoIP networks with the PSTN, allowing seamless communication between internet-based and traditional telephone systems.
  • The integration of VoIP with PSTN enables users to enjoy the benefits of internet-based calling while still being able to connect with users on the conventional telephone network
SIP trunking in video calling

WebRTC

This is the technology that is commonly used for video and audio communication on the web. WebRTC is an umbrella of protocols that enables web browsers and mobile applications to communicate directly with each other in real-time without the need for intermediaries.

Everyone from Conferencing applications like Google Meet to SDK vendors like Dyte uses WebRTC to deliver real-time audio and video on the internet

Google Meet is popular, we are aware of it, but its latency and connectivity issues just doesn't work for modern teams - so here's a list of Google Meet alternatives.

SIP and SIP Trunking

SIP, or Session Initiation Protocol, is a set of rules governing the initiation, maintenance, and termination of VoIP calls. It acts as a supporting protocol that facilitates the functioning of VoIP technology i.e. it is a part of the VOIP protocols

VOIP SIP

Bridging WebRTC with Telephony

Session Initiation Protocol (SIP) Interconnect refers to the setup where two or more different SIP-based networks or systems are connected to enable the flow of voice traffic between them.

Dyte's SIP Interconnect allows you to bridge VOIP calls from an external third-party service to Dyte's WebRTC meetings. That means you can use SIP methodologies to connect with our SIP Servers and have it bridged to participants who might be connected through Dyte Client SDKs (WebRTC)

Webrtc with telephony

Integration Guide

Get your SIP credentials from the Developer Portal in the API Keys section
(You will have to contact support to enable the feature)

Our SIP server provides unique SIP user information with credentials. With this information, an SIP URL can be formed to connect to a meeting. The convention is sip:<meetingid>@sip.dyte.io.

Once you have the credentials, the simplest way to test the SIP Endpoint is using a SIP Client, you can use clients like Zoiper, Telephone(Mac only), etc.

Now, to connect to a specific Dyte meetingId, you can dial in using SIP with the given username and password and a URI in the format sip:<meetingId>@sip.dyte.io

🎉 That is it, once you dial with the above credentials your SIP call should be bridged with Dyte's WebRTC meeting.

Examples

Integration with Twilio Voice

To connect with Dyte, we are going to use TwiML to perform the SIP dialin.

Guide

Steps to follow

  1. Get a Twilio account. You can go to https://www.twilio.com/try-twilio and create an account
  2. Buy a VOIP number
  3. Configure the VOIP number to use webhook to handle any incoming call

Now, when you get a webhook, you can respond with a TwiML SIP Dial verb with Dyte's SIP configuration

<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>
    <Sip username="<DyteSIPUsername>" password="<DyteSIPPassword>">sip:meetingId@sip.dyte.io</Sip>
</Dial>
</Response>

Express Example

const express = require('express');
const VoiceResponse = require('twilio').twiml.VoiceResponse;
const urlencoded = require('body-parser').urlencoded;

const app = express();

// Parse incoming POST params with Express middleware
app.use(urlencoded({ extended: false }));

// Create a route that will handle Twilio webhook requests, sent as an
// HTTP POST to /voice in our application
app.post('/voice', (request, response) => {
  console.log({ request });
// Use the Twilio Node.js SDK to build an XML response
  const twiml = new VoiceResponse();

  const dial = twiml.dial();
  dial.sip(
    {
      username: '<DyteSIPUsername>',
      password: '<DyteSIPPassword>',
    },
    'sip:<meetingId>@sip.dyte.io'
  );

// Render the response as XML in reply to the webhook request
  response.type('text/xml');
  console.log({ twiml: twiml.toString() });
  response.send(twiml.toString());
});

In conclusion, integrating telephony with video conferencing represents a is a practical development in communication technology, combining the reliability and widespread use of PSTN with the flexibility and modern capabilities of VoIP, WebRTC, and SIP. By bridging these technologies, services like Dyte are enabling more seamless and versatile communication experiences across various sectors, from telehealth to customer service.

This blend of old and new technology not only enhances existing communication methods but also opens the door for innovative applications in the future.

Great! Next, complete checkout for full access to Dyte.
Welcome back! You've successfully signed in.
You've successfully subscribed to Dyte.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.