This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Chapter 7: Replacing Call Signaling with VoIP
Traditional telecom engineers have balked about the wordiness, or bulkiness, of
SIP’s message structure. Instead of using compact, machine-friendly message pack-
ets like H.323, SIP uses lengthy, human-readable headers like SMTP or HTTP. Pro-
ponents of SIP counter that this human readability makes SIP easier to troubleshoot,
and I tend to agree.
SIP is currently in Version 2.0. Its definition is found in RFCs 3261 through 3265.
The defined purpose of SIP is to coordinate and facilitate monitoring of media ses-
sions on the network. It supports a variety of addressing schemes and can be
designed as a centralized or distributed topology.
SIP Nodes
SIP endpoints and servers are called nodes. A SIP phone is a node. SIP phones can com-
municate directly with each other in order to establish media sessions, just as H.323
terminals can establish direct channels. But more often than not, especially in an
enterprise setting, SIP is used with a SIP server. SIP phones normally report to a dedi-
cated SIP server node called a registrar upon boot-up.
SIP registrar
The SIP registrar is a database server that communicates with SIP nodes in order to
collect, store, and disperse information about the whereabouts of SIP users. When a
SIP node registers with a registrar, it tells that registrar how to get hold of the user,
specifically what IP address and port to use for future SIP communication. You could
think of the registrar as a router, because its main purpose is to give advice on how to
reach SIP users, just as a TCP/IP router’s purpose is to give advice on how to reach
other networks.
SIP endpoints can be referenced using Uniform Resource Indicators, but so can SIP
users. Consider this URI:
This convention indicates both the user to be contacted and the server that is
expected to know the address of that user’s SIP endpoint. In this case, the user is
lerxt and the server is Secure SIP URIs, that is, those that indicate an
encrypted signaling connection, use the sips: prefix instead of sip:. Encryption of SIP
signals, if desired, occurs by way of Transport Layer Security, defined in RFC 2246.
A SIP URI doesn’t always correspond to a single phone. If a user is available at one of
several phones, then all of those phones can ring simultaneously, or in a specific
sequence, based on the handling server’s configuration. Most SIP registrars support
simultaneous registration of the same user at multiple phones, and the most
common way of handling this situation is to ring them all when a call is received for
that user.
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
SIP methods and responses
SIP signals fall into 10 categories called methods. Each method accomplishes a differ-
ent function for SIP:
This method is used to start sessions and advertise endpoint capabilities.
This method is used to acknowledge to the called SIP peer that an INVITE has
This method occurs when the call is completed, that is, one user at a minimum
wishes to end the call.
This method is used during attempts to override a prior request that hasn’t yet
been completed.
This method is used to query a SIP peer for its capabilities information, without
actually establishing a media channel.
This method notifies the SIP server at which endpoints a particular user can be
This method is used to transmit telephony application signals through the SIP
signaling path; these signals can include dialed digits.
This method (Provisional ACK) is used to notify an endpoint of intent to set up a
complex call without actually providing an ACK. PRACK is the SIP equivalent of
“all is well.”
This method provides a way of establishing event handlers within SIP telephony
applications—i.e., “Tell me when Bob misses a call” or “Tell Bob when I am reg-
istered with the server.”
This method delivers messages between endpoints as events occur—i.e., “Bob
missed a call.”
When a call must be started, ended, or altered, a SIP method is employed. The SIP
methods in the preceding list are similar in concept to the HTTP methods GET and
POST, and like HTTP, SIP expects response codes when it sends a method. SIP’s
numeric response codes are three digits long and break down into six categories:

Get Switching to VoIP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.