Introduction to SIP Alan Percy, Director of Business Development Alan.percy@audiocodes

Preview:

DESCRIPTION

Introduction to SIP Alan Percy, Director of Business Development Alan.percy@audiocodes.com 716-662-2769. Agenda. SIP Overview SIP Messages SIP Call Flows SIP versus H323 Further Reading. What is SIP?. - PowerPoint PPT Presentation

Citation preview

Introduction to SIPAlan Percy, Director of Business Development

Alan.percy@audiocodes.com

716-662-2769

Agenda

• SIP Overview

• SIP Messages

• SIP Call Flows

• SIP versus H323

• Further Reading

SIPSIP is an application layer control protocol that can is an application layer control protocol that can establish, modify an terminate multimedia establish, modify an terminate multimedia sessions or calls.sessions or calls.Multimedia sessions include:Multimedia sessions include: - multimedia conference. - multimedia conference. - Distance learning. - Distance learning. - Internet telephony. - Internet telephony.

What is SIP?

SIP can invite parties to both unicast and SIP can invite parties to both unicast and multicast sessions.multicast sessions.

SIP supports either UDP or TCP transports.SIP supports either UDP or TCP transports.

SIP supports name mapping and redirection SIP supports name mapping and redirection servicesservices (“Personal Mobility”). (“Personal Mobility”).

The initiator of SIP request is called a SIP client The initiator of SIP request is called a SIP client and the responding entity is called a SIP serverand the responding entity is called a SIP server

What does SIP do?

Sample SIP Session

INVITE

200 OK

ACK

Media Session (RTP)

BYE

200 OK

180 Ringing

Convention:Convention: user @ domainuser @ domain (SIP URL). (SIP URL).UserUser can be : user name or TEL number. can be : user name or TEL number.Domain Domain can be : domain name or numeric can be : domain name or numeric

network address.network address.Sometimes the SIP URL can be guessed from Sometimes the SIP URL can be guessed from

the email address.the email address.A SIP URL address can designate :A SIP URL address can designate :

an individual ,an individual ,first available person from a group of first available person from a group of individuals,individuals,a whole group.a whole group.

SIP Addressing

A SIP network is composed of four types of A SIP network is composed of four types of logical SIP entities. Each entity has specific logical SIP entities. Each entity has specific functions and participates in SIP functions and participates in SIP communication as a client (initiates communication as a client (initiates requests), as a server (responds to requests), as a server (responds to requests), or as both. One “physical requests), or as both. One “physical device” can have the functionality of more device” can have the functionality of more than one logical SIP entity. For example, a than one logical SIP entity. For example, a network server working as a Proxy server network server working as a Proxy server can also function as a Registrar at the can also function as a Registrar at the same time.same time.

SIP Entities

A A User Agent User Agent (UA) is the endpoint entity.(UA) is the endpoint entity.It initiate and terminate sessions by exchanging It initiate and terminate sessions by exchanging

requests and responses. RFC2543 defines the requests and responses. RFC2543 defines the User Agent as an application, which contains both User Agent as an application, which contains both a User Agent client and User Agent server, as a User Agent client and User Agent server, as follows:follows:

User Agent Client (UAC); Calling User AgentUser Agent Client (UAC); Calling User Agent A client application that initiates SIP requests.A client application that initiates SIP requests. User Agent Server (UAS); Called User AgentUser Agent Server (UAS); Called User Agent A server application that contacts the user when a A server application that contacts the user when a

SIP request is received and that returns a SIP request is received and that returns a response on behalf of the user.response on behalf of the user.

User Agent

Devices that function as UA in a SIP network:Devices that function as UA in a SIP network: workstationsworkstations IP- phonesIP- phones telephony gatewaystelephony gateways call agentscall agents automated answering servicesautomated answering services

User Agent

A A Proxy server Proxy server acts as both a server and a acts as both a server and a client for the purpose of making requests client for the purpose of making requests on behalf of other clients. Requests are on behalf of other clients. Requests are serviced either internally or by passing serviced either internally or by passing them on, possibly after translation, to other them on, possibly after translation, to other servers. A Proxy interprets, and, if servers. A Proxy interprets, and, if necessary, rewrites a request message necessary, rewrites a request message before forwarding it.before forwarding it.

It functions as a kind of a Router.It functions as a kind of a Router.

Proxy Server

A A Redirect Server Redirect Server is a server that is a server that accepts a SIP request, maps the SIP accepts a SIP request, maps the SIP address of the called party to a new address of the called party to a new addresses and returns them to the addresses and returns them to the client. Unlike Proxy servers, Redirect client. Unlike Proxy servers, Redirect Servers do not pass the request on to Servers do not pass the request on to other servers.other servers.

Redirect Server

