SIP messages and media protocols

SIP messages and media protocols

This section provides an overview of SIP messages and how they communicate information about SIP sessions and how SDP, RTP, and RTCP fits in with SIP communications.

SIP uses clear text messages to start, maintain, and end media sessions between SIP user agent clients (UACs) and user agent servers (UASs). These messages form a SIP dialog. A typical SIP dialog begins with an INVITE request message sent from a UAC to another UAC or to a UAS. The first INVITE request message attempts to start a SIP call and includes information about the sending UAC and the receiving UAC as well as information about the communication session.

If only two UACs are involved as shown below, the receiving UAC (Phone B) responds with a 180 Ringing and then a 200 OK SIP response message that informs Phone A that Phone B received and accepted the request. Phone A then sends an ACK message to notify Phone B that the SIP response was received. Phone A and Phone B can then participate in the RTP media session set up by the SIP messages.

When the phone call is complete, one of the UACs (in the example Phone B) hangs up sending a BYE request message to Phone A. Phone A then sends a 200 OK response to Phone B acknowledging that the session has ended.

 

Basic SIP dialog between two UACs

SIP Phone A (Sending UAC PhoneA@10.31.101.20)

SIP Phone B (Receiving UAC PhoneB@10.31.101.30)

  1. 1. INVITE (SIP request message to invite SIP Phone B to start a SIP session)
  1. 2. 180 Ringing (SIP ringing response to the INVITE request)
  1. 3. 200 OK (SIP response to the INVITE request to inform SIP Phone A that the request is accepted)
  1. 4. ACK (SIP request message to confirm that SIP Phone A received the response from SIP Phone B)
  1. 5. RTP Media session between Phone A and Phone B.
  1. 6. BYE (SIP request message from SIP Phone B to end the SIP session)
  1. 7. 200 OK (SIP response to the BYE request to end the SIP session)

 

If a UAS in the form of a SIP proxy server is involved, similar messages are sent and received, but the proxy server participates as an intermediary in the initial call setup. In the example below the SIP proxy server receives the INVITE request from Phone A and forwards it to Phone B. The proxy server then sends a 100 Trying response to Phone A. Phone B receives the INVITE request and responds with a 180 Ringing and then a 200 OK SIP response message. These messages are received by the proxy server and forwarded to Phone A to notify Phone A that Phone B received and accepted the request. Phone A then sends an ACK message to notify Phone B that the SIP response was received. This response is received by the proxy server and forwarded to Phone B. Phone A and Phone B can then participate in the media session independently of the proxy server.

When the phone call is complete Phone B hangs up sending a BYE request message to Phone A. Phone A then sends a 200 OK response to Phone B acknowledging that the session has ended.

 

Basic SIP dialog between UACs with a SIP proxy server UAS

SIP Phone A (Sending UAC PhoneA@10.31.101.20)

SIP Proxy Server

(UAS

10.31.101.40)

SIP Phone B (Receiving UAC PhoneB@10.31.101.30)

  1. 1. INVITE (SIP request message to invite SIP Phone B to start a SIP session)
  1. 3. 100 Trying (UAS informs Phone A of trying to contact Phone B)
  1. 2. INVITE (Forwarded by the UAS to Phone B)
  1. 5. 180 Ringing (Forwarded by the UAS to Phone A)
  1. 4. 180 Ringing (SIP ringing response to the INVITE request)
  1. 7. 200 OK (Forwarded by the UAS to Phone A)
  1. 6. 200 OK (SIP response to the INVITE request to inform SIP Phone A that the request is accepted)
  1. 8. ACK (SIP request message to confirm that SIP Phone A received the response from SIP Phone B)
  1. 9. RTP Media session between Phone A and Phone B.
  1. 10. BYE (SIP request message from SIP Phone B to end the SIP session)
  1. 11. 200 OK (SIP response to the BYE request to end the SIP session)

The SIP messages include SIP headers that contain names and addresses of Phone A, Phone B and the proxy server. This addressing information is used by the UACs and the proxy server during the call set up.

The SIP message body includes Session Description Protocol (SDP) statements that Phone A and Phone B use to establish the media session. The SDP statements specify the type of media stream to use for the session (for example, audio for SIP phone calls) and the protocol to use for the media stream (usually the Real Time Protocol (RTP) media streaming protocol).

Phone A includes the media session settings that it would like to use for the session in the INVITE message. Phone B includes its response to these media settings in the 200 OK response. Phone A’s ACK response confirms the settings that Phone A and Phone B then use for the media session.

 

Hardware accelerated RTP processing

FortiGate units can offload RTP packet processing to network processor (NP) interfaces. This acceleration greatly enhance the overall throughput and resulting in near speed RTP performance.

This entry was posted in FortiGate, FortiOS, FortiOS 5.4 Handbook on by .

About Mike

Michael Pruett, CISSP has a wide range of cyber-security and network engineering expertise. The plethora of vendors that resell hardware but have zero engineering knowledge resulting in the wrong hardware or configuration being deployed is a major pet peeve of Michael's. This site was started in an effort to spread information while providing the option of quality consulting services at a much lower price than Fortinet Professional Services. Owns PacketLlama.Com (Fortinet Hardware Sales) and Office Of The CISO, LLC (Cybersecurity consulting firm).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.