VOIP SIP Pardeep
VOIP SIP Pardeep
VOIP SIP Pardeep
&
Session Initiation Protocol (SIP)
Pardeep Verma
09/29/16
Contents
09/29/16
What is SIP?
SIP History.
SIP Architecture.
SIP Network Entities.
SIP Call Establishment.
SIP Message Syntax.
SIP Requests.
SIP Responses.
SIP Addressing.
SIP Message Headers.
Usage of SDP with SIP.
Features & Services by SIP.
Inter Working with PSTN.
2
Why VOIP?
Why Carry VOICE?
Why use IP for VOICE?
09/29/16
10
09/29/16
11
12
13
VOIP Challenges
Reliability
As an alternative to Ckt Switching,
reliability of VOIP should be same as
of Ckt Switching i.e Five 9s (99.999) .
Voice Quality
Speech must be of Toll Quality (With
MOS between 4-Good & 5-Excellent)
09/29/16
14
VOIP Implementations
IP-Based PBX.
IP Voice Mail.
Hosted PBX-Solutions.
IP Call Centers.
09/29/16
15
VOIP Protocols
SIGNALING
SIP/SDP (IETF), H.323 (ITU-T)
MEDIA
RTP (IETFs adopted by ITU-T)
TRANSPORT
UDP,TCP, SCTP (Stream Control Transport
Protocol)
09/29/16
16
VOIP Protocols.
SUPPORTING PROTOCOLS
DNS
Domain Name Service
TRIP
(Telephone Routing over IP
Discovery & Exchange of IP
routing tables
between providers)
RSVP
COPS
telephony gateway
DIAMETER -
Authorization.
09/29/16
17
SIP
09/29/16
18
What is SIP?
SIP is IETFs Signaling Protocol that
handles the Setup, Modification &
Teardown of multimedia sessions.
SIP is an
Internet proposed standard
documented in RFC 2543.
SIP is an application layer control protocol
that can establish, modify and terminate
multimedia sessions or calls.
09/29/16
19
What is SIP?..
SIP sessions may involve one or more
participants and can use unicast or
multicast communication.
20
What is SIP?..
SIP message format is based on the
Hyper Text Transport Protocol (HTTP)
message format, which uses a humanreadable, text-based encoding.
SIP is transport-layer independent
protocol i.e. it can be used with any
datagram or stream protocol like UDP,
TCP, SCTP, ATM etc.
09/29/16
21
What is SIP?..
It uses the session description
protocol (SDP) for media
negotiations.
22
Call Signaling
Over IP
MGC
MGC
SIP or H.323
Control &
Status
Signaling
MG
MG
MGCP or MEGACO
Media Over
IP
Control &
Status
Signaling
MG
MG
MGC
PSTN Switch
PSTN
Signaling
MGCP or
MEGACO
Media over
IP
Speech
SIP History
09/29/16
25
SIP History
11/1999
: SIP-WG formed.
11/2000
: draft-ietf-siprfc2543bis- 02, 6 Methods
05/2001
: draft-03, 6 Methods.
07/2001
: draft-04, 6 Methods.
09/29/16
26
SIP Architecture
SIP is Text Based Protocol using ISO
10646 in UTF-8 encoding.
SIP is Lower Layer Independent
Protocol.
In a SIP controlled Call, Media can
use any transport Protocol.
09/29/16
27
SIP Architecture
SIP
Signaling
SIP USER
28
29
09/29/16
30
31
32
A SIP Registration
Location Server
1) REGISTER sip:ipGen.com SIP/2.0
FROM: sip:aish@ipGen.com
2) aish@aish.home.com TO: sip:aish@ipGen.com
Contact:sip:aish.home.com
Expires:36000
3) SIP/2.0 200 OK
SIP REGISTRAR (ipGen.com)
09/29/16
User Agent
33
34
6) SIP/2.0 200 OK
7) ACK
09/29/16
5) SIP/2.0 200 OK
PROXY
8) Media Streams
35
36
37
2)
aish@work
3) aish@home
1) INVITE aish@work
8) ACK
7) 200 OK
Conversation
SIP USER
BYE
OK
09/29/16
39
40
41
SIP USER
42
UA Busy
SIP USER
43
44
45
46
SIP REQUESTS
Syntax of a SIP REQUEST is
METHOD SP REQUEST-URI SP SIP-VERSION
METHOD tells purpose of the REQUEST.
REQUEST-URI tells the Address of Callee.
SIP-VERSION tells the version of SIP.
e.g INVITE sip:aish@ipgen.com SIP/2.0
09/29/16
47
SIP REQUESTSMETHODS
RFC-2543 defines SIX Methods (i.e SIX
different Requests)
INVITE Initiates Sessions.
ACK
Confirm Session Establishment
BYE
Terminates a Session
CANCEL Cancel a pending INVITE
OPTIONSCapability Enquiry of the Server
REGISTER- Bind a permanent address to
current location
09/29/16
48
SIP REQUESTSMETHODS
SIP Extensions Define following Methods.
INFO
Mid Call Information
(RFC 2976)
COMET Pre Condition Met
(draft-ietf-sip-manyfolks-resource)
PRACK Acknowledgement of reliable
provision responses
(draft-ietf-sip-100rel)
SUBSCRIBE/ - Instant Messaging
NOTIFY/
(draft-rosenberg-impp-*)
MESSAGE
09/29/16
49
SIP METHODSINVITE
INVITE Method Initiates a Session.
INVITE is akin to the IAM in ISUP.
INVITE can be used to initiates a
simple two party or a multi-party
conference call.
09/29/16
50
SIP METHODSINVITE
The negotiation of the parameters of the
session such as port which will receive
the media stream or which Codec will be
used is carried out using this method.
In the middle of a call, it is also possible
to change the current parameters of the
media stream sending a new INVITE
request.
09/29/16
51
SIP METHODSINVITE
An UAS will respond to INVITE with
one or more Provisional
responses(like Call in Progress &
Ringing in PSTN) and a FINAL
responses (like
ANM in PSTN).
INVITE
Ringing
SIP USER
09/29/16
Final Response
SIP USER
52
SIP METHODSACK
ACK is used only with INVITE
Requests.
Caller sends ACK to confirms that
Final Response to INVITE has been
received.
INVITE
Final response
can be OK, Called
UA Busy etc. Final Response
SIP USER
09/29/16
ACK
SIP USER
53
SIP METHODSBYE
BYE Method terminates a session.
BYE Method is used when a party in a
session hangs up.
BYE is akin to REL in ISUP.
BYE Method can be used by either by
calling party or called party
09/29/16
54
BYE example
INVITE
RINGING
OK
ACK
SIP USER
Conversation
SIP USER
BYE
OK
09/29/16
55
SIP METHODSOPTIONS
With OPTIONS Method caller can
determine the capabilities of
Called party.
The recipient of the OPTION
request responds with the
capabilities supported.
09/29/16
56
OPTIONS Example
OPTIONS sip:UAS@work.com SIP/2.0
From : UAC@work.com
To: UAS@work.com
Accept: Application/sdp
Call-ID:123@uac.work.com
Cseq: 1 OPTIONS
Content-Length:0
UAC
SIP/2.0 200 OK
From : UAC@work.com
To: UAS@work.com
Accept: Application/sdp
Call-ID:123@uac.work.com
Cseq: 1 OPTIONS
Content-Length:0
v=0
o = uas 45678 001 IN IP4 uas.work.com
s= session
c=IN IP4 uas.work.com
t=0 0
m=audio 0 RTP/AVP 0 3
UAS
SIP METHODSCANCEL
Terminates a pending request or the
search for a user.
58
SIP METHODSREGISTER
A UAC uses the REGISTER to log in &
register its address with a SIP-Server.
A UAC can register with multiple
servers by using a multicast address
(224.0.1.175).
A client can have multiple registrations
at the same Registrar Server (One
Number Service)
09/29/16
59
Registrar/Proxy
User at addr B
REGISTER (Address-A)
Caller-Aish
OK (for address A)
REGISTER(Addr B)
OK (for address B)
INVITE
INVITE
INVITE
OK
OK for INVITE
CANCEL
ACK
ACK
09/29/16
60
SIP RESPONSES
There are SIX types of SIP-RESPONSES.
1XX
Informational
100 - Trying
180 - Ringing
2XX
Final
200 - OK
3XX
Redirection
300 Multiple Choices
301 - Moved Temporarily
09/29/16
61
SIP RESPONSES
4XX - Client Error
400 Bad Request
401 - Unauthorized
5XX - Server Error
500 Internal Server Error
6XX - Global Failure
600 Busy Everywhere
09/29/16
62
SIP-Addressing
SIP gives a Globally reachable address.
UA bind to this address by REGISTER
Method.
Callers use this address to establish real
time communication with Callees.
SIP Addresses are known as SIP-URLs.
SIP-Addresses take the form of user@host.
09/29/16
63
SIP-Addressing.
SIP URL has the syntax
sip:user@host
eg:
sip:aish@ipgen.com
64
SIP-Message Headers
Message Headers are included in a
Request or response to give further
information or to enable appropriate
handling of the Message.
for eg: FROM-Indicates Calling Party.
TO
-Indicates Called Party
09/29/16
65
Message Headers.Categories
There are Four Categories of
Message headers.
General Headers
Request Headers
Response Headers
Entity Headers
09/29/16
66
Headers.General Headers
General Headers can be used
within both Requests & Responses.
There are total of 19 Headers in
this category (sip-draft-02).
eg:- FROM, TO, Call-Id, Contact.
09/29/16
67
68
69
70
71
72
Offer-Answer Model
MODEL-1
MODEL-2
74
75
v=0
o=alice 2890844526
2890844526 IN IP4
host.anywhere.com
s=New board design
e=alice@foo.org
t=0 0
c=IN IP4
host.anywhere.com
m=audio 49170 RTP/AVP 0
a=rtpmap:0 PCMU/8000
m=video 51372 RTP/AVP
31 a=rtpmap:31
H261/90000
m=video 53000 RTP/AVP
32 a=rtpmap:32
MPV/90000
ANSWER
v=0
o=bob 2890844730
2890844730 IN IP4
host.example.com
s=New board design
e=bob@bar.com
t=0 0
c=IN IP4
host.example.com
m=audio 47920 RTP/AVP
0 1 a=rtpmap:0
PCMU/8000
m=video 0 RTP/AVP 31
m=video 53000 RTP/AVP
32 a=rtpmap:32
MPV/90000
v=0
o=bob 2890844730
2890844731 IN IP4
host.example.com
s=New board design
e=bob@bar.com
t=0 0
c=IN IP4 host.example.com
m=audio 6400 RTP/AVP 0 1
a=rtpmap:0 PCMU/8000
m=video 0 RTP/AVP 31
m=video 53000 RTP/AVP 32
a=rtpmap:32 MPV/90000
m=audio 8864 RTP/AVP 110
a=rtpmap:110 telephoneevents
a=recvonly
UAC
SIP/2.0 200 OK
From : UAC@work.com
To: UAS@work.com
Accept: Application/sdp
Call-ID:123@uac.work.com
Cseq: 1 OPTIONS
Content-Length:0
v=0
o = uas 45678 001 IN IP4 uas.work.com
s= session
c=IN IP4 uas.work.com
t=0 0
m=audio 0 RTP/AVP 0 3
UAS
G.711 mu-law(0)
GSM (3)
3 ACK
4 SUBSCRIBE
5 200 OK
Caller requests
notification when
called party is no
longer busy.
6 NOTIFY
7 200 OK
8 INVITE
9 200 OK
10 ACK
Media Session
Call Forwarding
User 1
User 2
work.com
INVITE sip:User2@work.com
TO: sip:User2@work.com
INVITE sip:User2@work.com
TO: sip:User2@work.com
User 3
09/29/16
82
83
IP-Telephony
Tier 1: e164.com"
SIP URL
H323 URL
Internet
IP-System
(H323 Gatekeeper)
(IP-PBX)
(SIP Proxy)
Outbound
Gateway
Inbound
Gateway
PSTN &
Mobile
Internet
Devices
PSTN
Devices
PSTN Switch
IAM
ACM
PSTN Phone
Ringing Voltage
PRACK
200 OK for PRACK
RTP packets
ANM
200 for INVITE
ACK
RTP packets
PCM Speech
Analog Speech
INFO
Digits
DTMF Digits
REL
RLC
Hang Up