This chapter describes an example of a typical SIP session.
The following graphic shows a typical succession of SIP requests and responses:
Figure 1. SIP session example
Explanation of the example: User A uses his SIP phone to reach the SIP phone of user B. SIP proxy 1 and SIP proxy 2 help to setup the session on behalf of the users. Each message contains a 3-digit-number followed by a name:
- The transaction starts with user A making an INVITE request to user B.
- Since user A doesn't know the exact location of user B in the IP network, user A’s device passes the request through to SIP proxy1. SIP proxy 1 on behalf of user A forwards an INVITE request for user B to SIP proxy 2.
- SIP proxy 1 sends a TRYING response to user A indicating that it is trying to reach user B.
- SIP proxy 2, which knows the location of user B, forwards an INVITE request to user B. (If SIP proxy 2 wouldn’t know the location of user B, it would have forwarded it to another SIP proxy server.)
- After forwarding INVITE 3, SIP proxy 2 issues a TRYING response to SIP proxy 1.
- The SIP phone, upon receiving the INVITE request, starts ringing user B, indicating that a call request has come. User B’s SIP phone sends a RINGING response back to SIP proxy 2.
- SIP proxy 2 forwards the RINGING response to SIP proxy 1.
- SIP proxy 1 forwards the RINGING response to user A.
- User B accepts the incoming call and a "200 OK" response is sent by user B’s phone to SIP proxy 2.
- SIP proxy 2 forwards the "200 OK" response to SIP proxy 1.
- SIP proxy 1 forwards the "200 OK" response to user A.
- User A’s phone sends an ACK message directly to user B’s phone to confirm the setup of the call.
The media exchange takes place between user A’s and user B’s phones. The proxy servers are not involved in the media exchange. The media flow is controlled using protocols different from SIP, for example, RTP (Real-Time Transport Protocol).
Parent topic: SIP Overview