Networking – Is Viber using TCP for VoIP

firewallnetworkingvibervoip

I'm currently on a guest WiFi where all ports except those for surfing the web (80, 443, 8080) and mailing (25, 110, 143, 465, 587, 993, 995) are blocked (3128 seems to be working too).

I tried to place a FaceTime call on my iPhone but that didn't work, which made me assume that UDP is blocked too. However, the Viber app was able to successfully connect and start a video call with decent quality/lag.

My question is now, is Viber using TCP for VoIP or how is this possible?

Best Answer

Is Viber using TCP for VoIP?

Viber is using UPD and not TCP for VoIP traffic. TCP is used for Text Messaging.

Viber uses RTP (and SRTP when encrypted). RTP is mostly implemented on UDP as it is a real time protocol.

The RTP stream of the audio or audio/video call is converted to SRTP and encrypted via Salsa20 algorithm using the session key.

Source Viber Encryption Overview

The use of both TCP and UDP is confirmed in Viber Communication Security unscramble the scrambled Contents, which used tcpdump to generate .pcap files to analyse the Viber data traffic:

This seemed like a good starting point to get some results so we filtered the data to get a one way voice stream using the following command:

   tshark -r long-call.pcap -w long-call-oneway.pcap udp.dstport == 5243

Here we select only the UDP packets with the destination port for the Viber service so it is only originating voice traffic.

...

Besides the voice calls that Viber enables the user to make, it also allows them to send and receive text messages. This functionality uses some specialized tcp-based protocol to connect to the server and exchange messages. Decoding this stream has not been a priority within this project and there wasn’t any time left to research this further.


What ports does Viber use?

In order for Viber Desktop to run on your computer, the following ports must be open for all addresses for both TCP and UDP:

  • 5242
  • 4244
  • 5243
  • 9785
  • 80
  • 443

Source Opening ports for Viber Desktop