A A Registrar Registrar is a server that accepts is a server that accepts REGISTER requests for the purpose of REGISTER requests for the purpose of updating a location database with the updating a location database with the contact information of the user contact information of the user specified in the request.specified in the request.

Registrar

SIP Network

Text base protocolText base protocol Similar to HTTPSimilar to HTTP Either a request from a client to a server orEither a request from a client to a server or A response from a server to a clientA response from a server to a client

SIP Messages

General basic fields:General basic fields: CALL-IDCALL-ID CseqCseq ToTo FromFrom

General Header Fields

The call-id uniquely identifies a particular The call-id uniquely identifies a particular invitation of a particular client.invitation of a particular client.

Must be a globally unique identifier and must not Must be a globally unique identifier and must not be reused for latter callbe reused for latter call

It may use the form It may use the form localid@host Case sensitiveCase sensitive Serves to match requests with the corresponding Serves to match requests with the corresponding

responsesresponses Detects duplicates requestsDetects duplicates requests

CALL-ID

Composed of an unsigned sequence Composed of an unsigned sequence number and the method name.number and the method name.

Incremented at each new requestIncremented at each new request Starts at a random valueStarts at a random value

Cseq

Contains the name and the address Contains the name and the address of the originator of the requestof the originator of the request

From

Indicates the intended destination of Indicates the intended destination of a request.a request.

To

““REGISTER”REGISTER”

““INVITE”INVITE”

““ACK”ACK”

““BYE”BYE”

““CANCEL”CANCEL”

““OPTIONS”OPTIONS”

General Message Type:

Client uses the register method to register its Client uses the register method to register its address with the SIP server.address with the SIP server.

The client needs to register at startup and then The client needs to register at startup and then periodically thereafter.periodically thereafter.

Recommended to register via multicast.Recommended to register via multicast.

Multicast registration has a well known “all SIP Multicast registration has a well known “all SIP servers” multicast address: “sip.mcast.net” servers” multicast address: “sip.mcast.net” (224.0.1.75)(224.0.1.75)

REGISTER

Indicates that the user or service is Indicates that the user or service is being invited to participate in a being invited to participate in a session.session.

INVITE

The ACK request confirms that the client has The ACK request confirms that the client has received a final response to an INVITE requestreceived a final response to an INVITE request

ACK

The client uses “BYE” to indicate to the server that it The client uses “BYE” to indicate to the server that it wishes to release the call.wishes to release the call.

A party to a call should send a BYE request before A party to a call should send a BYE request before hanging up.hanging up.

BYE

The CANCEL request cancels a pending request with The CANCEL request cancels a pending request with the same CALL-ID, TO, FROM and Cseqthe same CALL-ID, TO, FROM and Cseq..

It doesn’t affect a completed request nor an It doesn’t affect a completed request nor an existing callexisting call..

CANCEL

The server (callee) is being queried as to its The server (callee) is being queried as to its capabilities.capabilities.

OPTIONS

SIP Message Structure

SIP Example

Let’s take a look at an actual call flow

(See HTML)

SIP with Proxy

SIP with Redirect

SIP vs. H.323

IP and lower layers

TCP UDPTPKT

Q.931 H.245 RAS RTCPRTP

Codecs

Terminal Control/Devices

Transport Layer

SIP SDPRTP

CodecsRTCP

Terminal Control/Devices

H.323 SIP

Protocol Comparison

Speed – Simple, 1 to 5 messages ratio, uses UDP Speed – Simple, 1 to 5 messages ratio, uses UDP asas transport. Thus shorter setup time for transport. Thus shorter setup time for endpoints. endpoints.

Multicast – Messages can be sent to a multicast Multicast – Messages can be sent to a multicast group (signaling and media channels). group (signaling and media channels).

URL usage – uses only one type of URL – SIP URL.URL usage – uses only one type of URL – SIP URL. Makes easy redirection. Makes easy redirection.

Call prioritization. Call prioritization. Text encoding – It is simple, debugged easily andText encoding – It is simple, debugged easily and

makes interoperability problems makes interoperability problems detectabledetectable visually. visually.

SIP Pros

Logical channels – Make clear distinction betweenLogical channels – Make clear distinction between capabilities and actual media types. capabilities and actual media types.

Conference control – Powerful conference control Conference control – Powerful conference control features.features.

Binary encoding – PDU size is optimized.Binary encoding – PDU size is optimized. Fast protocol – Structures cast to buffers and vise Fast protocol – Structures cast to buffers and vise

versaversa. .

H.323 Pros

Further Reading

SIP Demystified by Gonzalo Camarillo

Understanding the Session Initiation Protocol by Alan B. Johnston

Carrier Grade Voice over IP by Daniel Collins

Recommended