Documente Academic
Documente Profesional
Documente Cultură
Voice
SIP
SIP
Overview
Session initiation protocol (SIP) is an application layer control protocol that can
establish, modify, and terminate multimedia sessions such as IP phone calls,
multimedia distribution, and multimedia conferences. It is the core component in the
multimedia data and control architecture of IETF and the RFC for it is RFC 3261.
SIP involves issues such as signaling control in IP networks and communication with
soft switch platforms, intending to build a next generation value-added service platform
to deliver better value-added services to telecom carriers, banks, and financial
organizations.
SIP is used for initiating sessions. It sets up and terminates a multimedia session
involving a group of participants and dynamically adjusts and modifies session
characteristics such as required session bandwidth, media type (voice, video, or data),
media encoding/decoding format, and multicast/unicast. SIP is based on text encoding
and constructed taking HTTP, a quite mature protocol, as a model. Easy to extend and
implement, it is suitable for implementing Internet-based multimedia conference
systems.
SIP adopts the Client/Server model and sets up user calls through communication
between user agents and proxy servers.
As an application layer protocol, SIP uses UDP for transport normally.
Terminology
I. Multimedia session
According to RFC2327, "A multimedia session is a set of multimedia senders and
receivers and the data streams flowing from senders to receivers. A multimedia
conference is an example of a multimedia session."
A session is identified by a set of username, session ID, network type, address type,
and address elements in the origin field.
Technology Introduction
Voice
SIP
There are two types of UAs: user agent client (UAC) and user agent server (UAS).
Generally, a SIP endpoint can not only originate calls as a UAC but also receive calls as
a UAS.
A UAC is a device that creates a new session request. It can be a calling SIP endpoint
or a proxy server forwarding a request to a called endpoint for example.
A UAS is a device that generates response to a SIP request. It can be a called SIP
endpoint or a proxy server receiving a request from a calling endpoint for example.
V. Location server
A location server is a device that provides UA information to proxy and redirect servers;
it retains UA information received by a registrar. Normally, location server and registrar
are co-located.
VI. Registrar
A registrar records the location information of UAs for proxy servers to retrieve. In some
simple applications, the registrar and the associated proxy server are usually
co-located.
Technology Introduction
Voice
z
SIP
Locating users or called SIP endpoints, the most powerful function of SIP. For this
purpose, SIP can use the registration information of SIP endpoints on the registrar.
In addition, it can enhance its user location service by using the location server
provided by domain name server (DNS) or lightweight directory access protocol
(LDAP).
Identifying user availability, making sure whether a called endpoint can participate
in a session. SIP supports multiple address description and addressing styles,
including username@hostname and called number@PSTN gateway address and
telephone number (such as Tel: 01012345678). Thus, a SIP caller can identify
whether a callee is attached to a PSTN network by callee's address, and then
initiate and set up the call to the callee through the gateway connected to the
PSTN.
Setting up a session, or session parameters, at both callee and caller sides. Two
parties can select the appropriate capabilities for session setup through
negotiation about media and media parameters to be used.
II. Features
The following are the features delivered by SIP:
z
Support to remote users. With SIP, an enterprise network can extend to all its
users, wherever they are.
Quick launch. The system can be updated quickly to accommodate new branches
and personnel, as well as changes resulted from job rotation or relocation.
Easy to install and maintain. Even unprofessional individuals can install and
maintain SIP systems.
Technology Introduction
Voice
SIP
SIP Messages
SIP messages, falling into SIP request messages and SIP response messages, are
encoded in text mode.
SIP request messages include INVITE, ACK, OPTIONS, BYE, CANCEL, and
REGISTER. An INVITE message is used to invite a subscriber to join a call. RFC 3261
defines the following five request messages:
z
SIP response messages, used to respond to SIP requests, indicate the status of a call
or registration, succeeded or failed. Response messages are distinguished by status
codes. Each status code is a 3-digit integer, where the first digit defines the class of a
response, and the last two digits describe the response message in more detail.
Table 1 lists the status codes of response messages.
Table 1 Status codes of response messages
Code
Description
Class
100 199
Provisional
200 299
Success
300 399
Redirection
400 499
Client error
SIP Fundamentals
I. Registration
In a complete SIP system, all SIP endpoints working as UAs should register with SIP
registrars, providing information such as location, session capabilities, and call policy.
Normally, a SIP UA sends its registrar a REGISTER request at startup or in response to
an administratively registration operation, carrying all the information that must be
recorded. Upon receipt of the request, the registrar sends back a response notifying
receipt of the request and if the registration is accepted an OK (SUCCESS) message
as well. See the following figure.
Technology Introduction
Voice
SIP
User agent
Registrar
IP network
Register
100 Trying
200 OK
Proxy server
User agent
Router A
PBX
Internet
Router B
Telephone A
Host A
Host B
Telephone B
4)
5)
Technology Introduction
Voice
SIP
Originating side
Proxy server
Terminating side
Invite
100 Trying
Invite
100 Trying
180 Ringing
180 Ringing
200OK
200OK
RTP/RTCP
BYE
BYE
200 for BYE
200 for BYE
Technology Introduction
Voice
SIP
Internet
User agent
User agent
Redirect server
Invite
100 Trying
302 Moved Temporarily
ACK
Invite
100 Trying
200 OK