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
- Kamailio Edge SIP Proxy: High-throughput stateless SIP routing, NAT traversal handling, and DDoS rate-limiting.
- FreeSWITCH B2BUA Media Server: Processes call recording, IVR audio menus, transcoding, and WebRTC bridges.