0% found this document useful (0 votes)
386 views

Introduction To SIP

SIP is a signaling protocol for managing voice and video sessions over IP networks. It uses client-server architecture where clients initiate calls and servers respond to calls. The basic network entities are clients called user agents and servers such as proxy, registrar, and redirect servers. A SIP call flow involves an INVITE request to initiate a call, provisional responses like 180 Ringing, a 200 OK response to accept the call, and a BYE request to terminate the call.

Uploaded by

andago9993
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
386 views

Introduction To SIP

SIP is a signaling protocol for managing voice and video sessions over IP networks. It uses client-server architecture where clients initiate calls and servers respond to calls. The basic network entities are clients called user agents and servers such as proxy, registrar, and redirect servers. A SIP call flow involves an INVITE request to initiate a call, provisional responses like 180 Ringing, a 200 OK response to accept the call, and a BYE request to terminate the call.

Uploaded by

andago9993
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Introduction to SIP

SIP - Definition

What is SIP Protocol?


The Session Initiation Protocol (SIP) is a signaling protocol for initiating, managing and terminating voice and video sessions across packet networks. It is Based on a client-server architecture in which clients initiate calls and servers answer calls It is an IETF RFC 3261.

SIP Network Entities

SIP defines two basic classes of network entities:


Clients - also known as a User Agent (UA)

Servers such as Proxy Server, Registrar and Redirect Server

User Agent (UA)

SIP User-Agent is an endpoint entity which initiates and terminates

sessions by exchanging requests and responses The User agents consists of two components: User Agent Client UAC (originates requests) User Agent Server UAS (replay for requests)

Request

UAC

Response Request

UAS

UAS

Response

UAC

Basic SIP Call Flow

INVITE (SDP)

100 Trying
180 Ringing 200 OK (SDP) ACK

RTP / RTCP
BYE 200 OK Basic Call

SIP Requests

Method

Description

INVITE ACK BYE CANCEL OPTIONS

Used to establish media sessions between user agents Used to acknowledge final responses to INVITE requests Used to terminate an established media session

Used to terminate a pending call attempt. has no effect on an established call.


Query the capabilities of UA or servers Used by UA to notify of its current IP address and the URI for which it would like to receive calls

REGISTER

SIP Requests (cont.)

Method

Description

INFO REFER SUBSCRIBE NOTIFY PRACK UPDATE

Used for mid-call signaling (DTMF, hook-flash, etc.) Used for call transfer Used by a user agent to establish a subscription for the purpose of receiving notifications

Used by a user agent to convey information about the occurrence of a particular event (such as MWI)
Used to acknowledge receipt of reliably transported provisional responses (1xx) Used to modify the state of a session

SIP Responses

Informational

Redirection

Indicates status of call prior to completion


100 Trying 180 Ringing 181 Call is being forwarded 182 Call Queued 183 Session Progress

Server has returned possible locations. The client should retry request at another server. 300 Multiple Choices 301 Moved Permanently 302 Moved Temporarily 380 Alternative Service

Success

Request has succeeded 200 OK 202 Accepted

SIP Responses (cont.)


Client Errors Server Failure

The request has failed due to an error by the client. The client may retry the request if reformulated according to response. 400 Bad Request 401 Unauthorized 403 Forbidden 404 Not Found 405 Method not Allowed 407 Proxy Authentication Required 415 Unsupported Media 486 Busy Here

The request has failed due to an error by the server. The request may be retried at another server. 500 Server Internal Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable

Global Failure

The request has failed. The request should not be tried again at this or other servers. 600 Busy Everywhere 603 Decline 604 Doesnt Exist Anywhere 606 Not Acceptable

SIP Addressing

SIP requests and responses are sent to particular addresses known

as Uniform Resource Identifier (SIP URI) Typically, routing is performed according to the Request-URI and not according to the To header Convention: user@host User can be: user name or Tel number Host can be: domain name or IP address

INVITE sip:[email protected];user=phone SIP/2.0 INVITE sip:[email protected];user=phone SIP/2.0 INVITE sip:[email protected];user=phone SIP/2.0

