You are on page 1of 18

Session Initiation Protocol

(SIP)
(SIP)
Session Initiation Protocol
Session Initiation Protocol

The session initiation protocol (SIP) is an application-layer signaling-control protocol used to establish, maintain, and terminate multimedia sessions.

Multimedia sessions include internet telephony, conferences, and other similar applications involving such media as audio, video, and data

Session Initiation Protocol
Session Initiation Protocol

You can use SIP invitations to establish sessions and carry sessions descriptions. SIP supports unicast and multicast sessions as well as point-to-point and multipoint calls.

You can establish and terminate communications using the following five SIP facets:

User location, user capability, user availability, call setup, and call handling

User Agents
User Agents

User agents are client end system applications that contain both a user- agent client (UAC) and a user-agent (UAS), otherwise known as client and server, respectively.

Client—Initiates SIP requests and acts as the user’s calling agent.

Server –Receives requests and returns responses on behalf of the users; acts as the user-called agent.

Network Services
Network Services

Two types of sip network servers exist: proxy servers and redirect servers:

Proxy servers

Acts on behalf of others clients and contains both client and server functions. A proxy server interprets and can rewrite request headers before passing them on to other servers. Rewriting the headers identifies the proxy as the initiator of the request and ensures that replies follow the same path back to the proxy instead of the client.

Redirect Server

Accepts sip requests and sends a redirect response back to the client containing the address of the next server. Redirect servers do not accept calls, nor do they process or forward sip requests.

Addressing
Addressing

SIP addresses, also called sip universal resource locators (URLs) exist in the form of users @ hosts. Similar to email addresses; a sip URL is identified by user @ host. The user portion of the address can be a user name of telephone number, and the host portion can be a domain name or network address. You can identify a user’s sip URL by his or her email address. The following examples depicts two possible sip user

Sip: ciscopress@cisco.com Sip: 4085262222@171.171.171.1

Locating a Server
Locating a Server

A client can send a sip request either directly, to a locally configured proxy server, or to the IP address and port of the corresponding sip URL. Sending a sip request directly is relatively easy, as the end-system application knows the proxy server. Sending a sip request in the second manner is somewhat more complicates, for the following reasons

Locating a Server
Locating a Server

The client must determine the IP address and port number of the server for which the request is destined.

If the port number is not listed in the requested sip URL, the default port is 5060.

If the protocol type is not listed in the request sip URL, the client must first attempt to connect using user datagram protocol and then transmission control protocol (TCP).

The client queries the domain name system (DNS) server for the host IP address. If it finds no address records, the client is unable to locate the server and cannot continue with the request.

SIP Transactions.
SIP Transactions.

After addressing is resolved, the client sends one or more sip requests and receives one or more responses from the specified server

Locating a user
Locating a user

The called party might move from one to several end systems over time. He or she might move form the corporate local area network (LAN) to a home office through his or her internet service provider (ISP), or to a public internet connection while attending a conference

Session Initiation Protocol

Background
Background

IETF RFC2543 issued in 1999 Protocol for creating, modifying, and terminating sessions (Internet multimedia conferences, Internet telephone calls, and multimedia distributions) with one or more participants Distributed call processing with intelligent endpoints Based on IETF standards (RTP, RTCP, HTTP, SDP, DNS, SAP, RTSP) Addressing by E.164, e-mail, or DNS SRV record

Cisco SIP Components 3 - INVITE PS LOC RED 2 - INVITE 4 - 3XX Redirect
Cisco SIP Components
3 - INVITE
PS
LOC
RED
2 - INVITE
4 - 3XX Redirect
Cisco SIP Components 3 - INVITE PS LOC RED 2 - INVITE 4 - 3XX Redirect

1 - REGISTER

7 - 200 OKAY

IPP
IPP

RTP

Cisco SIP Components 3 - INVITE PS LOC RED 2 - INVITE 4 - 3XX Redirect

5 - INVITE

6 - 200 OKAY

User Agent SIP-GW
User
Agent
SIP-GW

Cisco SIP Proxy Server (PS)

Registration Server (REG) - Accepts registration requests from UAs Redirect Server (RED) - Maps SIP request to one or more addresses Location Server (LOC) - Provides information on a callee’s location

User Agent (UA)

Cisco SIP Gateway (SIP-GW) Cisco IP Phones (IPP)

