SIP and SDP: Complete Guide

The SIP and SDP: Complete Guide course — RFC 3261, SDP, B2BUA/SBC, Kamailio, Asterisk and FreeSWITCH
150 lessons · 16 labs · project
4 practicums · 30 troubleshooting cases
After the Voice over IP: Codecs, RTP, DTMF and Quality course
Individual
Per month 300 AZN
Group
Per month 200 AZN
Paying for the full course in a group
15% discount
Installments
50/50
Subscription
from 100 AZN a month
SIP (RFC 3261) is the core signaling protocol of modern IP telephony, enterprise PBXs, carrier trunks, IMS, VoLTE and VoNR networks. This course dissects SIP and SDP line by line: UA/UAC/UAS roles, stateless and stateful proxies (forking), Registrars, Redirect servers, B2BUA and SBCs, SIP URI, SIPS and tel URI (+E.164, user=phone); every header (Via/branch/rport, From/To/tag, Call-ID, CSeq, Contact, Max-Forwards, Route/Record-Route/lr, Authorization, PAI/Privacy, Diversion/History-Info); client and server transactions, timers A–K (why calls drop at 32 seconds) and dialogs; all SIP methods (REGISTER, INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK/100rel, UPDATE, INFO, MESSAGE, SUBSCRIBE/NOTIFY, REFER/Replaces, PUBLISH) and 1xx–6xx response codes; SDP (RFC 8866) and the Offer/Answer model (RFC 3264); NAT traversal, STUN/TURN/ICE, DNS NAPTR/SRV server discovery (RFC 3263), TLS/SRTP security, STIR/SHAKEN (RFC 8224) and SIPp load testing. All labs run on Docker testbeds (Kamailio, Asterisk, FreeSWITCH, baresip/pjsua, SIPp, Wireshark).

Enrollment for a new group is open — send a request to reserve your seat

Lessons are taught live in Azerbaijani and Russian.

Or study on your own in your personal account → with a subscription from 100 AZN a month

Before you start

Complete IP Networks for Telecom Engineers and Voice over IP: Codecs, RTP, DTMF and Quality first: UDP/TCP/TLS transport, DNS SRV/NAPTR records, NAT behavior, audio codecs (G.711, G.729, AMR, Opus), RTP/RTCP, RFC 4733 DTMF events, SRTP encryption, T.38 fax and Wireshark are used here without repeating the explanation.

How the course works

One topic, one lesson: interactive slides, call-flow ladder diagrams and animations, exercises with answer checking, and study notes in three languages (az, ru, en). Each lesson includes a worked example, a “What can go wrong and how to find it” section, practice and a self-check. 16 hands-on labs run on Docker testbeds with live Kamailio, Asterisk, FreeSWITCH, SIPp and Wireshark captures.

Course outline

01

SIP fundamentals

  • what SIP is, history and RFC 3261
  • text-based request-response model
  • UA/UAC/UAS, stateless and stateful proxies (forking)
  • registrar and location service
  • redirect server, B2BUA and SBC
  • SIP URI, SIPS, tel URI and +E.164 number formats
02

The SIP message line by line

  • Request-Line and Status-Line
  • Via (branch, received, rport)
  • From and To (tag), Call-ID
  • CSeq, Contact (expires)
  • Max-Forwards (483), Route and Record-Route (lr)
  • Content-Type/Length (multipart)
  • Allow/Supported/Require (420)
  • WWW/Proxy-Authenticate
  • PAI/PPI/Privacy, Diversion and History-Info
03

Transactions and dialogs

  • client and server transactions
  • INVITE and non-INVITE transactions
  • ACK for non-2xx responses
  • timers T1/T2 and A/B/E/F/H (where the 32-second timeout comes from)
  • dialog ID (Call-ID + tags)
  • route set and early dialogs
04

