Take a sip of sip

Post on 22-Jan-2017

190 views 0 download

Transcript of Take a sip of sip

May 1, 2023

Take a sip of SIP

Paul Sarstiuc, Romeo Vidrascu, Marius Trestioreanu

Bucharest

2

SIP – Session Initiation Protocol

Content

– VoIP– SIP History – SIP Architecture– Addressing SIP– SIP Messages– SIP Flow– WireShark and SIP Filters– SIP Flow – WireShark– Supplementary Services– SDP - WireShark

3

VoIP stereotypes VoIP means free calls SIP is a collection of protocols SIP is better than H323 SIP is a voice signaling protocol

4

VoIP

VoIP– VoIP: Voice over Internet Protocol

IP Telephony Internet Telephony Voice over Broadband (VoBB) Broadband Telephony Broadband Phone

– Alternative to PSTN– Single infrastructure for Data, Voice and Video– More demand for video conferences is easily satisfied with

VoIP– Cost savings on long distance calls– Easier connectivity: customers are to be reached at multiple

points under the same “telephone number”– Communication Services

Voice/Video Fax Voice/Messaging Application

5

VoIP

VoIP Protocols– SIP – Session Initiation Protocol– H.323– IMS – IP Multimedia Subsystem– MGCP – Media Gateway Control Protocol– RTP – Real-time Transport Protocol– RTCP – Real-time Transport Control Protocol– SDP – Session Description Protocol– Skype Protocol (proprietary)– TCP – Transmission Control Protocol– UDP – User Datagram Protocol– TLS – Transport Layer Security

6

SIP OSI

SIP vs. OSI

7

History

SIP History

– Feb. 22, 1996 draft-ietf-mmusic-scip-00; IDMS paper– Feb. 22, 1996 draft-ietf-mmusic-sip-00– Dec. 2, 1996 draft-ietf-mmusic-sip-01– March 27, 1997 draft-ietf-mmusic-sip-02– July 31, 1997 draft-ietf-mmusic-sip-03– November 11, 1997 draft-ietf-mmusic-sip-04– May 14, 1998 draft-ietf-mmusic-sip-05– June 17, 1998 draft-ietf-mmusic-sip-06– July 16, 1998 draft-ietf-mmusic-sip-07– August 7, 1998 draft-ietf-mmusic-sip-08– September 18, 1998 draft-ietf-mmusic-sip-09– September 28, 1998 Last call– November 12, 1998 draft-ietf-mmusic-sip-10– December 15, 1998 draft-ietf-mmusic-sip-11– January 15, 1999 draft-ietf-mmusic-sip-12– February 2, 1999 Approved– March 17, 1999 RFC 2543– July 3, 2002 RFC 3261 (SIP: Session Initiation Protocol), RFC 3262 (Reliability of

Provisional Responses in Session Initiation Protocol (SIP)), RFC 3263 (Session Initiation Protocol (SIP): Locating SIP Servers), RFC 3264 (An Offer/Answer Model with Session Description Protocol (SDP)), RFC 3265 (Session Initiation Protocol (SIP)-Specific Event Notification), RFC 3266 (Support for IPv6 in Session Description Protocol (SDP)) published

– http://datatracker.ietf.org/wg/sip/

8

SIP Architecture

Network Elements:– UA – User Agent

UAC – User Agent Client [request] UAS – User Agent Server [response]

– Server Elements [RFC 3261] Proxy Server [phone – proxy – proxy – phone] Registrar [REGISTER] Redirect Server [3XX]

– Other Network Elements SBC – Session Border Controller Gateway

9

SIP Architecture Network Elements

10

SIP addressing URI – Uniform Resource Identifier

sip:username:password@host:port

E.g.: sip:John@sipgatedomain.org

Secure transmission– sips:… instead of sip:…– TLS – Transport Layer Security

11

SIP Messages SIP Requests:– REGISTER– INVITE– ACK– CANCEL– BYE– OPTIONS– SUBSCRIBE– REFER– NOTIFY

SIP Responses:– Provisional (1xx)– Success (2xx)– Redirection (3xx)– Client Error (4xx)– Server Error (5xx)– Global Failure (6xx)

12

SIP Messages - REGISTER

13

SIP Messages - INVITE

14

SIP Messages - ACK

15

SIP Messages - CANCEL

16

SIP Messages - BYE

17

SIP Messages - OPTIONS

18

SIP Messages – 100 Trying

19

SIP Messages – 200 Ok

20

SIP Messages – 401 Unauthorized

21

SIP Flow Direct SIP Call Between 2 UAs

22

SIP Flow Call via Proxy

23

SIP Flow Call via Proxy with No Answer

24

SIP Flow Registration

25

WireShark and SIP Filters Wireshark – Free, open-source packet analyzer– Network Troubleshooting and Analysis– Software and communications protocol development– Education.

Popular Filters:– sip– sdp– udp– tcp– rtp– sip.To– sip.to.addr

26

SIP Flow - WireShark WireShark Capture

27

SIP Flow - WireShark WireShark: Telephony – VoIP Calls – Flow

28

Supplementary Services– Call Hold

– Call Transfer

– Call Conference

– Call Forwarding on busy no answer unconditional

29

Supplementary Services HOLD

30

Supplementary Services HOLD

31

Supplementary Services Transfer

32

SDP - WireShark

33

SDP - WireShark Session Description Protocol Version - 0 Owner / Creator of the session or Owner / Creator. Identification is made by:

– Owner username. User.– Session ID. ID of the session. Random number as a unique identifier of the session.– Session Version. Version.– Network Type. Tipe network. Always IN.– Address Type. It can be IP4 (IPv4) or IP 6 (IPv6).– Address (IP). IP Address. (200.57.7.197)– Session Name. Name of the session.

Connection Information:– C = Connection Type Network (IN)– Connection Address Type: (IP4 or IPv6)– Connection Address: (200.57.7.197)

Time Description, active time. (t): 0 0, start stop time = 0. [unrestricted and permanent session].

Media Description, name and address (m): audio 40376 RTP / AVP 4 0 8 18. Type of data being transported (audio or telephone session in this case), UDP port used (40 376), protocol used (Real Time Transport Protocol RTP / AVP Audio Video Profiles). Codecs formats:– 8 G.711 PCMA– 18 G.729– 4 G.723– 0 G.711 PCMU

Media Attribute (a). This is a list of format codes outlined above with data from Sample rate or sampling frequency, fieldname, etc.

Media Attribute (a). SendRecv. So send / receive.

34

Q & A

Thank You !