How does a VoIP call work?
So how does VoIP work? VoIP is largely dependent on a protocol called SIP (Session Initiation Protocol). The idea behind SIP is to provide a simple, lightweight means for creating and ending connections for real-time interactive communications over IP networks -- mainly for voice, but also for videoconferencing, chat, gaming or even application sharing. In other words, the protocol initiates call setup, routing, authentication and other communication features to endpoints within an IP domain.
VoIP is quite similar to e-mail. That is, you have the Internet, a server and a client. If users want to check their e-mail they would have to register with their e-mail server and download mail from that server. If they send an e-mail that also goes via that mail server. Nor do users have to be tied to one location -- they can send and receive mail while travelling. As long as they can connect to the Internet, they can use the service.
VoIP is exactly like that. There is a server, in this case a SIP proxy server or a softswitch. These are both the same -- software applications running on general purpose computing. In the first instance, the client (ATA, VoIP phone or soft phone) will register with a user's SIP server. From then on, when a caller picks up the phone to make a phone call, because the ATA has a current registration, there will be dial tone.
This works because the first thing an ATA does when it boots up is get a DHCP address so it has an address on the Internet, and then the DHCP server points to a DNS server on the Internet and it will use that to resolve this unique server and it will register with the service provider to say "hey, I am alive".
As a plug-and-play experience, this whole DHCP event is important. For most ATAs on the market, users do not need a computer to make it work. All that is required is for the ATA to be powered up from the wall and plugged into a phone.
At the boot-up process, the ATA sends a SIP message (an invite) to the SIP register (softswitch) which is maintained by a user's VoIP service provider. The softswitch says "OK". From then on, there is a two-way communication which happens every 60 seconds, in much the same way as a heartbeat. The softswitch does a lot. It is constantly listening to thousands of people, even if they are not making calls.
VoIP service providers usually charge by the minute. Ensuring a call is routed efficiently and cheaply also lies with the softswitch.
Once the softswitch determines where the subscriber is, it does a thing called Least Cost Routing (LCR). It works out the least-cost path to get to its endpoint by using algorithms inside the softswitch and by provisioning. Provisioning is the process of entering subscriber information into the softswitch. This is used by the LCR algorithms, so really it's the softswitch's knowledge of the network that allows it to do LCR. For example, if someone dials Europe from a Sydney suburb, it will state the best path to that final destination. All of this is transparent to the end user.
Once the softswitch finds the least cost and sends it on to the gateway (also owned by the VoIP service provider), that gateway will do an IP to TDM (Time Division Multiplexing is the language of the POTS) conversion. It will then send it on to the PSTN via a protocol called SS7, which is the signalling system for the PSTN. In other words, SS7 is the language which telcos use to talk to each other. Once in the PSTN "cloud" it will eventually be routed to a phone number and that phone will then ring.