SIP methods

  • REGISTER, INVITE, ACK (for 2xx and error responses)
  • BYE, CANCEL and 487, OPTIONS (keepalive)
  • PRACK and 100rel (RFC 3262)
  • UPDATE (RFC 3311), INFO and DTMF (RFC 6086)
  • MESSAGE (RFC 3428), SUBSCRIBE/NOTIFY (RFC 6665)
  • REFER (RFC 3515) and Replaces (RFC 3891), PUBLISH (RFC 3903)
05

SIP responses

  • 1xx (100, 180, 181, 182, 183)
  • 2xx (200 OK, 202), 3xx (301, 302, 305, 380)
  • 4xx authentication (401, 403, 407)
  • 4xx routing (404, 408, 410, 480, 484, 486, 487)
  • 4xx media and extensions (415, 420, 422, 481, 488, 491)
  • 5xx and 6xx (500, 503 with Retry-After, 504, 600, 603, 604, 606)
06

SIP lab testbed

  • Kamailio, Asterisk, FreeSWITCH
  • baresip/pjsua and SIPp; spinning up the Docker testbed
  • capturing REGISTER (401/200)
  • basic call flow (INVITE/200/ACK/BYE) and call cancel/busy (CANCEL/487/486)
07

SDP complete guide

  • line format (v=, o=, s=, t=, c=, m=)
  • a=rtpmap and a=fmtp (AMR, telephone-event)
  • direction attributes (sendrecv/sendonly/recvonly/inactive)
  • ptime/maxptime, b=AS/TIAS/RS/RR
  • RFC 3264 Offer/Answer rules
  • codec negotiation, hold/resume via re-INVITE
  • multiple media streams
  • ICE candidates and SRTP keys (SDES and DTLS-SRTP)
08

Call scenarios

  • Digest registration and refresh
  • direct and proxy-routed calls (Record-Route)
  • parallel and sequential forking
  • 183 and early media, blind and attended call transfer
  • hold and conferencing, Session Timers (RFC 4028)
  • DTMF method selection, T.38 re-INVITE
  • video calls, SIMPLE presence/IM and 6 hands-on labs
09

Transport, NAT, SBC and scaling

  • SIP over UDP/TCP/TLS, server discovery via NAPTR → SRV → A/AAAA (RFC 3263)
  • how NAT breaks Via/Contact/SDP and traversal solutions (STUN/TURN/ICE, SIP Outbound RFC 5626)
  • SBC functions and header manipulation
  • SIP trunks, load balancing (dispatcher)
  • high availability, SIP over WebSocket (RFC 7118) and 3 hands-on labs
10

Security and identity

  • SIP over TLS (SIPS, port 5061) and TLS+SRTP lab
  • threats (scanning, brute force, toll fraud)
  • protection (ACLs, rate limiting)
  • IRSF and wangiri fraud detection
  • caller ID trust (From, PAI, Privacy) and STIR/SHAKEN (Identity, PASSporT)
11

Testing, accounting and troubleshooting

  • SIPp scenarios and load testing (with hands-on lab)
  • CDR call accounting and billing in SIP networks
  • systematic troubleshooting in Wireshark (SIP Flows, VoIP Calls)
12

Problems, solutions and final project

30 real-world troubleshooting cases (infinite 401 loop, 403, 404, 408 from MTU and DNS SRV, 32-second call drop, 481, 488, 491 glare, one-way audio, missing ringback and early media, 420 100rel, session timer drop, silent hold, transfer failure, wrong caller ID, NAT, TLS, 407, 483 loop, DTMF, T.38, toll fraud) and a carrier SIP network design project

How do we teach?

Learning stages

01

Webinar

Students join the lesson live. At the end of each lesson, students are sent a video recording of the class.

02

Homework

Every assignment is based on the topic covered in the webinar. Homework helps you reinforce the material and understand it better.

03

Working with a mentor

The teacher stays in touch with the group both during the course and outside class. Any questions get answered right away.

04

Portfolio

During the course you'll complete several projects on different topics — they'll show employers what you can do.

Self-paced learning

The full curriculum in your personal account

151 topics with theory, examples and practice. The first 4 are free, the rest come with a subscription. Interactive lessons with slides and coding trainers: 150.

SIP fundamentals10 topics
  1. What SIP is: history, role in VoIP architecture, RFC 3261 and applications
  2. Text-based request-response format: SIP message syntax and similarity to HTTP
  3. User Agents: User Agent architecture, UAC client and UAS server
  4. SIP Proxy server: routing principles, stateless vs stateful modes, call forking
  5. Registrar and Location Service: binding AOR to Contact address in Location Service
  6. Redirect server: Redirect Server use cases and 3xx class responses
  7. B2BUA and Session Border Controller: splitting signaling and media paths on an SBC
  8. Uniform Resource Identifier SIP URI: structure, sips scheme, host and transport parameters
  9. tel URI identifier: RFC 3966 format, global E.164 phone numbers and local contexts
  10. Phone number formats in SIP: international +E.164 format, user=phone and ENUM routing
The SIP message: line by line16 topics
  1. SIP Request-Line: structure, Request-URI and SIP version specification
  2. SIP Status-Line: structure, status code classes and Reason-Phrase
  3. Via header: path tracing, branch parameter, magic cookie, received and rport mechanism
  4. From and To headers: logical call parties, tag parameter and dialog identification
  5. Call-ID header: globally unique call identifier, syntax and security aspects
  6. CSeq header: command sequence number, method pairing and retransmission filtering
  7. Contact header: direct routing address, expires, q-value and sip.instance parameters
  8. Max-Forwards header: loop protection, hop counter decrement and 483 Too Many Hops
  9. Route and Record-Route headers: loose routing (lr), strict routing and route set
  10. Content headers: Content-Type, Content-Length, multipart/mixed MIME and body transport
  11. Capability negotiation: Allow, Supported, Require, Unsupported headers and 420 Bad Extension
  12. Authentication headers: WWW-Authenticate, Authorization, Proxy-Authenticate and Digest auth
  13. Identity and privacy headers: P-Asserted-Identity, P-Preferred-Identity and Privacy header
  14. Call forwarding history: Diversion header, standard History-Info and redirect reasons
  15. Auxiliary headers: User-Agent, Server, Date, Expires, Reason (Q.850) and Warning
  16. Practicum: building a valid SIP request and troubleshooting message syntax errors
Transactions and dialogs7 topics
  1. SIP transactions: client and server transaction finite state machines (FSM)
  2. INVITE transaction: three-way handshake, ACK for 2xx vs ACK for error responses
  3. Non-INVITE transactions: handling REGISTER, BYE, OPTIONS and two-way exchange without ACK
  4. SIP timers: T1 and T2 bases, timers A, B, D, F, H and the origin of the 32 seconds rule
  5. SIP dialogs: Call-ID and tags triplet, route set, CSeq sequencing and Remote Target
  6. Early dialogs: provisional 1xx responses with To-tag and multiple early dialogs in forking
  7. Practicum: pcap trace analysis, extracting transactions, identifying dialogs and timers
SIP methods13 topics
  1. REGISTER method: binding AOR to Contact, registration refresh and unregister via Expires: 0
  2. INVITE method: session initiation, SDP offer transport and in-dialog re-INVITE
  3. ACK method: acknowledging 2xx success, error acknowledgment and no-response nature
  4. BYE method: graceful termination of confirmed dialog, directionality and media release
  5. CANCEL method: canceling a pending request, 487 Request Terminated and race conditions
  6. OPTIONS method: querying node capabilities, keepalive mechanism and trunk monitoring
  7. PRACK method and 100rel: reliable provisional responses, RSeq and RAck headers (RFC 3262)
  8. UPDATE method: session modification before answer and QoS preconditions (RFC 3311)
  9. INFO method: mid-dialog signaling, Info-Package framework and DTMF via INFO (RFC 6086)
  10. MESSAGE method: page-mode instant messaging outside dialog and SMS gateways (RFC 3428)
  11. SUBSCRIBE and NOTIFY: event framework (RFC 6665), reg, presence, dialog and mwi packages
  12. REFER method and Replaces header: call transfer, Refer-To and dialog replacement (RFC 3515, 3891)
  13. PUBLISH method: publishing event state to ESC, SIP-ETag and SIP-If-Match headers (RFC 3903)
SIP responses8 topics
  1. Provisional 1xx responses: 100 Trying, 180 Ringing, 181, 182 and 183 Session Progress
  2. Successful 2xx responses: semantics of 200 OK, 202 Accepted and async request processing
  3. Redirection 3xx responses: 301, 302 Moved Temporarily, 305 Use Proxy and 380 Alternative Service
  4. Authentication 4xx errors: 401 Unauthorized, 403 Forbidden and 407 Proxy Authentication
  5. Routing 4xx errors: 404 Not Found, 408 Request Timeout, 480, 484, 486 Busy Here and 487
  6. Media and dialog 4xx errors: 415, 420 Bad Extension, 422, 481, 488 Not Acceptable and 491 Glare
  7. Server and global failures: 500, 503 with Retry-After, 504, 600, 603 Decline and 606 Not Acceptable
  8. Practicum: root cause diagnosis by SIP status code, Q.850 mapping and UA action selection
SIP lab testbed6 topics
  1. Track testbeds: how they work, how to start them, where to capture container traffic
  2. SIP lab tools: roles of Kamailio, Asterisk, FreeSWITCH, baresip, SIPp and sngrep
  3. Lab: deploying SIP testbed in Docker — Kamailio, Asterisk and softphone endpoints
  4. Lab: capturing SIP REGISTER traffic, inspecting 401 Unauthorized, 200 OK and digest auth
  5. Lab: basic call analysis — INVITE transactions, dialog state, RTP streaming and BYE
  6. Lab: call cancellation and busy status — capturing CANCEL, 487 Terminated and 486 Busy Here
SDP: complete guide16 topics
  1. SDP introduction: role of media session description, RFC 4566/8866 and <type>=<value> syntax
  2. SDP session-level lines: version v=, origin o= (sess-id, sess-version), session name s= and time t=
  3. Connection data line c=: network type, address type, IP at session level and media level
  4. Media announcement line m=: media type, port, transport protocol and payload type (PT) list
  5. Format attributes: codec mapping a=rtpmap and format parameters a=fmtp (AMR, telephone-event)
  6. Media stream directionality: a=sendrecv, a=sendonly, a=recvonly, a=inactive and call hold
  7. Packetization timing: a=ptime and a=maxptime attributes, trade-off between delay and overhead
  8. Bandwidth modifiers: b=AS, b=TIAS lines and RTCP bandwidth allocation via b=RS/RR
  9. RFC 3264 Offer/Answer model rules: m-line count and ordering, rejecting with port 0 and session update
  10. Codec negotiation: dynamic PT allocation, asymmetric codecs and DTMF telephone-event matching
  11. Call hold and resume: re-INVITE, sendonly/inactive modes, o= version increment and c=0.0.0.0
  12. Multiple media streams: audio and video, stream rejection and BUNDLE multiplexing (RFC 8843)
  13. ICE in SDP: a=candidate attributes, host, srflx, relay types and ufrag/pwd credentials
  14. Media security in SDP: SRTP keys via a=crypto (SDES) and certificates via a=fingerprint (DTLS-SRTP)
  15. Lab: configuring endpoint codec preference, capturing SDP negotiation and triggering 488 error
  16. Practicum: constructing complete SDP offer and answer documents for various call scenarios
Call scenarios19 topics
  1. Digest authentication registration: realm, nonce, response calculation and qop security
  2. Registration refresh and unregister: periodic refresh, NAT keepalive and Expires: 0 rule
  3. Direct UA-to-UA call: peer-to-peer signaling without intermediate servers and direct RTP
  4. Call via SIP proxy: Record-Route insertion, Via stack and in-dialog request routing
  5. Call forking: parallel and serial forking, 200 OK race condition and CANCEL termination
  6. Early media signaling: 183 Session Progress, SDP negotiation and inband network tones
  7. Call transfer: blind transfer, attended transfer, REFER method and Replaces header
  8. Call hold and conference: re-INVITE, consultation call and 3-way conference setup
  9. Session Timers: Session-Expires, Min-SE, 422 response and zombie call cleanup (RFC 4028)
  10. DTMF methods in SIP: comparing inband audio, RFC 4733 telephone-event and SIP INFO
  11. Switching to T.38 fax via re-INVITE: m=image announcement, UDPTL stack vs pass-through
  12. SIP video calls: audio and video stream negotiation, RTCP PLI/FIR keyframe recovery
  13. Presence and messaging in SIMPLE: SUBSCRIBE/NOTIFY, PUBLISH, PIDF format and dialog-info
  14. Lab: Kamailio as stateful proxy — Record-Route analysis and in-dialog request path
  15. Lab: call hold and transfer — capturing re-INVITE, REFER and Replaces on the testbed
  16. Lab: DTMF modes in Asterisk — testing RFC 4733, INFO and inband audio on the testbed
  17. Lab: reliable provisional responses — testing 100rel, PRACK and UPDATE on the testbed
  18. Lab: configuring session timers in Asterisk, re-INVITE keepalive and 422 response
  19. Lab: T.38 fax between two Asterisk servers — capturing re-INVITE and UDPTL traffic
Transport, NAT, SBC and scaling14 topics
  1. SIP transport layer: UDP, TCP, TLS, MTU limits and switching to TCP at 1300 bytes
  2. Locating SIP servers (RFC 3263): DNS NAPTR resolution, SRV records and A/AAAA fallback
  3. NAT traversal issues in SIP: private IPs in Via, Contact and SDP c=, one-way audio
  4. NAT traversal techniques: signaling keepalive, STUN, TURN, ICE architecture and rport (RFC 3581)
  5. SIP Outbound mechanism (RFC 5626): flow tokens, reg-id, instance-id and persistent connections
  6. SBC functions: topology hiding, media anchoring, transcoding and DoS protection
  7. Header manipulation on SBC: normalization rules, regex rewriting and Privacy enforcement
  8. SIP trunking: registration-based vs static IP trunks, E.164 numbering and channel capacity
  9. SIP load balancing: Call-ID hashing, weights, dispatcher module and OPTIONS health checks
  10. High availability (HA): DNS SRV failover, virtual IP with VRRP, active-standby and state sync
  11. SIP over WebSocket (RFC 7118): WS/WSS transport, in-browser calling and WebRTC gateways
  12. Lab: softphone behind NAT — troubleshooting issues, configuring nathelper and rtpengine
  13. Lab: Asterisk-to-Asterisk SIP trunk — static IP authentication, routing and caller ID
  14. Lab: load balancing in Kamailio using dispatcher module across Asterisk media servers
Security and identity7 topics
  1. SIP over TLS: SIPS scheme, port 5061, X.509 certificates and mutual TLS (mTLS) authentication
  2. Lab: TLS and SRTP configuration on the testbed — certificate generation and encryption
  3. SIP security threats: automated scanners, password brute-force, flood attacks and hijack
  4. SIP protection strategies: ACL filtering, rate limiting (pike module), fail2ban and hardening
  5. Fraud detection: IRSF schemes, wangiri attacks, traffic spikes and CDR anomaly triggers
  6. Caller ID handling: From, P-Asserted-Identity, Remote-Party-ID headers and trust domains
  7. STIR/SHAKEN framework: cryptographic Identity header, PASSporT JWT tokens and A, B, C attestation
Testing, accounting and troubleshooting4 topics
  1. SIPp testing tool: architecture, embedded XML scenarios (uac, uas), variables and CPS load
  2. Lab: authoring custom SIPp XML scenarios — digest auth, call flow with PCAP play and errors
  3. Call accounting and billing in SIP: CDR structure, timestamps, Q.850 Reason and RADIUS
  4. Wireshark troubleshooting: SIP Flows, VoIP Calls, RTP stream analysis and 5-step method
Problems and solutions31 topics
  1. Case study: infinite 401 Unauthorized loop — wrong password, realm mismatch and stale nonce
  2. Case study: 403 Forbidden on registration — IP network ACL restriction and disabled account
  3. Case study: 404 Not Found error — missing route, dialplan failure and number normalization
  4. Case study: 408 Request Timeout due to MTU fragmentation of large INVITE over UDP
  5. Case study: 408 Timeout via DNS SRV — dead primary server and delayed failover to backup
  6. Case study: call drop at exactly 32 seconds — 200 OK retransmissions and missing ACK
  7. Case study: 481 Call/Transaction Does Not Exist on BYE or re-INVITE — dialog context loss
  8. Case study: 488 Not Acceptable Here — codec mismatch in SDP offer/answer and transcoding failure
  9. Case study: 491 Request Pending glare collision on simultaneous re-INVITEs and backoff
  10. Case study: one-way audio — private RFC 1918 IP in SDP c= line and rtpengine media relay fix
  11. Case study: missing ringback tone — mismatch between 180 Ringing and early media generation
  12. Case study: lost carrier voice announcement — firewall dropping early media before 200 OK
  13. Case study: 420 Bad Extension error — Require: 100rel mismatch and unsupported option tags
  14. Case study: call dropped by session timer — refresher failing to send periodic re-INVITE
  15. Case study: silence on music on hold (MoH) — inactive vs sendonly mode conflict in SDP
  16. Case study: call transfer failure — REFER rejection, Replaces header error and 481 response
  17. Case study: incorrect caller ID display — From vs P-Asserted-Identity precedence on gateway
  18. Case study: caller ID privacy malfunction: Privacy: id header and carrier billing failures
  19. Case study: registration loss behind NAT — firewall UDP binding timeout and short keepalive fix
  20. Case study: TCP/UDP transport mismatch — server replying over TCP while client listens on UDP
  21. Case study: TLS Handshake failure — untrusted CA, expired certificate and SAN hostname mismatch
  22. Case study: unexpected 407 on SIP trunk — Proxy Authentication challenge on every outbound call
  23. Case study: routing loop and 483 Too Many Hops — infinite INVITE cycling between two PBXs
  24. Case study: call forking race condition — multiple 200 OK responses and extra branch termination
  25. Case study: bloated SIP headers — custom X-headers, huge Via stack and UDP buffer overflows
  26. Case study: DTMF digits lost in IVR — transcoding failure between RFC 4733 and inband on SBC
  27. Case study: T.38 fax renegotiation rejected — 488 error and MaxDatagram parameter mismatch
  28. Case study: toll fraud incident — compromised extension, international call spikes and mitigation
  29. Case study: SIP scanner attack — INVITE flood, CPU exhaustion and automated fail2ban blocking
  30. Case study: DNS NAPTR mismatch — DNS offering TLS only while legacy client supports UDP only
  31. Final project: designing and deploying a carrier-grade secure SIP network for a regional telco

Group and individual classes include a teacher, homework review and a certificate. The subscription gives you materials, exercises and progress tracking at your own pace, without teacher feedback.

SIP and SDP: Complete Guide: how to enroll

Fill in the form and we will tell you the start date of the next group, the schedule and payment terms. Or come to a free trial lesson first.

WhatsApp