Module 8 Overview of SIP 2081a - 08
Module 8 Overview of SIP 2081a - 08
SIP
Contents
Overview 1
Lesson: Introducing SIP 2
Lesson: Structure of a SIP Message 5
Review 13
Module 8: Overview of SIP 1
Overview
Introduction This module provides an overview of SIP. It does not cover all the aspects of
SIP. The objective of this module is to make you familiar with the SIP protocol
and the SIP message structure. This knowledge will help you use some of the
troubleshooting tools in Live Communications Server 2003 to diagnose client
and server communication problems. For complete understanding of SIP, it is
recommended that you read the document, SIP Request for Comment (RFC)
3261.
Objectives After completing this module, you will be able to:
Describe SIP and explain how the basic SIP session is established.
Describe the structure of a SIP message.
2 Module 8: Overview of SIP
Introduction This lesson provides an overview of SIP and explains how SIP establishes a
basic communication session.
Lesson objectives After completing this lesson, you will be able to:
Describe SIP.
Explain how a basic SIP session is established.
Module 8: Overview of SIP 3
What is SIP?
Introduction SIP is an application-layer control protocol that handles the setup, modification,
and tear-down of multimedia sessions. SIP is used in combination with other
protocols to describe the session characteristics to potential session participants.
SIP is based on a request and response transaction model similar to HTTP. Each
transaction consists of a request that invokes a particular method or a function
on the server and at least one response.
SIP entities SIP is generally considered to be a client–server protocol. It has two classes of
entities:
Client. A client is an application program that sends a SIP request. The
client can be a software program, such as Windows Messenger 5.0, or a
hardware device, such as a SIP telephone.
Server. A server generally responds to a request sent by a client. A server
can be a software application, such as Live Communications Server 2003, or
a hardware device.
Different roles of a SIP SIP servers have different roles, such as:
server
Proxy server. A SIP proxy works like an HTTP proxy server. When a client
sends requests to the proxy, the proxy either handles them or forwards them
to other servers.
Redirect server. A SIP redirect server accepts a SIP request and conveys to
the originating client the way to route the call.
Registrar server. A SIP registrar server accepts registration requests and
maps a client’s address to a user’s sign-in name, or SIP URI. Typically, a
registrar is combined with a proxy or redirect server.
Note With Live Communications Server 2003, a home server plays the role of
both redirect and registrar SIP servers. A front-end server is a redirect server.
4 Module 8: Overview of SIP
Introduction The process to establish a session starts with an INVITE message, which is sent
from a calling user to a called user, inviting the called user to participate in a
session. The caller might receive a number of interim responses before the
called user accepts the call. For example, the caller might be informed that the
called user is being alerted (the phone is ringing). When the called user answers
the call, an OK response is generated and sent to the calling client. The calling
client sends an ACK message after which media, such as voice, video, or text,
is exchanged. After one of the users hangs up, a BYE message is generated and
sent to the other client. The other client confirms that the session is over, after
which the call ends.
Module 8: Overview of SIP 5
Introduction This lesson explains the basic structure of a SIP message. It describes the
different methods that are used in a SIP request and the different classes that
specify the status of a SIP response. It also describes the various types of
headers that can be part of a SIP message. In addition, the lesson covers the
tools, SIPLogger and SIPParser, which can be used to read a SIP message.
Lesson objectives After completing this lesson, you will be able to:
Identify the structure of a SIP message.
Describe the methods used in a SIP message.
Identify the classes that are included in a SIP response to describe its status.
Describe the different types of SIP headers.
Describe the tools that are used to read a SIP message.
6 Module 8: Overview of SIP
Introduction SIP is a text-based protocol that is similar to HTTP, which makes it easy read
and understand.
Structure of a SIP A SIP message is either a request from a client to a server or a response from a
message server to a client. Both the request and the response contain a start-line followed
by one or more headers and a message body. For example:
message = start-line
*message header
CRLF
[message-body]
The request line specifies the type of request being issued, while the response
line indicates the success or failure of a request. If a request is not executed, the
status line indicates the type of failure or the reason for the failure.
Module 8: Overview of SIP 7
SIP Request
Introduction A SIP request consists of a method token, a request URI, and the SIP version. A
method token is used to identify the request. The request URI is the address of
the device where the request is being sent.
Methods for handling The original SIP RFC 3261 defines six methods, which are used for different
different types of types of requests. The following table describes these methods:
request
Method Name Description
SIP method extensions A number of extensions and enhancements have been made to the original SIP
RFC 2543. This includes the addition of the following new methods to SIP,
which can be used for event notification, instant messaging and call control:
SUBSCRIBE. The SUBSCRIBE method enables a user to subscribe to
certain events. This means that the user should be informed when such
events occur.
NOTIFY. The NOTIFY method is used to inform the user that a subscribed
event has occurred. Windows Messenger uses the SUBSCRIBE method to
request contacts, groups, and allow and block lists from the server and to get
the presence of contacts in a group. Live Communications Server 2003 uses
the NOTIFY method to deliver the data obtained by the SUBSCRIBE
method to the client.
MESSAGE. SIP can also be used for Instant Messaging. A user sends an
instant message to another user by sending a request that includes the
MESSAGE method. This request carries the actual text in a body of a SIP
packet.
INFO. The INFO method is used for transferring information during a
session, such as user activity. For example, Windows Messenger 5.0 uses
the INFO method to inform the called user that Bob, the calling user, is
typing on the keyboard. As a result, in the conversation UI, the called user
sees a dialog, “bob is typing.”
SERVICE. The SERVICE method can carry a Simple Object Access
Protocol (SOAP) message as its payload. Windows Messenger 5.0 uses the
SERIVCE method to add contacts and groups on the server. This method is
also used to search for contacts in the SIP domain.
NEGOTIATE. The NEGOTIATE method is used to negotiate various
kinds of parameters, such as security mechanisms and algorithms. Live
Communications Server 2003 uses the NEGOTIATE method to provide
compression between clients and servers.
REFER. A REFER request enables the sender of the request to instruct the
receiver to contact a third party using the contact details provided in the
request. Call Transfer is a commonly used application of the REFER
method.
Module 8: Overview of SIP 9
SIP Response
Introduction A SIP response contains a status code, which is a three-digit number that
indicates the outcome of the request. The response also contains a reason
phrase, which provides a textual description of the outcome of the request. The
reason code is interpreted and acted upon by the client software. The reason
phrase helps the user understand the response.
Status codes defined in SIP have values between 100 and 699 and the first digit
of the reason code indicates the response class. For example, all the status codes
between 100 and 199 belong to one class.
Different classes of a The following table describes the different classes in SIP:
response
Class Name Description
1xx: Provisional Request received, continuing to process the request. For example,
180 indicates that the phone of the called user is ringing.
2xx: Success Action was successfully received, understood, and accepted. Only
200 OK and 202 ACCEPTED have been defined in this class.
3xx: Further action needs to be taken to complete the request. For
Redirection example, a front-end server sends 302 to redirect the client to a
home aerver.
4xx: Client Request contains bad syntax or cannot be fulfilled at this server. For
Error example, a Home Server sends a response, 401 Unauthorized, if the
client needs to provide credentials.
5xx: Server Server failed to fulfill a valid request. For example, a server sends a
Error response, 504 Timeout, if MTLS has not been configured between
the home servers.
6xx: Global Request cannot be fulfilled at any server. This is a new class defined
Failure for SIP, but is not currently used with Live Communications Server
2003.
10 Module 8: Overview of SIP
SIP Headers
Introduction SIP includes a number of message headers in a SIP message. These headers
contain information that enables the receiver to understand the message better
or handle the message properly. Some headers make sense only in certain
requests or responses. In some cases, the presence of a particular header
depends on the context. The presence of a particular header in a response might
be reasonable only if the response is issued to a specific request.
General headers Some headers can be used in both requests and responses. They are known as
general headers. Such headers contain basic information. For example, the To:
header field indicates the recipient of the request, From: indicates the originator
of the request, and Call-ID: uniquely identifies a specific invitation to a session.
Request headers Request headers apply only to SIP requests. They are used to provide additional
information to the server about the request or the client. For example, Subject:
can be used to provide a textual description of the topic of the session. Priority:
is used to indicate the urgency of the request, such as emergency, urgent,
normal, or nonurgent.
Response headers Response header fields apply only to response (status) messages. These header
fields are used to provide further information about the response that cannot be
included in the status line. For example, Unsupported: is used to identify those
features that are not supported by the server. Retry-After: indicates when a
called user will be available if the user is currently busy or unavailable.
Module 8: Overview of SIP 11
Introduction The SipLogger and SipParser tools can be used to read a SIP message.
SipLogger SipLogger is an executable file with a readme file, LoggerReadme.htm that
contains information about the installation and use of SipLogger.
SipLogger allows the Live Communications Server administrator to log SIP
traffic on the server before it is encrypted. SipLogger helps the administrator
debug communication issues between clients and servers and between multiple
servers. Messages are sent to a text file that is selected during SipLogger
startup. The default maximum size of the file is 100 MB. Note that SipLogger is
not intended to replace the Live Communications Server IM Archiving Server.
SipParser SipParser is a dynamic-link library (DLL) that works with Network Monitor to
enable parsing of the SIP signaling information exchanged between clients and
servers. SipParser captures only SIP messages sent over TCP or UDP. TLS is
not supported because of encryption. SipParser requires the installation of
Network Monitor on the computer where SIP messages need to be parsed. A
readme file, SipParserReadme.html, contains information about the installation
and use of SipParser.
Module 8: Overview of SIP 13
Review
2. What are the 6 original methods that were described in the first SIP RFC?
INVITE, ACK, CANCEL, BYE, REGISTER, and OPTIONS.
6. What status code does a server respond with if there is a client error?
4xx