General Header Fields

Header

Description

Call-ID

The Call-ID uniquely identifies a particular dialog between two UAs

CSeq

Contains a decimal number that increases for each request Contains the name and the address of the originator of the request. Also contains a tag, used to identify a particular call Contains the name and the address of the called party. The To header field isnt used for routing - the Request-URI is used for this purpose.

From

To

Content-Type

Provides information about the type of the message body

Session Description Protocol (SDP)

Provides negotiation between two SIP UAs to allow them to agree

on a media type and format Contains information on the media to be replaced such as RTP payload types, IP address and ports Carried in SIP message body
v=0 o=AudiocodesGW 1725394110 1725393989 IN IP4 10.33.6.100 s=Phone-Call c=IN IP4 10.33.6.100 t=0 0 m=audio 6000 RTP/AVP 8 96 a=rtpmap:8 PCMA/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-15 a=ptime:20 a=sendrecv

INVITE
INVITE sip:[email protected];user=phone SIP/2.0 Via: SIP/2.0/UDP 10.33.6.100;branch=z9hG4bKac1725404454 Max-Forwards: 70 From: Mike <sip:[email protected]>;tag=1c1725402038 To: <sip:[email protected];user=phone> Call-ID: [email protected] CSeq: 1 INVITE Contact: <sip:[email protected]> Supported: em,100rel,timer,replaces,path,resource-priority User-Agent: Audiocodes-Sip-Gateway-MP-118 FXS/v.5.00A.043.001 Content-Type: application/sdp Content-Length: 260 v=0 o=AudiocodesGW 1725394110 1725393989 IN IP4 10.33.6.100 s=Phone-Call c=IN IP4 10.33.6.100 t=0 0 m=audio 6000 RTP/AVP 8 96 a=rtpmap:8 PCMA/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-15 a=ptime:20 a=sendrecv

200 OK
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.33.6.100;branch=z9hG4bKac1725404454 From: <sip:[email protected]>;tag=1c1725402038 To: <sip:[email protected];user=phone>;tag=1c1534094691 Call-ID: [email protected] CSeq: 1 INVITE Contact: <sip:[email protected]> Supported: em,timer,replaces,path,resource-priority Server: Audiocodes-Sip-Gateway-MP-118 FXS_FXO/v.5.00A.043.001 Content-Type: application/sdp Content-Length: 260

v=0 o=AudiocodesGW 1534112064 1534111943 IN IP4 10.33.6.101 s=Phone-Call c=IN IP4 10.33.6.101 t=0 0 m=audio 6000 RTP/AVP 8 96 a=rtpmap:8 PCMA/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-15 a=ptime:20 a=sendrecv

PRACK

PRACK Provisional Response ACKnowledge


Used for informational response acknowledgements PRACK supported for calling and called sides. PRACK must be sent if 180 message includes the header Require:

100rel

PRACK

Early Media

Used to set a voice connection prior to the establishment of the call

(before 200 OK is received).


Mostly used for playing announcements or Ringback tone. Method used: 183-Session Progress with SDP (instead of 180)

Early Media

SIP Servers - Proxy

Receives a SIP request from a user and acts on behalf in forwarding or

responding to the request Typically has access to a database or a location service to aid it in processing the request (determining the next hop) Can perform functions such as: Authentication Authorization Network access control Routing

Proxy Server

SIP Servers - Registrar

A server that accept SIP REGISTER requests from users - REGISTER

requests provide the server with an address at which the user can be reached
The registration server creates a temporary binding between the

Address of Record (AOR) URI in the To and the device URI in the Contact header
If required (as a response to 401\407 message) the gateway sends

REGISTER with authentication

SIP Registration

Call Flow with Proxy

INVITE (SDP) 100 Trying INVITE (SDP) 100 Trying 180 Ringing 180 Ringing 200 OK (SDP)

200 OK (SDP)
ACK

ACK

RTP / RTCP
BYE 200 OK BYE 200 OK Call via Proxy

You might also like