VOIP and its protocols
Voice over Internet Protocol (VoIP), is a technology that allows you to make voice calls using a broadband Internet connection instead of a regular (or analog) phone line. Some VoIP services may only allow you to call other people using the same service, but others may allow you to call anyone who has a telephone number — including local, long distance, mobile, and international numbers.
VoIP uses network technologies in the same manner to how a PC uses IP to transfer packets with data, but VoIP transmits packets having audio/video signal. At the same time, instead of the data protocols such as HTTP, POP3 and IMAP, VoIP uses telecommunications protocols such as SIP, H.323, Inter Asterisk eXchange (IAX) and RTP.
Advantages:
- Cost : Initialization of network and it’s maintenance is lesser than traditional phone system. Furthermore, VOIP service is available at very reasonable price for longer distances, where it is a problem to install traditional phone infrastructure.
- Accessibility : Biggest boon of VOIP is accessibility, means as long as one has an internet connection, communication is possible.
- Flexibility : The bandwidth bottle-necking is less severe in VOIP than plain old telephone service(POTS), which has severe limitations on number of devices that can communicate using telephone lines.
- Voice Quality : Until one has a reliable internet connection, anyone can enjoy experience voice quality that is the equal of, if not better than, a traditional phone connection.
- Automatic Routing: incoming telephone calls are automatically routed to the VOIP phone where ever it’s plug it into the network.
Disadvantages:
- Power Outages/Emergencies : Power outages results in disruption of reliable internet, which further leads to poor voice quality or temporary denial of service.
- Latency : Due to bandwidth requirements, some calls may appear to lag, delay, or disappear altogether. This is because the packets of information need time to reassemble in order for an effective call to be made.
PROTOCOL:::>
- SIP
Session Initiation Protocol (SIP) mostly listens on either TCP or UDP port 5060, even though it could be configured to listen on the desired port. A SIP system has mainly 4 parts:
1) User Agents (UAs): They are applications running on SIP endpoints, such as softphone, mobile phone, wireless device, etc., which act as an interface between users and the SIP networks. UA is called User Agent Client (UAC), when it hold responsibility of managing a SIP request and it acts as User Agent Server (UAS), when it is servicing a request.
2) Directory Servers : SIP devices uses Directory Servers, which provide endpoint addresses that the devices then will contact to in order set up the telephone call. ( These required addresses can be IP address as well as device names which could be translated by internal DNS servers)
3)Registrar Server: These servers authenticates and registers UAs when they come online and stores information such as IP addresses and URIs.
4) Proxy Server: it forwards traffic to and from UA taking SIP requests. It’s involved only in the setup and tear-down of a communication session.
4.a)Stateless proxy
A stateless proxy is the most basic type of proxy. It knows nothing about the overall state of a call and just processes each individual SIP packet in isolation.
4.b) Transaction stateful proxy
By contrast a stateful proxy does store and maintain state. It does hold the state about each transaction but only for the pending request. It promotes better and faster processing of packets and is considered more robust for complex and clustered environment.
SIP protocol is highly analogous to HTTP, they both use request messages to establish a connection between clients and return response message in form of numeric codes like 100 Continue etc, to show status and result of the request message.
Some basic standard numeric code response message are as follows:
• 1xx: provisional, searching, ringing and queuing. An Examples of these messages is ‘180 Ringing’;
• 2xx: success. An example is the message is ‘200 OK’;
• 3xx: redirection and forwarding. An examples is message ‘301 Moved Permanently’;
• 4xx: request failure for client mistakes. The messages ‘400 Bad Request’ and ‘408 Request Time-Out’ are two examples of these messages;
• 5xx: server failures.
• 6xx: global failure such as busy, refusal, not available.
There are mainly 5 types of request messages:
- A client sends an INVITE request to invite another client to participate in a multimedia session. The INVITE request body usually contains the description of the session
- REGISTER request is used in order to register a UA with a Registrar Server. This request is sent by an UA to a Registrar Server belonging to the domain (the Registrar Servers registers all the UA within the domain). It is also used by Proxy Servers in order to route calls.
- ACK method is sent from one UA to another in order to confirm receipt of a message. The ACK indicates that the handshake was completed between two UAs and the call can start.
- CANCEL message cancels an existing INVITE message. An UA can send a CANCEL request to terminate a previous valid one.
- BYE request from either end of the SIP session terminates the session.
OPTIONS method is used to list the capabilities and supported methods of a UA or Proxy Server. Thus, when OPTIONS is sent from a UA to a Proxy server, the Proxy server can respond with a list of supported methods.
Other lesser used request messages:
REGISTER : A client sends a REGISTER request to a SIP registrar server with information about the current location (IP address and so on) of the client.
Info : For distributing mid-session signaling information along the signaling path for a SIP call.
Subscribe : For requesting the current state and state updates of a remote node.
Notify: Informs clients and servers of changes in state in the SIP network.
Refer : Refers the recipient (identified by the Request-URI) to a third party according to the contact information in the request.
Sequence of Communication between two UAC called A@mycompany.com and B@hercompany.com using SIP through a proxy server.
1) UAC ( A@mycompany.com ) sends INVITE to its own proxy server, the proxy server finds address of the destination client’s proxy server through DNS lookup. Then UAC’s proxy server forwards request to UAS’s proxy server. The UAS’s proxy server look for the receivers contact( B@hercompany.com ) in the database of Registrar. (like host@ 10.0.1.100) The UAS’s proxy will then forward request to the found address.
2) UA Server (UAS) at host@10.0.1.100 will ask to receiver if he wants to take the incoming call. Now, receiver telephone is ringing.
3) Now the user B@hercompany.com acceptance go back through the Proxy belonging of hercompany.com , which forwards it to the Proxy belonging to mycompany.com, which finally forwards it to A’s UAC.
4) A@mycompany.com UAC will respond to the acceptance with an ACK directly sent to B@hercompany.com UAC. It’s telling to B that A is ready to talk.
5) At the end of the conversation, B hangs up the phone and in this way the UAC sends a BYE message directly to A’s UAC.
6) Finally A’s UAC responds with a 200-OK message directly to B’s UA, which ends the session.
Next part of these blogs will cover rest of the protocols used by VOIP