SIP Trapezoid & SIP Entities
Few basic entities are involved in a SIP framework/network. I will explain few of them and then explain what is a SIP Trapezoid. Each of them plays a crucial role and are enlisted as below:
User Agent (UA)
"It is capable of sending and receiving SIP requests" or "Can initiate or terminate sessions by exchanging requests and responses". User Agent as an application comprises of both a User Agent Client & User Agent Server. It is a logical entity.
Examples: SIP phone, PC/Laptop installed with a SIP client, PDA, mobile phones etc.
User Agent Client (UAC)
a) It is a logical entity.
b) It creates a new Request (initiates a call)
c) Uses a client state machine to send a request.
d) It lasts only for the duration of that particular transaction.
User Agent Server (UAS)
a) Logical Entity.
b) It generates a response to a SIP request send by UAC.
c) Role lasts only for the duration of that 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.
SIP Entities SIP REGISTRAR SERVERNow before endpoints communicate (endpoints are the caller and the callee i.e UA) they should be registered to a SIP entity known as SIP REGISTRAR. It is a UAS and a logical entity.
Lets leave the in-depth details as for now, but just know that an endpoint registers to a REGISTRAR and this particular info is stored in a Location Server. Please refer SIP Interview Questions - Part 2 for more details.
A Location Server is a database of locations of SIP User Agents.
i) It is also a logical entity and periodically updated by SIP User Agents by Registration.
ii) Location Service is used by Redirect/Proxy server to obtain information about a callee's possible locations.
iii) DNS query is used to query location service.
SIP REDIRECT SERVER
a) It helps in locating the target of the request or It pushes routing information for a request back in a response to the client, thus directing the client to contact an alternate set of URIs.
b) It populates the list of alternate locations in a Contact Header in 3xx response.
c) It does not generate a SIP Request of its own.SIP PROXY
a) Its basic role is to forward or route requests on behalf of User Agents. Acts as an intermediary entity.
b) It also consults databases such as DNS, Location Server.
c) It is a logical entity and can act as both a UAC/UAS for the purpose of making requests on behalf of other clients.DNS Server
a) It acts as a directory maintained by a telephone operator.
b) It stores address and its corresponding name pairs. This means you send a website name in a Request and it returns the exact IP address of it or associated with it.
c) Has SRV(Service) Records used to locate Proxy Servers(Inbound).
Fine, till now you know the basics of the above SIP Entities. You know what is a Proxy and what is its role. So you must be now wondering what is an outbound/inbound proxy, as depicted in the SIP Trapezoid. Here it goes ......
Now suppose you want to make a call. Since the call is going out, it can be called as an outbound call. This call is sent to a Proxy which looks up the Request URI (its the address of the callee) in the DNS and then after address resolution sends the call to its destination. Since this Proxy is providing "outbound service" of DNS resolution it is known as an Outbound Proxy.
The destination we got above after address resolution is actually the address of another Proxy. This proxy is a home proxy serving the callee's domain. Its purpose is to contact the Location Service to find where and on which device the callee is registered. After it gets the info from the Location Service it dispatches the call to the callee's registered device. This is an "inbound service" and is thus called an Inbound Proxy.
a) User Agent is always associated with a domain.
b) Proxies are associated with domains or serve one/more domains.
c) A single proxy can have the logic to act as an Outbound/Inbound proxy for a A to B call.
The next topic on is very important as its the soul of SIP signaling. Go through it quickly and then you are almost ready to enter the actual SIP world.Functions Of SIP <== ==> SIP Messages