sip (session initiation protocol)
TRANSCRIPT
![Page 1: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/1.jpg)
SIP (Session initiation protocol)RFC 3261 https://www.ietf.org/rfc/rfc3261.txt
Alexey KOVRIZHNYKH
![Page 2: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/2.jpg)
Traditional telephony challenges´ Capacity, 1xE1=2Mbps=30-31 calls (depending on signaling)
´ Lower diversity, a need to have end-to-end links. Low portability for end-users
´ Cost
E1 E1
![Page 3: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/3.jpg)
What is IP telephony?Transfer of audio and/or video over IP from one endpoint to another
´ Capacity, 1xE1=2Mbps=124 calls (depending on settings)
´ Full diversity of IP networks
´ Lower cost
![Page 4: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/4.jpg)
SIP architecture´ SIP signaling
´ RTP (real-time transport protocol) – transports the voice and video over IP networks.
´ RTCP (real-time control protocol) – monitors transmission statistics and quality of service (QoS). Uses ~5% of RTP
´ SDP (session description protocol) – negotiates technical data for RTP
![Page 5: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/5.jpg)
SIP (session initiation protocol)
´ By default uses UDP port 5060
´ Carries signaling messages´ Register
´ Invite
´ Trying (100)
´ Ok (200)
´ Ack
´ Ringing (180)
´ Session progress (183)
´ Bye
´ Etc
![Page 6: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/6.jpg)
RTP (real-time transport protocol)
´ Audio and video runs separately
´ Mostly use unprivileged UDP ports (1024 to 65535)
´ The audio payload formats include G.711, G.723, G.726, G.729, GSM and other codecs
´ The video payload formats include H.261, H.263, H.264, MPEG-4 etc
![Page 7: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/7.jpg)
SDP (session description protocol)It’s a protocol that describes the media of a session.
Session descriptionv= (protocol version number, currently only 0)o= (originator and session identifier : username, id, version number, network address)s= (session name : mandatory with at least one UTF-8-encoded character)c=* (connection information—not required if included in all media)b=* (zero or more bandwidth information lines)Media description (if present)m= (media name and transport address, and set of codecs)i=* (media title or information field)c=* (connection information — optional if included at session level)b=* (zero or more bandwidth information lines)k=* (encryption key)a=* (zero or more media attribute lines — overriding the Session attribute lines, with codec and sampling rate)
[Request]v=0o=Makara 2890844526 2890844526 IN IP4 10.120.42.3s= KHNOGc=IN IP4 10.120.42.3m=audio 49170 RTP/AVP 0 8 97 (Real-time protocol, Audio-video profile)a=rtpmap:0 PCMU/8000a=rtpmap:8 PCMA/8000a=rtpmap:97 iLBC/8000m=video 51372 RTP/AVP 31 32 a=rtpmap:31 H261/90000a=rtpmap:32 MPV/90000
[Answer]v=0o=Vibol 2808844564 2808844564 IN IP4 10.120.32.12s=KHNOGc=IN IP4 10.120.32.12m=audio 49174 RTP/AVP 0a=rtpmap:0 PCMU/8000m=video 49170 RTP/AVP 32a=rtpmap:32 MPV/90000
![Page 8: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/8.jpg)
Packetization period
![Page 9: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/9.jpg)
Packetization period (cont’d)
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
20ms
50 packets*20ms/packet=1000ms=1s
![Page 10: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/10.jpg)
Voice codecs
IP overhead=Eth(14)+IP(20)+UDP(8)+RTP(12) = 54 bytesETH=src_mac(6)+dst_mac(6)+ether_type(2)=14 bytes
Codec G.711(PCM) G.711(PCM) G.729r8 G.729r8 G.711(PCM) G.729r8Codecbw,Kbit/s 64 64 8 8 64 8Codecbw,bit/s 64000 64000 8000 8000 64000 8000Codecbw,bytes/s 8000 8000 1000 1000 8000 1000Packetization,ms 20 30 20 40 20 500PPS(packetpersecond) 50 33 50 25 2 2Packetsize,bytes 160 240 20 40 4000 500IPoverhead,bytes 54 54 54 54 54 54TotalIPpacketsize,bytes 214 294 74 94 4054 554Bandwithontheline,Kbps 85.6 78.4 29.6 18.8 64.864 8.864Callsfittinginto1xE1(2048Kbps) 24 26 69 109 32 231
PCM=Pulse code modulation, coming from traditional phone system
![Page 11: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/11.jpg)
MOS (mean opinion score)MOS=5 for a face to face talk• zero loss• zero delay • zero compression• zero processing delay
![Page 12: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/12.jpg)
Signaling sample
![Page 13: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/13.jpg)
VoIP related features´ VAD (voice activity detection) to not transfer packets if no voice
´ CNG (comfort noise generation) to create a background noise in the phone
´ ALG (application layer gateway) to support NAT
´ RTP header compression
![Page 14: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/14.jpg)
Sample call
![Page 15: SIP (Session Initiation Protocol)](https://reader033.vdocuments.pub/reader033/viewer/2022051318/58ed45381a28ab36088b46b9/html5/thumbnails/15.jpg)
Sample call
#11110.0.111.2/30
#22210.0.222.2/30
Wiresharksniffer
SPANport Console
10.0.111.1/30 10.0.222.1/30
Signaling,SIP+SDP,UDP5060Voice,RTP
UDPrandomport