SIP Messages
SIP Messages

INVITE – Indicates a user or service is being invited to participate in a call session

ACK – Confirms that the client has received a final response to an INVITE request

BYE – Terminates a call and can be sent by either the caller or the callee

CANCEL – Cancels any pending searches but does not terminate a call that currently is in progress

OPTIONS – Queries the capabilities servers

REGISTER – Registers the address listed in the To header field with a SIP server (not gateway)

SIP Addressing
SIP Addressing

Fully-qualified domain names

sip:jdoe@cisco.com

E.164 addresses

sip:14085551234@gateway.com; user=phone

Mixed addresses

sip:14085551234@10.1.1.1; user=phone sip:jdoe@10.1.1.1

E.164 addresses

tel:14085551234

Modeled after mailto URLs

SIP Headers Explained
SIP Headers Explained

Received: Tells if this messages was Sent or Received INVITE sip:23198@172.17.207.91:5060 SIP/2.0 - Request URI line Expires: When this SIP message will expire (in seconds) Content-Type: What type of body will be attached to the SIP message Via: A list of all SIP devices that were in the signaling path; also includes Proxy “branch” parameter To: The destination of the SIP message From: The originator of the SIP message Call-ID: The unique Call Identifier CSeq: A sequence of messages in that Method Contact: Where the CallingParty can be reached for the return signaling path Content-Length: The length of the body attached to the SIP message User-Agent: The device that initiated the SIP message Accept: What application should be used to read the Sip body Record-Route: The list of SIP Proxies that must be in the return signaling path

SIP Headers Explained
SIP Headers Explained

v=the SDP version o=the Organization of the device that originated the SDP message s=the Description of the SDP message c=the IPAddress or Hostname that the originator expects the media to arrive at t=the Time field m=the Description of the media that the originator expects to receive a=a description of the media attributes a=a description of the media attributes

SIP Signaling LOC RED jifrench@cisco.com PS PS IPP X1001 NetA IP NetB SIP-GW
SIP Signaling
LOC
RED
jifrench@cisco.com
PS
PS
IPP
X1001
NetA
IP
NetB
SIP-GW
 

INVITE

INVITE
TRYING

TRYING

RINGING

INVITE TRYING RINGING 200 OK ACK BYE 200 OK
 

200

OK

INVITE TRYING RINGING 200 OK ACK BYE 200 OK
INVITE TRYING RINGING 200 OK ACK BYE 200 OK
 

ACK

ACK

BYE

BYE
200 OK

200

OK

SIP Signaling LOC RED jifrench@cisco.com PS PS IPP X1001 NetA IP NetB SIP-GW INVITE TRYING RINGING

INVITE

INVITE

RINGING

REDIRECT

 

INVITE

INVITE

INVITE

 
TRYING

TRYING

RINGING

RINGING

INVITE INVITE TRYING RINGING 200 OK Media ACK ACK BYE BYE 200 200 OK OK
200 OK
  • 200 200 OK

OK

200 OK
 

Media

 
 

ACK

ACK

ACK

BYE

BYE

BYE

200 200 OK OK
  • 200 200 OK

OK

200 200 OK OK
SIP Signaling LOC RED jifrench@cisco.com PS PS IPP X1001 NetA IP NetB SIP-GW INVITE TRYING RINGING

Cisco IOS Software SIP

Configuration LOC RED 1XXX 10.1.1.1 10.1.2.1 2XXX PBX PBX PS PS PBX PBX NetA IP NetB
Configuration
LOC
RED
1XXX
10.1.1.1
10.1.2.1
2XXX
PBX
PBX
PS
PS
PBX
PBX
NetA
IP
NetB
SIP-GW
SIP-GW
dial-peer voice 1 voip
dial-peer voice 1 voip
destination-pattern [1-7] ...
destination-pattern [1-7]…
dtmf-relay cisco-rtp
dtmf-relay cisco-rtp
application session
application session
session protocol sipv2
session protocol sipv2
codec g711ulaw
codec g711ulaw
session target sip-server
session target sip-server
!
!
dial-peer voice 2 pots
dial-peer voice 2 pots
application session
application session
destination-pattern 1…
destination-pattern 2…
port 1/1
port 1/1
!
!
sip-ua
sip-ua
sip-server ipv4:10.1.1.1
sip-server ipv4:10.1.2.1