Audiocodec

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 21

AudioCodes Mediant 600

Installation & Configuration

© 2008 AudioCodes Ltd.


All rights reserved.
© 2005 AudioCodes
AudioCodes Ltd.
Confidential Proprietary
All rights reserved.
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 UAS

Request
UAS Response
UAC
Basic SIP Call Flow

SIP Phone (UAC) SIP Phone (UAS)

Off-hook & Dialing


INVITE (SDP)

100 Trying
Ringing
180 Ringing
Ringback
200 OK (SDP) Off-hook

ACK

RTP / RTCP

On-hook BYE

200 OK
Basic Call
SIP Requests

Method Description

INVITE Used to establish media sessions between user agents

ACK Used to acknowledge final responses to INVITE requests

BYE Used to terminate an established media session

Used to terminate a pending call attempt.


CANCEL
has no effect on an established call.

OPTIONS Query the capabilities of UA or servers

Used by UA to notify of its current IP address and the URI for which it
REGISTER
would like to receive calls
SIP Requests (cont.)

Method Description

INFO Used for mid-call signaling (DTMF, hook-flash, etc.)

REFER Used for call transfer

Used by a user agent to establish a subscription for the purpose of


SUBSCRIBE
receiving notifications
Used by a user agent to convey information about the occurrence of a
NOTIFY
particular event (such as MWI)

Used to acknowledge receipt of reliably transported provisional


PRACK
responses (1xx)

UPDATE Used to modify the state of a session


SIP Responses

Informational Redirection
Indicates status of call prior to Server has returned possible locations.
completion The client should retry request at
100 Trying another server.
180 Ringing 300 Multiple Choices
181 Call is being forwarded 301 Moved Permanently
182 Call Queued 302 Moved Temporarily
183 Session Progress 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 The request has failed due to an error by
by the client. The client may retry the the server. The request may be
request if reformulated according to retried at another server.
response.
500 Server Internal Error
400 Bad Request 501 Not Implemented
401 Unauthorized 502 Bad Gateway
403 Forbidden 503 Service Unavailable
404 Not Found
405 Method not Allowed
Global Failure
407 Proxy Authentication Required
415 Unsupported Media The request has failed. The request
486 Busy Here should not be tried again at this or other
servers.
600 Busy Everywhere
603 Decline
604 Doesn’t Exist Anywhere
606 Not Acceptable
SIP Addressing

Responses

► SIP requests and responses are sent to particular addresses known


INFO
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
From
contains a tag, used to identify a particular call

Contains the name and the address of the called party.


To The To header field isn’t used for routing - the Request-URI is used for
this purpose.

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 Request SIP Request

SIP Response SIP Response

Media Session
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

SIP Proxy
SIP UA SIP UA

INVITE (SDP)
100 Trying
INVITE (SDP)

100 Trying

180 Ringing
180 Ringing
200 OK (SDP)
200 OK (SDP)
ACK
ACK

RTP / RTCP
BYE BYE
Call via Proxy
200 OK
200 OK
Chapter 2 – Student Notes

You might also like