Saturday, December 02, 2017

What Happens During VoIP Calls

Saturday Stories
December 2, 2017



The work I'm currently doing is about VoIP (Voice Over Internet Protocol), which basically means phone service using the Internet.

When a call is made, it sends an invite to the recipient, which sends an invite response to confirm a connection and a second invite response once the call is picked up. A final acknowledgment is sent by the caller and the connection is complete. All of this happens in just seconds.

A VoIP call goes out in the form of an IP Packet. It comes from the internal IP address to the outside and to the public IP, and travels through the Internet until it reaches the SIP server.

Then the SIP server creates its own IP Packet as a response.

The router settings, specifically the SIP-ALG (Session Initiation Protocol, Application Layer Gateway), can modify the SIP packets which affects the connection, resulting in various issues such calls dropping, calls getting rejected and loss of audio.

In a training presentation, I had visuals to indicate that the internal IP in our example is 192.168.1.20, the public IP is 216.1.1.5 and the IP Packet created by the SIP server is 72.5.5.5.

So, the phone is saying "Send audio to 192.168.1.20." But the SIP server is saying "Send audio to 72.5.5.5." The 192 can send to 72, but the 72 cannot send back, which results in one-way audio.

So why did that happen? The packet came from the originating IP 192.168.1.20.

The packet has changed when it was going from the public IP 216.1.1.5 through NAT (Network Address Translation)

But the actual SIP message and the SDP (Session Description Protocol) which contains media details, has remained the same.

Why did they remain the same? Because the SIP also embeds those information on the packet itself.

So when the receiver is sending back the response, it cannot find the publicly routable IP, so it cannot reach the originating IP.

So what's the solution? You have to disable the SIP-ALG settings on the router then reboot the phone.

How do you do that? Just access the router's web user interface using its IP which is usually found on a sticker on the device itself. You will also see there the default username and password.

No comments: