🏆 1st Place ElevenLabs Hackathon – $20,000🚀 EBRD Star Venture Program🥈 2nd Place Sevan Startup Summit🚀 Google Cloud $25K Grant
Kallina AI
RO
Kallina Voice AI

VoIP Protocols

Deep dive în protocoalele VoIP: SIP, RTP, SRTP, SDP.

The Voice Protocol Stack

Înțelegerea protocoalelor VoIP este esențială pentru debugging, optimizare, și integrare voice AI la nivel tehnic.

Protocol Stack

Application

Voice AI, IVR, Call Control

SIP

Session Initiation Protocol - Signaling

RTP/SRTP

Real-time Transport Protocol - Media

UDP/TCP/TLS

Transport Layer

IP

Network Layer

SIP (Session Initiation Protocol)

SIP INVITE Example

INVITE sip:+40722123456@carrier.com SIP/2.0
Via: SIP/2.0/UDP pbx.company.com:5060;branch=z9hG4bK776
Max-Forwards: 70
From: "Voice AI" <sip:+40211234567@pbx.company.com>;tag=1928301774
To: <sip:+40722123456@carrier.com>
Call-ID: a84b4c76e66710@pbx.company.com
CSeq: 314159 INVITE
Contact: <sip:+40211234567@192.168.1.100:5060>
Content-Type: application/sdp
Content-Length: 142

v=0
o=VoiceAI 2890844526 2890844526 IN IP4 192.168.1.100
s=Voice AI Call
c=IN IP4 192.168.1.100
t=0 0
m=audio 49170 RTP/AVP 0 8 96
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 opus/48000/2
Key SIP Methods
  • INVITE - Start call
  • ACK - Confirm
  • BYE - End call
  • CANCEL - Cancel pending
  • OPTIONS - Capabilities
  • REFER - Transfer
Key Response Codes
  • 100 - Trying
  • 180 - Ringing
  • 200 - OK
  • 404 - Not Found
  • 486 - Busy
  • 503 - Service Unavailable

SIP Call Flow

Caller                    Server                    Callee
   |                         |                         |
   |------- INVITE --------->|                         |
   |<------ 100 Trying ------|                         |
   |                         |------- INVITE --------->|
   |                         |<------ 100 Trying ------|
   |                         |<------ 180 Ringing -----|
   |<------ 180 Ringing -----|                         |
   |                         |<------ 200 OK ---------|
   |<------ 200 OK ----------|                         |
   |------- ACK ------------>|------- ACK ------------>|
   |                         |                         |
   |<=============== RTP Media Stream ================>|
   |                         |                         |
   |------- BYE ------------>|------- BYE ------------>|
   |<------ 200 OK ----------|<------ 200 OK ---------|

RTP (Real-time Transport Protocol)

RTP Packet Structure

V(2) P(1) X(1) CC(4) | M(1) PT(7)
Sequence Number (16 bits)
Timestamp (32 bits)
SSRC (32 bits)
Payload (audio data)
Key Fields
  • V - Version (always 2)
  • PT - Payload Type (codec)
  • Seq - Sequence for ordering
  • TS - Timestamp for playback
  • SSRC - Source identifier

SDP (Session Description Protocol)

v=0                              // Protocol version
o=VoiceAI 123 456 IN IP4 10.0.0.1  // Origin
s=Voice AI Session               // Session name
c=IN IP4 10.0.0.1                // Connection info
t=0 0                            // Timing (0 = permanent)
m=audio 49170 RTP/AVP 0 8 96     // Media description
a=rtpmap:0 PCMU/8000             // Codec mapping
a=rtpmap:8 PCMA/8000
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1         // Codec parameters
a=ptime:20                       // Packet time 20ms
a=sendrecv                       // Bidirectional
v= Version
o= Origin
c= Connection
m= Media line
a= Attributes
t= Timing

Common Issues & Debugging

One-Way Audio

Usually NAT issue. Check SDP "c=" line has public IP. Verify RTP ports are open în firewall.

Choppy Audio

Check packet loss în RTP stream. Increase jitter buffer. Verify network QoS settings.

Call Drops After 32 Seconds

ACK not received. Check firewall allows SIP responses. Verify symmetric RTP.

No Audio After Transfer

Re-INVITE may have wrong IP/port. Check UPDATE/re-INVITE handling.

Debugging Tools

sngrep

Terminal-based SIP flow viewer. See call ladders în real-time.

Wireshark

Full packet capture. RTP stream analysis, MOS calculation.

Homer

SIP capture server. Historical analysis, call correlation.

Master VoIP Protocols

Deep understanding pentru voice AI reliability.

Vezi Demo →
Începe Astăzi

Transformă Comunicarea cu Clienții

Agenți vocali AI care răspund 24/7 în română și rusă. Implementare în 2 săptămâni, fără infrastructură specială.

Setup în 24 oreSuport dedicatGDPR compliant

Rămâi la curent

Obține cele mai recente știri despre tehnologia de apelare AI și actualizările platformei

Made with ♡ by Kallina AI Team — 2025