Transcript SIP

Session Initiation Protocol (SIP)
Chapter 5
Introduction



A powerful alternative to H.323
More flexible, simpler
Easier to implement




Advanced features
Better suited to the support of intelligent user
devices
A part of IETF multimedia data and control
architecture
SDP, RTSP (Real-Time Streaming Protocol), SAP
(Session Announcement Protocol)
Internet Telephony
2
The Popularity of SIP

Originally Developed in the MMUSIC




SIP + MGCP/MEGACO


A separate SIP working group
RFC 3261
Many developers
The VoIP signaling in the future
“back-off” or SIPit (SIP Interoperability Tests)


Test products against each other
Organized by SIP Forum
Internet Telephony
3





The 18th SIPit event in Tokyo, Japan took place April
17-21, 2006, and will be hosted by JPNIC
The 17th SIPit event in Stockholm, Sweden took place
2005-09-11 to 2005-09-16 and was hosted by Hotsip
The 16th SIPit event in Banff, Canada took place 200504-04 to 2005-04-08 and was hosted by Jasomi
Networks
The 15th SIPit event in Taiwan took place 2004-08-23
to 2004-08-27 and was hosted by CCL/ITRI
The 14th SIPit event in Cannes, France took place
2004-02-08 to 2004-02-13 and was hosted by ETSI
Internet Telephony
4
SIP Architecture

A signaling protocol


SIP + SDP


The setup, modification, and tear-down of
multimedia sessions
Describe the session characteristics
Separate signaling and media streams
Internet Telephony
5
SIP Network Entities

Clients



Servers



User agent clients
Application programs sending SIP requests
Responds to clients’ requests
Clients and servers may be in the same
platform
Proxy

Acts as both clients and servers
Internet Telephony
6

Four types of servers

Proxy servers


Handle requests or forward requests to other servers
Can be used for call forwarding
Internet Telephony
7

Redirect servers


Map the destination address to zero or more new addresses
Do not initiate any SIP requests
Internet Telephony
8

A user agent server





Accept SIP requests and contacts the user
The user responds → an SIP response
A SIP device
E.g., an SIP-enabled telephone
A registrar

Accepts SIP REGISTER requests


Indicating the user is at a particular address
Typically combined with a proxy or redirect server
Internet Telephony
9
SIP Call Establishment

It is simple

A number of interim responses
Internet Telephony
10
SIP Advantages



Attempt to keep the signaling as simple as possible
Offer a great deal of flexibility
Various pieces of information can be included within
the messages



Including non-standard information
Enable the users to make intelligent decisions
The user has control of call handling

No need to subscribe call features
Internet Telephony
11

Call Completion to Busy Subscriber service
Internet Telephony
12
Overview of SIP Messaging Syntax

Text-based


SIP messages




Similar to HTTP
message = start-line
*message-header CRLF
[message-body]
start-line = request-line | status-line
Request-line specifies the type of request
The response line

The success or failure of a given request
Internet Telephony
13

Message headers


Additional information of the request or response
E.g.,




The originator and recipient
Retry-after header
Subject header
Message body

Describe the type of session

The media format



SDP, Session Description Protocol
Could include an ISDN User Part message
Examined only at the two ends
Internet Telephony
14
SIP Requests


method SP request-URI SP SIP-version CRLF
request-URI


The address of the destination
Methods

INVITE, ACK, OPTIONS, BYE, CANCLE, REGISTER


extensions: INFO, REFER, UPDATE, …
INVITE





Initiate a session
Information of the calling and called parties
The type of media
~IAM (initial address message) of ISUP
ACK only the final response
Internet Telephony
15

BYE



Terminate a session
Can be issued by either the calling or called party
Options

Query a server as to its capabilities



A particular type of media
The response if sent an INVITE
CANCEL


Terminate a pending request
E.g., an INVITE did not receive a final response
Internet Telephony
16

REGISTER





Log in and register the address with a SIP server
“all SIP servers” – multicast address (224.0.1.75)
Can register with multiple servers
Can have several registrations with one server
INFO


RFC 2976
Transfer information during an ongoing session



DTMF digits
account balance information
midcall signaling information generated in another network
Internet Telephony
17
SIP Responses

SIP version SP status code SP reason-phrase CRLF

reason-phrase



A textual description of the outcome
Could be presented to the user
status code








