Search This Blog

VOIP Technology (SIP, SDP, RTP...), SBC.....................

                                                 Telecom Testing
                                                     |
                      --------------------                ----------------------   
                      Wireline                                     Wireless  
           (Broadband,SS7.....)          (GSM,CDMA,Wi-Fi,3G,4G.......technologies)    


          * VOIP(SIP) Technology  supports both Wireline and Wireless.


VOIP(Voice Over Internet Protocol):

                  It is the internet technology to carry  voice communication and multimedia sessions over Internet protocol networks such as internet.

          The steps involved in originating voip telephone call are signalling and media channel setup,digitization of the analog voice signal, encoding ,packetization and Transmission as Internet protocol packets over a packet switched network. 

              Voip systems employ session control  protocols to control the set-up and tear-down of calls.There are three types of  Voip tools that are commonly used, IP phones, Softphone and Mobile Softphone.

  •     IP Phones: IP Phones are the most institutionally established but still the least obvious of the VOIP tools.
  •     Softphones: It’s use has increased during the global recession as many persons, looking for ways to cut costs have turned to these tools for free or inexpensive calling or video conferencing applications.
              Three classes of software IP: Web calling,voice and video instant messaging and web conferencing.
  •    Mobile Softphone: It is just another example of the adaptability of voip. Voip is available on may smart phones and internet  devices. 
                Voip  has been implemented in various ways using both proprietary and open protocols and standards.

PROTOCOLS:
Ø  H.323
Ø  Ip multimedia subsysem (IMS)
Ø  Media Gateway Control Protocol (MGCP)
Ø  Session Initiation protocol (SIP)
Ø  Real-Time transport protocal  (RTP)
Ø  Session Description Protocol (SDP)
The H.323 protocol was one of the, first viop protocol that found wide spread implementation for long-distance traffic as well as local area  networks. Since development of newer, less complex protocols , such as MGCP and SIP. The sip has gained wide spread voip market penetration. 

•        IETF Standard: Sip, Mgcp .
•        ITU Standard : H.323 ,Megaco .
•       Proprietory : IAX(Internation Asterix) , Sccp(Cisco) .
    SIP and H.323 are signalling protocols.
    Mgcp and Megaco are Media Gateway protocol


Voip Advantages:

1) Cheap calls or Free calls.
2) Low Equipment Cost .
3) Voice,Data,Video and cable,Iptv.
4) Qos (Quality of service).

Voip Dis-Advantages:

1)  Bandwidth.
2)  Electric Power


Voip Protocol Layers:

 SIP Protocol Overview


         
               SIP is signalling protocol used to Initiate,Modify and Tear down the Voice and Video sessions.

             SIP is and application layer protocol (also called Signalling/Text- based protocol). It is designed by IETF. Sip was initially focused on Voice Communication  and later expanded to Video, Instant messaging.....etc. SIP carries media transport through the RTP/ RTCP, SRTP. 

         
SIP MESSAGES

Sip Messages ae divided into two types:

  1. Sip Requests --> sent from client to sever.
  2. Sip Responses -->sent from server to client.

Message Syntax:

        Start line
        Message header
              CRLF- Carriage return line feed.
        Message body(SDP-Session Describestion Protocol ).

Message header:  It provides additional information, regarding requests and responses.

CRLF    : Empty line after header field.

Message body( SDP) : Normally describes the type of session to be established,including a description of media to be exchanged.


Start Line:
    Start line can be request line or status line. Sip Requests start line:
   Syntax: Method Sp Request URISp SIP version
     Ex:  Invite  sip:bob@billoxi.com  sip/2.0

Sip Response start line:
  Syntax:Sip version Sp Response code Sp       Responpharse
 Ex: sip/2.0  200   OK

Message header Syntax:
        
         Via
         To
         From
         Call Id
         C-seq
         Max-forward
         Contact

