4 SIP Overview
Transcript of 4 SIP Overview
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 1/59
Session Initiation Protocol (SIP)
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 2/59
Internet Telephony
SIP based VoIP Architecture
Legacy PBX
SIP User Agents (UA)
ApplicationServices
eMail LDAP Oracle XML
SIPSIP
RTP(Media)
SIP
CPL
CPL3pcc
PSTN
CAS or PRI
INTELLI
GENT
SERV
ICES
SIP Proxy, Registrar & Redirect Servers
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 3/59
Internet Telephony
Basic SIP Call-Flow
SIP UA1 SIP UA2
INVITE w/ SDP for Media Negotiation
100 Trying
180/183 Ringing w/ SDP for MediaNegotiation
200 OK
200 OK
BYE
MEDIA
MEDIA
ACK
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 4/59
Internet Telephony
SIP Call Flow with Proxy Server
Proxy Server
Register
OK (200)
Register
OK (200)
Invite InviteTrying (100) Ringing (180)Ringing (180)
OK (200)
OK (200)ACK ACK
RTP/RTCP mediachannels
User Agent 1 User Agent 1
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 6/59
Internet Telephony
Customer Premises
IP CoreNetwork
Step1: IPPBX deployments in Enterprises
DNS Server for URLresolutionLarge enterprises will handle VOIP callsdirectlyPSTN connectivity provided by MediaGatewaysRegulation can not stop spammersoutside USA
(similar to SMTP spam)
Customer Premises
PSTNNetwork
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 7/59
Internet Telephony
Customer Premises
Carrier Network
Softswitches, MGWVoIP Proxy Server, SGW
SGC, VoIP CentrexServer,
Internet
STEP 2: H osted IP Centrex FW, NAT, VoIP service provided by Carrier Networks
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 8/59
Internet Telephony
Customer Premises
Carrier Network
Step 3: Carrier VoIP Network
Softswitches, MGWVoIP Proxy Server, SGWSGC, VoIP CentrixServer,
Internet
- VoIP FW, NAT and Security provided byCarriers
VoIP Trunk
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 10/59
Internet Telephony
The Popularity of SIP
O riginally Developed in the MMUSICo A separate SIP working groupo RFC 2543, RFC 3261o Many developers
SIP + MGCP/MEGAC Oo The VoIP signaling in the future
³ back-off´ or SIPit (SIP Interoperability Tests)o Test products against each other o Will be hosted by ETSI
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 11/59
Internet Telephony
SIP Architecture
A signaling protocolo The setup, modification, and tear-down of
multimedia sessionsSIP + SDP
o Describe the session characteristicsSeparate signaling and media streams
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 12/59
Internet Telephony
SIP Network Entities
Clientso User agent clientso Application programs sending SIP requests
Serverso Responds to clients¶ requestsClients and servers may be in the same
platformProxy
o Acts as both clients and servers
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 13/59
Internet Telephony
Four types of serverso Proxy servers
H andle requests or forward requests to other serversCan be used for call forwarding
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 14/59
Internet Telephony
Redirect serverso Map the destination address to zero or more new addresseso Do not initiate any SIP requests
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 15/59
Internet Telephony
A user agent server o Accept SIP requests and contacts the user o The user responds an SIP responseo A SIP deviceo E.g., an SIP-enabled telephone
A registrar o Accepts SIP REGISTER requestsIndicating the user is at a particular address
o Typically combined with a proxy or redirect server
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 16/59
Internet Telephony
SIP Call Establishment
It is simpleo A number of interim responses
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 17/59
Internet Telephony
SIP Advantages
Attempt to keep the signaling as simple as possible O ffer a great deal of flexibility
Various pieces of information can be included withinthe messages
o Including non-standard informationo Enable the users to make intelligent decisions
The user has control of call handlingo No need to subscribe call features
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 18/59
Internet Telephony
Call Completion to Busy Subscriber service
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 19/59
Internet Telephony
Via contains the address (e.g., pc33.atlanta.com)Contact contains a SIP or SIPS URI that represents a direct routeto contact the called party, usually composed of username at a fulyqualified domain name (FQDN). While the FQDN is preferred,many end systems do not have registered domain names, so IPaddresses are permitted. While Via header field tells other elements where to send response, the Contact header field tellsother elements where the called party can be reached directly.In a response, Via, To, From, Call-ID, and CSeq header fields arecopied from the INVITE request.In addition to DNS and location service lookups, proxy servers canmake flexible ³ routing decisions´ to decide where to send a request.For example, if Bob¶s SIP phone returned 486 (busy) response, thebiloxi.com proxy server could proxy the INVITE to Bob¶s voicemailserver. A proxy server can also send an INVITE to a number of locations at the same time. This type of parallel search is known asforking.
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 20/59
Internet Telephony
After learning the end point addresses, the endpoints can communicate directly
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 21/59
Internet Telephony
O verview of SIP Messaging Syntax
Text-basedo Similar to H TTP
SIP messageso message = start-line
*message-header CRLF[message-body]o start-line = request-line | status-line
Request-line specifies the type of requestThe response line
o The success or failure of a given request
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 22/59
Internet Telephony
Message headerso Additional information of the request or responseo E.g.,
The originator and recipientRetry-after header Subject header
Message bodyo Describe the type of session
The media formatSDP, Session Description Protocol
o Could include an ISDN User Part messageo Examined only at the two ends
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 23/59
Internet Telephony
SIP Requests
method SP request-URI SP SIP-version CRLFrequest-URI
o The address of the destinationMethods
o INVITE, ACK, O PTI O NS, BYE, CANCLE,REGISTERextensions: INF O , REFER, UPDATE, «
o INVITEInitiate a session
Information of the calling and called partiesThe type of mediaIAM (initial address message) of ISUP
ACK only the final response
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 24/59
Internet Telephony
BYEo Terminate a sessiono Can be issued by either the calling or called party
O ptionso Query a server as to its capabilities
A particular type of mediaThe response if sent an INVITECANCEL
o Terminate a pending requesto E.g., an INVITE did not receive a final response
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 25/59
Internet Telephony
REGISTERo Log in and register the address with a SIP server o ³ all SIP servers´ ± multicast address (224.0.1.1750)o Can register with multiple serverso Can have several registrations with one server
INFO
o RFC 2976o Transfer information during an ongoing session
DTMF digitsaccount balance informationmidcall signaling information generated in another network
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 27/59
Internet Telephony
³O ne number´ service
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 28/59
Internet Telephony
SIP Addressing
SIP URLs (Uniform Resource Locators)o user@hosto E.g.,
sip:[email protected]:[email protected]
o Supplement the URLsip:[email protected];user=phone
o sip:user:password@host:port;uri-parameters?headers
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 29/59
Internet Telephony
Message H eaders
Provide further information about the messageo information elements
E.g.,o To:header in an INVITE
The called partyo From:header
The caling party
Four main categorieso General, request, response, and entity headerso
A list in Table 5-2o Mapping in Table 5-3
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 30/59
Internet Telephony
General H eaders
Used in both requests and responsesBasic information
o E.g., To:, From:, Call-ID:, «Contact:
o A URL for future communicationo May be different from the From: header Requests passed through proxies
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 31/59
Internet Telephony
Request H eaderso Apply only to SIP requestso Addition information about the request or the cliento E.g.,
Subject:Priority:, urgency of the request
Authorization:, authentication of the request originator
Response H eaderso Further information about the responseo E.g.,
Unsupported:, featuresRetry-After
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 32/59
Internet Telephony
Entity H eader o Session information presented to the user o Session description, SDP
The RTP payload type, an address and porto Content-Length, the length of the message bodyo Content-Type, the media type of the messageo Content-Encoding, for message compressiono Content Disposition,o Content-Language,o
Allow, used in a Request to indicate the set of methods supportedo Expires, the date and time
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 33/59
Internet Telephony
Example of SIP Message Sequences
Registrationo Via:o Call-ID:
host-specifico Content-Length:
Z ero, no msg bodyo Cseg:
Avoid ambiguityo Expires:
TTL0, unreg
o Contact:*
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 34/59
Internet Telephony
Invitation
A two-party callo Subject:
optionalo Content-Type:
application/sdp
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 36/59
Internet Telephony
Termination of a Call
Cseq:o H as changed
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 37/59
Internet Telephony
Redirect Servers
An alternative addresso 302, Moved temporarily
Another INVITEo Same Call-IDo Cseq ++
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 38/59
Internet Telephony
Proxy Servers
Entity headers are omittedChanges the Req-URIVia:
o The patho Loop detected, 482o For a responseThe 1 st Via: header
Checkedremoved
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 40/59
Internet Telephony
Proxy state
Can be either stateless or statefulRecord-Route:
o The messages and responses may not pass through the sameproxy
Use Contact:o A Proxy might require that it remains in the signaling path
In particular, for a stateful proxyo Insert its address into the Record-Route: header o The response includes the Record-Route: header o The Record-Route: header is used in the subsequent requestso The Route: header = the Record-Route: header in reverse
order, excluding the first proxyo Each proxy remove the next from the Route: header
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 41/59
Internet Telephony
Forking Proxy
³ fork´ requests A user is registered atseveral locations
o ;branch=xxx
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 43/59
Internet Telephony
The Session Description Protocol
The message bodyo SDP, RFC 2327
The Structure of SDPo Session Level Info
NameThe originator The time
o Media Level InfoMedia typePort number
Transport protocolMedia format
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 44/59
Internet Telephony
SDP session description structure
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 45/59
Internet Telephony
SDP Syntax
A number of lines of textIn each line
o field=valueSession-level fields first
Media-level fieldso Begin with media description field (m=)
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 46/59
Internet Telephony
Mandatory Fields
v=(protocol version)o=(session origin or creator and session id)s=(session name), a text stringt=(time of the session)
o t=<start time> <stop time>o NTP time values in seconds
m=(media)o m=<media> <port> <transport> <fmt list>o Media typeo The transport porto The transport protocolo The media format, an RTP payload format
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 47/59
Internet Telephony
O ptional Fileds
i=(session information)o A text descriptiono At both session and media levels
u=(URI of description)o Where further session information can be obtainedo O
nly at session levele=(e-mail address)o Who is responsible for the sessiono O nly at the session level
p=(phone number)o O nly at the session level
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 48/59
Internet Telephony
c=(connection information)o Connection type, network type, and connection addresso At session or media level
b=(bandwidth information)o In kilobits per secondo At session or media level
r=<repeat interval> <active duration> <list of offsetsfrom start- time>
o For regularly scheduled sessiono H ow often and how many times
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 49/59
Internet Telephony
z=(timezone adjustments)o z=<adjustment time> <offset> <adjustment time> <offset> ....o For regularly scheduled sessiono Standard time and Daylight Savings Time
k=(encryption key)o k=<method>:<encryption key>o An encryption key or a mechanism to obtain ito At session or media level
a=(attributes)o Describe additional attributes
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 50/59
Internet Telephony
O rdering of Fields
Session Levelo Protocol version (v)o O rigin (o)o Session name (s)o Session information (i)o URI (u)o E-mail address (e)o Phone number (p)o Connection info (c)o Bandwidth info (b)o Time description (t)o Repeat info (r)o Time zone adjustments (z)o Encryption key (k)o Attributes (a)
Media levelo Media description (m)o Media info (i)o Connection info (c)
O ptional if specified at thesession level
o Bandwidth info (b)o Encryption key (k)o Attributes (a)
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 51/59
Internet Telephony
Subfields
Field = <value of subfield1> <value of subfield2><value of subfield3> «
O rigin (o)o Username, the originator¶s login id or ³ -´o session ID
A unique IDMake use of NTP timestampo version, a version number for this particular sessiono network type
A text string; IN refers to Interneto address type
IP4, IP6o Address, a fully-qualified domain name or the IP addresso o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 52/59
Internet Telephony
Connection Datao The network and address at which media data are to be
receivedo Network type, address type, connection addresso c=IN IP4 224.2.17.12/127
Media Informationo Media type
Audio, video, application, data, or controlo Port, 1024-65535o Format
List the various types of mediaRTP/AVP payload types
o m= audio 45678 RTP/AVP 15 3 0G.728, GSM, G.711
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 53/59
Internet Telephony
Attributeso Property attribute
a=sendonlya=recvonly
o value attributea=orient:landscape
o rtpmap attributeThe use of dynamic payload typea=rtpmap:<payload type> <encoding name>/<clock rate>[/<encoding parameters>].m=video 54678 RTP/AVP 98a=rtpmap 98 L16/16000/2
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 54/59
Internet Telephony
Usage of SDP with SIP
SIP for the establishment of multimediasessionsSDP ± a structured language for describing thesessions
o The entity header
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 55/59
Internet Telephony
Negotiation of Media
Fig 5-15o G.728 is selected
If a mismatcho 488 or 606o Not Acceptableo A Warning header INVITE with multiple
media streamso Unsupported should also
be returnedo With a port number of zero
8/2/2019 4 SIP Overview
http://slidepdf.com/reader/full/4-sip-overview 57/59
Internet Telephony
O ffer/answer