speaker : hsuan-ling weng advisor : dr. kai-wei ke date: 2015/11/05 1
TRANSCRIPT
1
VoIP: SIP&H.323
Speaker : Hsuan-Ling Weng
Advisor : Dr. Kai-Wei Ke
Date: 2015/11/05
2
Outline VoIP
SIP Features Network elements Operation Messages Message flow of calling procedure
H.323 Typical H.323 Stack Network Elements Zone RAS H.225 Call Signaling H.245 Message flow of calling procedure
References
3
VoIP Voice over IP (VoIP) is a methodology and group of technologies for
the delivery of voice communications and multimedia sessions over Internet Protocol (IP) networks, such as the Internet.
Other terms commonly associated with VoIP are IP telephony, Internet telephony, broadband telephony, and broadband phone service.
4
SIP Session Initiation Protocol (SIP) is the core protocol for initiating,
managing and terminating sessions in the Internet. These sessions may be text, voice, video or a combination of these. SIP sessions involve one or more participants and can use unicast or
multicast communication.
5
SIP - Features
Find out IP Address(Location) of users Session Initiation Session Management
6
SIP - Network elements User agent:
A SIP user agent (UA) is a logical network end-point used to create or receive SIP messages and thereby manage a SIP session.
A SIP UA can perform the role of a user agent client (UAC), which sends SIP requests, and the user agent server (UAS), which receives the requests and returns a SIP response.
7
SIP - Network elements(cont.) Proxy server
The proxy server is an intermediary entity that acts as both a server and a client for the purpose of making requests on behalf of other clients.
A proxy server primarily plays the role of routing, meaning that its job is to ensure that a request is sent to another entity closer to the targeted user.
8
SIP - Network elements(cont.) Registrar
A registrar is a SIP endpoint that accepts REGISTER requests and places the information it receives in those requests into a location service for the domain it handles.
9
SIP - Network elements(cont.) Redirect server
A user agent server that generates 3xx (Redirection) responses to requests it receives, directing the client to contact an alternate set of URIs.
The redirect server allows proxy servers to direct SIP session invitations to external domains.
10
SIP - Operation
110
23
4
5
6
9
78
User Agent Client
User Agent Server
SIP Proxy Server SIP Proxy Server
Redirect Server Registrar
RTP Stream
11
11
SIP – Messages There are two different types of SIP messages: requests and
responses. SIP request
REGISTER: Used by a UA to register to the registrar. INVITE: Used to establish a media session between user agents. ACK: Confirms reliable message exchanges. CANCEL: Terminates a pending request. BYE: Terminates an existing session. OPTIONS: Requests information about the capabilities of a caller without
the need to set up a session. Often used as keepalive messages. REFER: indicates that the recipient (identified by the Request-URI) should
contact a third party using the contact information provided in the request. (call transfer)
12
SIP – Messages(cont.) SIP response
Provisional (1xx): Request received and being processed. Success (2xx): The action was successfully received, understood, and
accepted. Redirection (3xx): Further action needs to be taken (typically by sender)
to complete the request. Client Error (4xx): The request contains bad syntax or cannot be fulfilled
at the server. Server Error (5xx): The server failed to fulfill an apparently valid request. Global Failure (6xx): The request cannot be fulfilled at any server
13
SIP - Message flow of calling procedure
Proxy ServerUAC UAS
INVITE
100 Trying
INVITE
180 Ringing
200 OK
ACK
200 OK
ACK
200 OK
BYE
180 Ringing
Conversation
14
H.323
H.323 was first approved in February 1996, the same month that the first SIP draft was published.
Designed to operate over complex networks, such as the Internet. First standards-based “Voice over IP”. H.323 is a multimedia conferencing protocol, which includes voice,
video, and data conferencing, for use over packet-switched networks.
15
H.323(cont.) H.323 – “Umbrella” document that describes the usage of H.225.0,
H.245, and other related documents for delivery of packet-based multimedia conferencing services.
H.225.0 – Describes three signaling protocols (RAS, Call Signaling, and “Annex G”).
H.245 – Multimedia control protocol (common to H.310, H.323, and H.324).
16
H.323 - Typical H.323 Stack
17
H.323 - Network Elements Terminal
Terminals are the client endpoints on the LAN that provide real-time, two-way communications. All terminals must support voice communications; video and data are optional.
All H.323 terminals must also support H.245, which is used to negotiate channel usage and capabilities. Three other components are required: Q.931 for call signaling and call setup, a component called Registration/Admission/Status (RAS), which is a protocol used to communicate with a Gatekeeper; and support for RTP/RTCP for sequencing audio and video packets.
T
18
H.323 - Network Elements(cont.) Gateway
The Gateway is composed of a “Media Gateway Controller” (MGC) and a “Media Gateway” (MG), which may co-exist or exist separately
The MGC handles call signaling and other non-media-related functions The MG handles the media Gateways interface H.323 to other networks, including the PSTN, H.320
systems, other H.323 networks (proxy), etc.
GW
19
H.323 - Network Elements(cont.) MCU
Responsible for managing multipoint conferences (two or more endpoints engaged in a conference)
The MCU contains a Multipoint Controller (MC) that manages the call signaling and may optionally have Multipoint Processors (MPs) to handle media mixing, switching, or other media processing
MCU
20
H.323 - Network Elements(cont.) Gatekeeper
The Gatekeeper is an optional component in the H.323 system which is used for admission control and address resolution
The gatekeeper may allow calls to be placed directly between endpoints or it may route the call signaling through itself to perform functions such as follow-me/find-me, forward on busy, etc.
GK
21
H.323 - Zone A single Gatekeeper and all of the devices connected to it There may be more than one physical Gatekeeper device that
provides the logical Gatekeeper functionality for a zone
GK
GW
MCU
T
There is no imposed limit on the number or types of
devices in a zone
22
H.323 – RAS Registration, Admission, and Status Used between the endpoint and its Gatekeeper in order to
Allow the Gatekeeper to manage the endpoint Allow the endpoint to request admission for a call Allow the Gatekeeper to provide address resolution functionality for the
endpoint
RAS signaling is required when a Gatekeeper is present in the network (i.e., the use of a Gatekeeper is conditionally mandatory)
23
H.323 – RAS(cont.) RAS messages generally have three types
Request (xRQ) Reject (xRJ) Confirm (xCF)
Exceptions are Information Request / Response / Ack / Nak The “nonStandardMessage” The “unknownMessage” response Request in Progress (RIP) Resource Available Indicate / Confirm (RAI/RAC) Service Control Indication / Response
24
H.323 - RAS(cont.) Typically, RAS communications is carried out via UDP through port
1719 (unicast) and 1718 (multicast) For backward compatibility sake, an endpoint should be prepared to
receive a unicast message on port 1718 or 1719 Only UDP is defined for RAS communications
GRQ and LRQ may be send multicast, but are generally sent unicast All other RAS messages are sent unicast
25
H.323 - RAS(cont.) Gatekeeper Request - GRQ
When an endpoint comes to life, it should try to “discover” a gatekeeper by sending a GRQ message to a Gatekeeper Address of a Gatekeeper may be provisioned The endpoint may send a multicast GRQ Address of a Gatekeeper may be found through DNS queries (Annex O/H.323)
There may be multiple Gatekeepers that could service an endpoint, thus an endpoint should look through potentially several GCF/GRJ messages for a reply
26
H.323 - RAS(cont.) Gatekeeper Registration – RRQ
Once a Gatekeeper has been “discovered”, the endpoint will then register with the Gatekeeper in order to receive services
Communication is exclusively via port 1719 (unicast) Endpoint will send an RRQ and expect to receive either an RCF or RRJ
27
H.323 - RAS(cont.) Admission Request - ARQ
Once registered with a Gatekeeper, the endpoint may only initiate or accept a call after first requesting “admission” to the Gatekeeper via the ARQ message
The Gatekeeper may accept (ACF) or reject (ARJ) the request to place or accept a call
28
H.323 - RAS(cont.) Location Request - LRQ
The LRQ message is sent by either an endpoint or a Gatekeeper to a Gatekeeper in order to resolve the address of an alias address (e.g., to turn a telephone number into an IP address)
While LRQs may be sent by endpoints, they are almost exclusively sent by Gatekeepers
29
H.323 - RAS(cont.) Bandwidth Request - BRQ
Subsequent to initial call setup, the endpoint may wish to use more or less bandwidth than previously indicated via the BRQ Note that, while it is syntactically legal for the GK to send a BRJ to a request
asking for less bandwidth, this makes no sense and should not be done An endpoint must send a BRQ subsequent to initial call establishment if
the actual bandwidth utilized is less than initially requested
30
H.323 - RAS(cont.) Disengage Request - DRQ
Once a call completes, the endpoint sends a DRQ message to the Gatekeeper The Gatekeeper may send a DRJ, but this is strongly discouraged… if
an endpoint is sending a DRQ, it means the call is over and cannot be “rejected”!
The Gatekeeper may also send a DRQ to force the endpoint to disconnect the call
31
H.323 - RAS(cont.) Information Request - IRQ
The IRQ is sent by the Gatekeeper to the endpoint to request information about one or all calls
There are many details about each call that are reported to the Gatekeeper in the Information Response (IRR) message
32
H.323 - H.225 Call Signaling H.225.0 Call Signaling is used to establish calls between two H.323
entities It was derived from Q.931 (ISDN call signaling), but was modified to
be suitable for use on a packet based network H.225.0 also borrows messages from Q.932
33
H.323 - H.225 Call Signaling(cont.) H.225.0 Call Signaling Messages
Setup
Call Proceeding
Alerting
Information
Release Complete
Facility
Progress
Status
Status Inquiry
Setup Acknowledge
Notify
Connect
34
H.323 - H.225 Call Signaling(cont.)
35
H.323 – H.245 H.245 provides “control” to the multimedia session that has been
established Terminal capability exchange Master/Slave determinations Logical channel signaling Closing the H.245 Control Channel
36
H.323 – H.245(cont.) Four H.245 Message Types(and examples of each)
Request masterSlaveDetermination terminalCapabilitySet
Response masterSlaveDeterminationAck terminalCapabilitySetAck
Command sendTerminalCapabilitySet
Indication userInput
37
H.323 - H.245(cont.) Capabilities Exchange
The capability exchange (or “caps exchange”) allows two endpoints to exchange information about what media capabilities they possess, such as G.711, G.723, H.261, and H.263
Along with the type of media, specific details about the maximum number of audio frames or samples per packet is exchanged, information about support for silence suppression, etc. are exchanged
Using this capability information, endpoints can select preferred codes that are suitable to both parties
38
H.323 - H.245(cont.) Master Slave Determination
Once capabilities are exchanged, the endpoints negotiate master and slave roles
The master in a point to point conference really only has the power to indicate when channels are in conflict (e.g., when one the other terminal tries to open a channel that is not compatible)
The slave device must yield to the requests of the master device and reconfigure channels appropriately
39
H.323 - H.245(cont.) Logical Channel Signaling
Channels are opened by exchanging “openLogicalChannel” (OLC) messages
The OLC will contain one of the capabilities that was previously advertised by the other endpoint
Within the OLC, a “session ID” is assigned Session 1 is the default audio session, 2 is the default video session, and
3 is the default data session
40
H.323 - H.245(cont.) Closing the H.245 Control Channel
H.323 specifies that, in order to close the H.245 Control Channel, the endpoint must: Close all open logical channels Wait for all acknowledgement messages Send an “endSession” command Wait for an “endSession” from the other side
In reality, most endpoint vendors don’t bother– they just use the H.225.0 Release Complete command to terminate the call and close the H.245 Control Channel, as that is much more efficient
41
H.323 - Message flow of calling procedure
Caller PC Callee PC Gatekeeper
Gatekeepr Request
Gatekeeper Confirm
Registration Request
Registration Confirm
Gatekeep Request
Gatekeeper Confirm
Registration Request
Registration Confirm
Admission Request
Admission Confirm
Admission Request
Admission Confirm
Setup
Call Proceeding
Alerting
Connect
Master Slave Determination
Terminal Capability Set
Open Logical Channel
RTP or RTCP
RTP or RTCP
.
.
.
RAS
H.225
RAS
H.225
H.245
Voice communication
42
References [1] Voice over IP, URL: https://en.wikipedia.org/wiki/Voice_over_IP [2] Session Initiation Protocol,
URL: https://en.wikipedia.org/wiki/Session_Initiation_Protocol#SIP_messages [3] H.323 Papers and Presentations,
URL: https://www.packetizer.com/ipmc/h323/papers/ [4] 黃威穎著,「H.323網路電話音訊監控與錄製系統之研製」,碩士論文,國立台北科技大學資訊工程系碩士班,台北, 2008。
[5] 蔡家瑞著,「客製化H.323協定之至慧型網路電話監控語錄音系統」,碩士論文,國立台北科技大學資訊工程系碩士班,台北, 2009。
[6] 張以磊著,「分散式網路事件分析紀錄系統之研製」,碩士論文,國立台北科技大學資訊工程系碩士班,台北, 2013。
43
Thanks for listening