Message Body Syntax:

          V- Version SDP = 0
          O- Owner  = IPv4
          S- Session name = VOIP
          T- Time= Start and stop time
         M- Media =Audio/ Video
         A- Attributes =Send only/Recv only    
                

  • REQUESTS:   
  1.  Invite: It indicates client is invited to participate in call session.
  2. Ack: It confirms client has received final response to invite request.
  3. Bye: Terminates the call and can be sent by either caller or callee. 
  4. Cancel: Cancels any pending request.
  5. Options: Queries the capabilities of server.
  6. Register: Registers the address listed in to header field with a Sip server.
  7. Prack: Provisional Acknowledgement.
  8. Refer: Asks recipient to issue SIP request.
  9. Notify: Notify the subscriber of a new event.
  10. Subscribe:Subscribes for an event of notification from the notifier.
  11. Info : Sends mid-session information.
  12. Message:Transports instant messages using SIP.
  13. Update: Modifies the state of a session without changing.
  14. Publish: Publish an event to the server.  

  • RESPONSES:

        
       1XX  -  Information Responses
       2XX -   Successful Responses
       3XX  -  Redirection Responses
       4XX -   Client failure Responses
       5XX  -  Server failure Responses
       6XX  -  Global failure Responses

        Examples:
             
       100  -  Trying
       180  -  Ringing
       181  -  Call being forwarded
       183  -  Session in progress
       200  -  Ok
       202  -  Accepted
       301  -  Moved permanently
       302  -  Moved temporarily
       401  -  Unauthorized
       404  -  Not found
       483  -  Too Many Hops
       486  -  Busy here
       407  -  Proxy authentication required
       408  -  Request timeout
       487  -  Request terminated
       491  -  Request pending
       503  -  Service unavailable
             


EXPLANATION OF MESSAGE HEADER Fields:

VIA: It contains the address at which user is expecting to receive response to this  request. 
The Via header field value MUST contain a branch parameter

  • This parameter is used to identify the transaction created by that request.
  • It helps proxies to detect loops.
 The branch parameter value MUST be unique across space and time for all requests sent by the UA. The exceptions to this rule are CANCEL and ACK for non-2xx responses. As discussed below, a CANCEL request will have the same value of the branch parameter as the request it cancels.
* The branch ID inserted by an element always begin with the characters "z9hG4bK". These 7 characters are used as a "Magic cookie"

FROM :It contains display name and SIP URI that indicates the originator of the  request. The From field MUST contain a new "tag" parameter, chosen by the UAC.

TO : It contains the display name and SIP URI towards which request was originally directed. A request outside of a dialog MUST NOT contain a To tag; the tag in the To field of a request identifies the peer of the dialog. Since no dialog is established, no tag is present.

TAG : Tag in 'To' header are of no help since they are not known until response arrive. 
An initial request from a client will contain a From Tag and the subsequent provisional response to it from the server will contain a To Tag.  

  • Tags are used by the UAC to distinguish multiple final responses from different  UAS.

                               
CALL-ID: It contains a globally unique identifier for all requests and responses sent by either UA in a dialog,generated by the combination of random string and IPaddress.Note that when request are retried after certain failure, These retried requests are not considered new requests,and therefore do not need new Call-ID.

* Implementations MAY use the form "loclid@host".
* It provides some protection against session hijacking and reduces.

CALL LEG : The combination of to tag, From tag and call ID is called call leg/peer to  peer  connection.

C- SEQ :It contains an sequence number and method Name. The c-seq is incremented for  each new request.
* It is used to identify and order transactions.

CONTACT :It contains a SIP URI that represents the direct route to contact user.

MAX-FORWARD:It serves to limit the number of hops a request can make on the way to destination. If the Max-Forwards value reaches 0 before the request reaches its destination, it will be rejected with a 483(Too Many Hops) errors response.

CONTENT LENGTH :
It contains an octet(byte) count of the message body.

CALLER ID:It is provided by the From SIP header containing the caller's name and number.

RECORD ROUTE: Record route header is inserted into requests by proxies that want to be in the  path of subsequent request for the same call-id. It is then used by user agent to route subsequent requests.


  SIP ENTITIES:

          
                                              SIP network consists of four types of logical SIP entities. Sip entity  as a client (initiates requests),  and as a server (responds to requests),   or as both. 

Following are the four types of logical SIP entities:

USER AGENT : User Agent (UA) is the endpoint logical entity. User Agents initiate and terminate sessions by exchanging requests and responses. 

User Agent Client (UAC)—    

  •     The client application that initiates SIP requests(Initiates a call).
  •     It lasts only for the duration of that paticular transaction.

User Agent Server (UAS)—      

  •  It generates a response to a  SIP request send by UAC.
  •  It lasts only for the duration of that paticular transaction.
Note: The User Agent initiating a call acts as a UAC when sending the initial SIP request (INVITE) and as a UAS  when it receives a SIP BYE request from the callee.

Some of the devices that can have a UA function in a SIP network are: IP-phones, telephony gateways, call agents, automated answering services.