A three-digit number
1XX Informational
2XX Success (only code 200 is defined)
3XX Redirection
4XX Request Failure
5XX Server Failure
6XX Global Failure
All responses, except for 1XX, are considered final

Should be ACKed
Internet Telephony
18
“One number” service
Internet Telephony
19
SIP Addressing

SIP URLs (Uniform Resource Locators)


user@host
E.g.,


sip:[email protected]
sip:[email protected]

Supplement the URL

sip:[email protected];user=phone
sip:user:password@host:port;uri-parameters?headers

Internet Telephony
20
Message Headers

Provide further information about the message


~information elements
E.g.,

To:header in an INVITE


From:header


The called party
The caling party
Four main categories



General, request, response, and entity headers
A list in Table 5-2
Mapping in Table 5-3
Internet Telephony
21
General Headers


Used in both requests and responses
Basic information


E.g., To:, From:, Call-ID:, …
Contact:


A URL for future communication
May be different from the From: header

Requests passed through proxies
Internet Telephony
22

Request Headers



Apply only to SIP requests
Addition information about the request or the client
E.g.,




Subject:
Priority:, urgency of the request
Authorization:, authentication of the request originator
Response Headers


Further information about the response
E.g.,


Unsupported:, features
Retry-After
Internet Telephony
23

Entity Header


Session information presented to the user
Session description, SDP








The RTP payload type, an address and port
Content-Length, the length of the message body
Content-Type, the media type of the message
Content-Encoding, for message compression
Content Disposition,
Content-Language,
Allow, used in a Request to indicate the set of
methods supported
Expires, the date and time
Internet Telephony
24
Example of SIP Message Sequences

Registration


Via:
Call-ID:


Content-Length:


Avoid ambiguity
Expires:



Zero, no msg body
Cseg:


host-specific
TTL
0, unreg
Contact:

*
Internet Telephony
25
Invitation

A two-party call

Subject:


optional
Content-Type:

application/sdp
Internet Telephony
26
Internet Telephony
27
Termination of a Call

Cseq:

Has changed
Internet Telephony
28
Redirect Servers

An alternative address


302, Moved temporarily
Another INVITE


Same Call-ID
Cseq ++
Internet Telephony
29
Proxy Servers



Entity headers are omitted
Changes the Req-URI
Via:



The path
Loop detected, 482
For a response



The 1st Via: header
Checked
removed
Internet Telephony
30
Internet Telephony
31
Proxy state


Can be either stateless or stateful
Record-Route:

The messages and responses may not pass through the
same proxy


A Proxy might require that it remains in the signaling path






Use Contact:
In particular, for a stateful proxy
Insert its address into the Record-Route: header
The response includes the Record-Route: header
The Record-Route: header is used in the subsequent
requests
The Route: header = the Record-Route: header in reverse
order, excluding the first proxy
Each proxy remove the next from the Route: header
Internet Telephony
32
Forking Proxy


“fork” requests
A user is registered at
several locations

;branch=xxx
Internet Telephony
33
Internet Telephony
34
The Session Description Protocol

The message body


SDP, RFC 2327
The Structure of SDP

Session Level Info




Name
The originator
The time
Media Level Info




Media type
Port number
Transport protocol
Media format
Internet Telephony
35

SDP session description structure
Internet Telephony
36
SDP Syntax


A number of lines of text
In each line



field=value
Session-level fields first
Media-level fields

Begin with media description field (m=)
Internet Telephony
37
Mandatory Fields




v=(protocol version)
o=(session origin or creator and session id)
s=(session name), a text string
t=(time of the session)



t=<start time> <stop time>
NTP time values in seconds
m=(media)





m=<media> <port> <transport> <fmt list>
Media type
The transport port
The transport protocol
The media format, an RTP payload format
Internet Telephony
38
Optional Fileds

i=(session information)



u=(URI of description)



Where further session information can be obtained
Only at session level
e=(e-mail address)



A text description
At both session and media levels
Who is responsible for the session
Only at the session level
p=(phone number)

Only at the session level
Internet Telephony
39

c=(connection information)



b=(bandwidth information)



Connection type, network type, and connection address
At session or media level
In kilobits per second
At session or media level
r=<repeat interval> <active duration> <list of offsets
from start- time>


For regularly scheduled session
How often and how many times
Internet Telephony
40

