SIP & Telecom⏱ 9 min read• August 22, 2026• 👁 688 views

SIP Protocol & SIP Trunking Guide: Core Architecture and How It Works

What is Session Initiation Protocol (SIP)? How does SIP Trunking replace traditional PSTN lines? Explore the INVITE, 200 OK, ACK lifecycle and carrier-grade Kamailio & FreeSWITCH architecture.

Published: August 22, 2026

1. What is SIP (Session Initiation Protocol)?

SIP (Session Initiation Protocol) is an application-layer control signaling protocol defined in RFC 3261 used for initiating, maintaining, and terminating real-time communication sessions including voice, video, and messaging.

SIP handles solely the signaling and negotiation, while actual media payloads are transmitted over RTP (Real-time Transport Protocol) and negotiated via SDP (Session Description Protocol).

2. Standard SIP Call Flow

Caller (UAC)                 SIP Proxy (Kamailio)                Callee (UAS)
    |                                 |                               |
    |---- INVITE (with SDP) --------->|                               |
    |<--- 100 Trying -----------------|---- INVITE (with SDP) ------->|
    |                                 |<--- 180 Ringing --------------|
    |<--- 180 Ringing ----------------|                               |
    |                                 |<--- 200 OK (with SDP) --------|
    |<--- 200 OK (with SDP) ----------|                               |
    |---- ACK ----------------------->|---- ACK --------------------->|
    |                                 |                               |
    |<=================== Direct Encrypted SRTP Stream ==============>|
    |                                 |                               |
    |---- BYE ----------------------->|---- BYE --------------------->|
    |<--- 200 OK ---------------------|<--- 200 OK -------------------|
  

3. What is SIP Trunking?

In legacy telephony, connecting an on-premise PBX to the Public Switched Telephone Network (PSTN) required physical T1/E1 PRI lines or copper ISDN circuits. SIP Trunking replaces these legacy connections by streaming VoIP calls directly over standard IP data networks.

Key Benefits of SIP Trunking:

  • Granular Channel Capacity: Scale from 2 to 1,000+ concurrent channels dynamically without physical hardware constraints.
  • Geographic Independence: Maintain national, local DID, or international virtual numbers from any office worldwide.
  • Disaster Recovery: Instant automated failover to alternate data centers or mobile endpoints if connectivity drops.

4. Decoupled Architecture: Kamailio + FreeSWITCH

  1. Kamailio Edge SIP Proxy: High-throughput stateless SIP routing, NAT traversal handling, and DDoS rate-limiting.
  2. FreeSWITCH B2BUA Media Server: Processes call recording, IVR audio menus, transcoding, and WebRTC bridges.
Topics & Tags
#SIP#SIP Trunk#Kamailio#FreeSWITCH#VoIP Architecture#Telecom
Related Articles

Explore Related Topics

All Articles →