SIP - Session Initiation Protocol ====================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is SIP?** SIP stands for Session Initiation Protocol. It is a signaling protocol used to initiate, maintain, and terminate real-time communication sessions over IP networks. These sessions can include voice calls, video calls, messaging, and other multimedia services. SIP is a text-based protocol similar to HTTP and SMTP and is widely used in VoIP (Voice over IP) systems. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is SIP useful?** * **Session control** – Handles call setup, management, and teardown between endpoints. * **Flexibility** – Supports voice, video, messaging, and presence information. * **Scalability** – Works across small peer-to-peer setups to large-scale enterprise systems. * **Interoperability** – Open standard supported by many vendors and platforms. * **Mobility** – Enables users to maintain the same identity across different devices and networks. * **Integration** – Works with other protocols like RTP (for media transport) and SDP (for session description). .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * **Session Initiation** – A SIP client sends an `INVITE` request to start a session. * **Session Negotiation** – SIP uses SDP (Session Description Protocol) to negotiate media parameters. * **Session Establishment** – Media session is created using RTP (Real-time Transport Protocol). * **Session Management** – SIP handles transfers, hold, and modifications using messages like `RE-INVITE`. * **Session Termination** – A `BYE` request is sent by either party to end the session. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is SIP used?** * **VoIP services** – Core protocol in services like Skype, Zoom, and enterprise telephony. * **IP PBX systems** – Used in business phone systems for both internal and external calls. * **Mobile VoIP apps** – Apps like Linphone, Zoiper, and Bria use SIP for internet-based calls. * **Unified Communications** – Integrates voice, video, messaging, and presence (e.g., Teams, Webex). * **Call centers** – Enables flexible call routing and communication management. * **Emergency services (E911)** – Used in next-gen emergency communication infrastructure. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI Layer does SIP operate at?** * SIP operates at the **Application Layer (Layer 7)** of the OSI model. * It manages session control logic for initiating, maintaining, and terminating communications. * SIP works directly with user-facing applications like softphones and VoIP clients. * It defines structured signaling messages such as `INVITE`, `ACK`, `BYE`, and `REGISTER`. * SIP integrates with SDP and RTP, but its signaling responsibilities stay at Layer 7. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`SIP Version&RFC Details ` * :ref:`SIP Basic Setup on Ubuntu using IPv4 ` * :ref:`SIP Basic Setup on Ubuntu using IPv6 ` * :ref:`SIP Protocol Packet Details ` * :ref:`SIP Usecases ` * :ref:`SIP Basic Features ` * :ref:`SIP Feature : Text-Based Protocol ` * :ref:`SIP Feature : Session Control ` * :ref:`SIP Feature : Transport Independent ` * :ref:`SIP Feature : Addressing via URI ` * :ref:`SIP Feature : Support for Mobility ` * :ref:`SIP Feature : Extensible Architecture ` * :ref:`SIP Feature : Integration with Other Protocols ` * :ref:`SIP Feature : Proxy and Redirect Support ` * :ref:`SIP Feature : Presence and Messaging ` * :ref:`SIP Feature : Security Support ` * :ref:`Reference links ` .. _SIP_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _SIP_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _SIP_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _SIP_step5: .. tab-set:: .. tab-item:: SIP Version&RFC Details .. csv-table:: :file: ./SIP/sip_rfc_details.csv :widths: 10,10,10,30 :header-rows: 1 .. _SIP_step20: .. tab-set:: .. tab-item:: SIP Basic Setup on Ubuntu using IPv4 * Setup .. _SIP_step21: .. tab-set:: .. tab-item:: SIP Basic Setup on Ubuntu using IPv6 * Setup .. _SIP_step6: .. tab-set:: .. tab-item:: SIP Protocol Packet Details **SIP INVITE Packet** .. csv-table:: :file: ./SIP/sip_packet1_details.csv :widths: 10,20,30,10 :header-rows: 1 **SIP ACK Packet** .. csv-table:: :file: ./SIP/sip_packet2_details.csv :widths: 10,20,30,10 :header-rows: 1 **SIP BYE Packet** .. csv-table:: :file: ./SIP/sip_packet3_details.csv :widths: 10,20,30,10 :header-rows: 1 **SIP REGISTER Packet** .. csv-table:: :file: ./SIP/sip_packet4_details.csv :widths: 10,20,30,10 :header-rows: 1 **SIP OPTIONS Packet** .. csv-table:: :file: ./SIP/sip_packet5_details.csv :widths: 10,20,30,10 :header-rows: 1 **SIP CANCEL Packet** .. csv-table:: :file: ./SIP/sip_packet6_details.csv :widths: 10,20,30,10 :header-rows: 1 **SIP Response Packet** .. csv-table:: :file: ./SIP/sip_packet7_details.csv :widths: 10,20,30,10 :header-rows: 1 .. _SIP_step7: .. tab-set:: .. tab-item:: SIP Usecases .. csv-table:: :file: ./SIP/sip_usecases.csv :widths: 10,20,30 :header-rows: 1 .. _SIP_step8: .. tab-set:: .. tab-item:: SIP Basic Features .. csv-table:: :file: ./SIP/sip_features.csv :widths: 10,10,30 :header-rows: 1 .. _SIP_step9: .. tab-set:: .. tab-item:: SIP Feature : Text-Based Protocol **Text-Based Protocol - Testcases** .. csv-table:: :file: ./SIP/sip_feature1_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SIP_step10: .. tab-set:: .. tab-item:: SIP Feature : Session Control **Session Control - Testcases** .. csv-table:: :file: ./SIP/sip_feature2_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SIP_step11: .. tab-set:: .. tab-item:: SIP Feature : Transport Independent **Transport Independent - Testcases** .. csv-table:: :file: ./SIP/sip_feature3_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SIP_step12: .. tab-set:: .. tab-item:: SIP Feature : Addressing via URI **Addressing via URI - Testcases** .. csv-table:: :file: ./SIP/sip_feature4_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SIP_step13: .. tab-set:: .. tab-item:: SIP Feature : Support for Mobility **Support for Mobility - Testcases** .. csv-table:: :file: ./SIP/sip_feature5_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SIP_step14: .. tab-set:: .. tab-item:: SIP Feature : Extensible Architecture **Extensible Architecture - Testcases** .. csv-table:: :file: ./SIP/sip_feature6_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SIP_step15: .. tab-set:: .. tab-item:: SIP Feature : Integration with Other Protocols **Integration with Other Protocols - Testcases** .. csv-table:: :file: ./SIP/sip_feature7_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SIP_step16: .. tab-set:: .. tab-item:: SIP Feature : Proxy and Redirect Support **Proxy and Redirect Support - Testcases** .. csv-table:: :file: ./SIP/sip_feature8_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SIP_step17: .. tab-set:: .. tab-item:: SIP Feature : Presence and Messaging **Presence and Messaging - Testcases** .. csv-table:: :file: ./SIP/sip_feature9_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SIP_step18: .. tab-set:: .. tab-item:: SIP Feature : Security Support **Security Support - Testcases** .. csv-table:: :file: ./SIP/sip_feature10_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SIP_step19: .. tab-set:: .. tab-item:: Reference links * Reference links