Search This Blog

Tuesday 19 November 2019

SIP ENTITIES

  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.

No comments:

Post a Comment

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...