z=(timezone adjustments)




k=(encryption key)




z=<adjustment time> <offset> <adjustment time>
<offset> ....
For regularly scheduled session
Standard time and Daylight Savings Time
k=<method>:<encryption key>
An encryption key or a mechanism to obtain it
At session or media level
a=(attributes)

Describe additional attributes
Internet Telephony
41
Ordering of Fields

Session Level














Protocol version (v)
Origin (o)
Session name (s)
Session information (i)
URI (u)
E-mail address (e)
Phone number (p)
Connection info (c)
Bandwidth info (b)
Time description (t)
Repeat info (r)
Time zone adjustments (z)
Encryption key (k)
Attributes (a)

Media level



Media description (m)
Media info (i)
Connection info (c)




Optional if specified at
the session level
Bandwidth info (b)
Encryption key (k)
Attributes (a)
Internet Telephony
42
Subfields


Field = <value of subfield1> <value of subfield2>
<value of subfield3> …
Origin (o)


Username, the originator’s login id or “-”
session ID




version, a version number for this particular session
network type



A text string; IN refers to Internet
address type


A unique ID
Make use of NTP timestamp
IP4, IP6
Address, a fully-qualified domain name or the IP address
o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4
Internet Telephony
43

Connection Data




The network and address at which media data are to be
received
Network type, address type, connection address
c=IN IP4 224.2.17.12/127
Media Information

Media type



Port, 1024-65535
Format



Audio, video, application, data, or control
List the various types of media
RTP/AVP payload types
m= audio 45678 RTP/AVP 15 3 0

G.728, GSM, G.711
Internet Telephony
44

Attributes

Property attribute



value attribute


a=sendonly
a=recvonly
a=orient:landscape
rtpmap attribute




The use of dynamic payload type
a=rtpmap:<payload type> <encoding name>/<clock rate>
[/<encoding parameters>].
m=video 54678 RTP/AVP 98
a=rtpmap 98 L16/16000/2
Internet Telephony
45
Usage of SDP with SIP


SIP for the establishment of multimedia
sessions
SDP – a structured language for describing the
sessions

The entity header
Internet Telephony
46
Negotiation of Media

Fig 5-15


If a mismatch




G.728 is selected
488 or 606
Not Acceptable
A Warning header
INVITE with multiple
media streams


Unsupported should also
be returned
With a port number of
zero
Internet Telephony
47
Internet Telephony
48

Offer/answer
Internet Telephony
49
Internet Telephony
50

OPTIONS Method

Determine the capabilities
of a potential called party
Internet Telephony
51
SIP Extensions and Enhancements

RFC 2543, March 1999




obsoleted by RFCs 3261,3262, 3263, 3265
Will be enhanced considerably before it
becomes an Internet standard
183 – session progress (RFC 3261)
Supported: header (RFC 3261)


Require:
Supported:
Internet Telephony
52
183 Session-Progress Message

The addition of a new response


Status code 183
To open a one-way media path


From the called party to calling party
convey information about the progress of the call that is
not otherwise classified





ACM (address complete message) of SS7
For SIP – PSTN – SIP connections
When a temporary media stream is needed
Note that alerting signal can be


Tones or announcements
Status code 180 (ringing)
The temporary media stream will be terminated

As soon as the called user answers
Internet Telephony
53
The SIP Supported Header

The Require header




UACs tell UASs about options that the UAC expects
the UAS to support
require: 100rel
may receiver 420 (Bad Extension)
The Supported header


enumerates all the extensions supported by the UAC
or UAS
Included in both requests and responses



BYE, CANCEL, INVITE, OPTIONS and REGISTER
Should not be included in the ACK
421, extension required

The UAS needs a particular extension to process the request
Internet Telephony
54
Internet Telephony
55
SIP INFO Method

A new SIP method – RFC 2976




The transfer of information in the middle of a call
DTMF digits, account-balance information, mid-call
signaling information (from PSTN)
A powerful, flexible tool to support new services
e.g., the user’s prepaid account balance
Internet Telephony
56
SIP Event Notification

SIP-specific event notification



SUBSCRIBE



be informed of some event(s)
RFC 3265
subscribe to certain event
Event: header
NOTIFY


inform the user
200 (OK) response
Internet Telephony
57
Internet Telephony
58
SIP for Instant Messaging

