SIP - Basic Call Flow
The following image shows the basic call flow of a SIP session.
Given below is a step-by-step explanation of the above call flow −
An INVITE request that is sent to a proxy server is responsible for initiating a session.
The proxy server sendsa 100 Trying response immediately to the caller (Alice) to stop the re-transmissions of the INVITE request.
The proxy server searches the address of Bob in the location server. After getting the address, it forwards the INVITE request further.
Thereafter, 180 Ringing (Provisional responses) generated by Bob is returned back to Alice.
A 200 OK response is generated soon after Bob picks the phone up.
Bob receives an ACK from the Alice, once it gets 200 OK.
At the same time, the session gets established and RTP packets (conversations) start flowing from both ends.
After the conversation, any participant (Alice or Bob) can send a BYE request to terminate the session.
BYE reaches directly from Alice to Bob bypassing the proxy server.
Finally, Bob sends a 200 OK response to confirm the BYE and the session is terminated.
In the above basic call flow, three transactions are (marked as 1, 2, 3) available.
The complete call (from INVITE to 200 OK) is known as a Dialog.
How does a proxy help to connect one user with another? Let us find out with the help of the following diagram.
The topology shown in the diagram is known as a SIP trapezoid. The process takes place as follows −
When a caller initiates a call, an INVITE message is sent to the proxy server. Upon receiving the INVITE, the proxy server attempts to resolve the address of the callee with the help of the DNS server.
After getting the next route, caller’s proxy server (Proxy 1, also known as outbound proxy server) forwards the INVITE request to the callee’s proxy server which acts as an inbound proxy server (Proxy 2) for the callee.
The inbound proxy server contacts the location server to get information about the callee’s address where the user registered.
After getting information from the location server, it forwards the call to its destination.
Once the user agents get to know their address, they can bypass the call, i.e., conversations pass directly.