REGISTRAR SERVER: 
                                      Before endpoints communicate (endpoints are the caller and the callee i.e UA) they should be registered to a SIP entity known as REGISTRAR SERVER. It is a UAS and a logical entity.The endpoint registers to a REGISTRAR Sever and Contact Information of the user specified in the request is updated  at  Location Server.

Location Server is a database of locations of SIP User Agents. 
1)   It is  updated by SIP User Agents by Registration.
2)   It is used by Redirect/Proxy server to obtain information about a callee's possible locations.
3)  DNS query is used to query location service.

Note: In this both To & From address will be same.

REDIRECT SERVER:    Redirect Server is a server that accepts a SIP request and send 3XX Responses with  present location address after quieries with Location sever . Unlike Proxy servers, Redirect Servers do not pass the request on to other servers.

Ex: 302 - Moved Temporarily,301 - Moved Permanently

PROXY SERVER:   
                      A Proxy Server is an intermediary entity that acts as both a server and a client for the purpose of making requests on behalf of other clients.  It also consults database such as DNS and Location Server.

There are two types of poxies: 
Normal Proxy Sever(Sateless):
                      It just forwards the received requests to other end and send responses on behalf of other.It just perform routing logic,send message out.

B2BUA Sever(Statefull):  
                      Proxy interprets, and, if necessary, rewrites a request message before forwarding it. It maintain state during entire transaction.
 Ex: Forward on no reply,Forking.

DNS Server:  It stores address and its corresponding name pairs. If  we send a website name in a request  and it returns exact IP address of it.

SIP Trapezoid:  



                                  Basic SIP Trapezoid
                                         biloxi.com                                              atlanta.com

User A initiates an INVITE request with Request-URI of B(atlanta.com). As invite reaches "biloxi.xom" proxy server it locates the poxy server at "atlanta.com"  possibly by performing a particular type of DNS lookup and find the server that serves UserB. Since proxy is providing "outbound service" it is called Outbound Poxy
           After Invite reaches atlanta.com proxy  server consults database,generically called a location service,that contains the current IP address of UserB.Since proxy is providing "Inbound service" it is called Inbound Poxy

A single proxy can have the logic to act as an 
Outbound/Inbound proxy for a A to B call.




  Difference between H.323&SIP

                                                                
1. H.323 :It is designed by ITU                        
    SIP     :It is designed by IETF.
                             
2.  H.323 : H.323 is limited to conferencing.It define the basic set of funtionality that all devices                                       must support.
     SIP    :  SIP was initially focused ib voice connection and then expanded to video,instant messaging..etc

3.  H.323 : Has defined a number of features to handle failures of N/W entities
     SIP     :  Has not defined for handling device failure. user agent has to send re-Invite.

 4.  H.323 : Encodes messages in a compact binary format.
      SIP     : Sip messages are encoded in ASCIT text format.

 5.  H.323 :  Media transport RTP/RTCP,SRTP.
       SIP     :  Media transport RTP/RTCP, SRTP.

  6. H.323 :  Addressing H.323 support these aliases:
                     * E.164 dialed digits
                     * Transport address
                     * Email address
                     * Party number
       SIP    :  SIP only understand URI- Style addresses.

  7. H.323 :  Call setup :  Setup Connect  Ack
      SIP      :  Call setup :  Invite 200Ok  Ack

  8.  H.323  :  H.323 fully support video and data conferencing.
       SIP      :  SIP has limited support for video and no support for data conferencing.

   9.  H.323 :  H.323 Support any codec standedized or propretory.
        SIP     :  SIP supports IANA registered codec.

  10.  H.323 : Most H.323 entities use a reliable transport for signalling.
         SIP     : Most SIP entities uses an unreliable transport for signalling.

  11.  H.323 : Routing gatekeepers can detect loops by looking at call identifier and destination address.
         SIP     : The via header facilitates detecting loops.

  12 . H.323 : Minimum ports for VOIP call 3  ( call signalling, RTP, RTCP )
         SIP     : Minimum ports for VOIP call 3  ( SIP, RTP, RTCP )


***************************<><><><><><><>***********************************



2 comments:

  1. Thanks for sharing such useful information with us. I hope you will share some more information about VoIP development. Please keep sharing!

    VoIP Development

    ReplyDelete

REST API

  API  is an application programming interface. It is a set of rules that allow programs to talk to each other. The developer creates the AP...