SIMPLE - SIP for Instant Messaging and
Presence Leveraging Extensions



The exchange of content between a set of
participants in near real time


a working group
RFC 3994, 3856
IMs are usually grouped together into brief live
comversations
MESSAGE request, RFC 3994

a message body in the form text/plain, or
message/cpim (common presence and instant
message) using XML
Internet Telephony
59




Doesn’t establish a SIP dialog
Can be associated with an existing SIP dialog
Contact: header is forbidden
No Record-Route: or Route: header
Internet Telephony
60
Internet Telephony
61
REFER Method




RFC 3515
Instruct the receiver to contact a third party
Refer-to:
Can be interpreted as an implicit SUBSCRIBE


202 (accepted)



The sender will be notified the result
An extension
A SIP message is tunneled within a SIP
message
Refer-by:
Internet Telephony
62
Internet Telephony
63
Internet Telephony
64
Reliability of Provisional Responses

Provisional Responses



If the messages is sent over UDP


100 (trying), 180 (ringing), 183 (session in progress)
Are not answered with an ACK
Unreliable
Lost provisional response may cause problems
when interoperating with other network



180, 183 → Q931 alerting or ISUP ACM
To drive a state machine
E.g., a call to an unassigned number

ACM to create a one-way path
Internet Telephony
65

RSeq



Rack


Prov Resp ACK
the option tag


Response ACK
PRACK


Response seq
+1, when retxm
100rel
Should not


Apply to 100
hop-by-hop
Internet Telephony
66
Internet Telephony
67
UPDATE Method


RFC 3311
Change the media format in the early state


re-INVITE cannot be used; it changes the state
Can be used to reserve network resources
Internet Telephony
68
Integration of SIP and Resource Mang



RFC 3312
The signaling might take a different path from
the media
Assume resource-reservation mechanisms
available (Chapter 8)



On a per-session basis
On an aggregate basis
A new SIP header in the INVITE



Resources reservation is needed
The user should not yet be alerted
But unrecognized header is ignored
Internet Telephony
69

Integration of Resource Management and SIP
for IP Telephony






A new method, PRECONDITION-MET
The far-end phone will not ring until
Also specifies extensions to SDP
Can define any number of preconditions in SDP
without revise SIP every time
The response is sent using reliable signaling
Once the resource is reserved


An UPDATE request is sent
If failed, could select a lower-bandwidth codec
Internet Telephony
70
Internet Telephony
71

The preconditions/requirements in the SDP

Three status


Resource reservation


end-to-end (e2e), local, and remote
Purpose


desired, current, and confirmed
send, recv, and sendrecv
Strength

mandatory, optional, none and failure
Internet Telephony
72

Examples







m=audio 4444 RTP/RTCP 0
a=curr: qos e2e none
a=des: qos mandatory e2e sendrecv
a=curr: qos e2e send
a=des: qos mandatory e2e sendrecv
a=curr: qos e2e sendrecv
a=des: qos mandatory e2e sendrecv
Internet Telephony
73
Internet Telephony
74
Usage of SIP for Features/Services


Personal mobility by registration
Can carry MIME (Multi-Purpose Internet Mail
Extension) content


SIP address is a URL


Click-to-call applications
Supplementary Custom Local Area Signaling
Service (CLASS) services


Text, HTML documents, an image, etc.
Call waiting, call forwarding, multi-party calling, call
screening
Proxy-controlled: QoS, IN SCP, INAP, OSA
Internet Telephony
75
Call Forwarding


On busy
486, busy here
Internet Telephony
76
Consultation Hold

A SIP UPDATE
Internet Telephony
77
Interworking

PSTN Interworking



A SIP URL
A network gateway
Fig. 5-27


Fig. 5-28


SIP to PSTN call
PSTN to SIP call
PSTN – SIP – PSTN


MIME media types
For ISUP and QSIG
Internet Telephony
78
Internet Telephony
79
Internet Telephony
80
Interworking with H.323


An Internet draft
SIP-H.323 interworking gateway
Internet Telephony
81
Internet Telephony
82
Internet Telephony
83
Internet Telephony
84
Internet Telephony
85
Summary

The future for signaling in VoIP networks



Simple, yet flexible
Easier to implement
Fit well with the media gateway control protocols
Internet Telephony
86