370 likes | 489 Views
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?.
E N D
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? SIP is an application layer control protocol that can establish, modify an terminate multimedia sessions or calls.Multimedia sessions include: - multimedia conference. - Distance learning. - Internet telephony.
What does SIP do? SIP can invite parties to both unicast and multicast sessions.SIP supports either UDP or TCP transports.SIP supports name mapping and redirection services (“Personal Mobility”). The initiator of SIP request is called a SIP client and the responding entity is called a SIP server
Sample SIP Session INVITE 180 Ringing 200 OK ACK Media Session (RTP) BYE 200 OK
SIP Addressing Convention:user @ domain (SIP URL). User can be : user name or TEL number. Domain can be : domain name or numeric network address. Sometimes the SIP URL can be guessed from the email address. A SIP URL address can designate : an individual , first available person from a group of individuals, a whole group.
SIP Entities A SIP network is composed of four types of logical SIP entities. Each entity has specific functions and participates in SIP communication as a client (initiates requests), as a server (responds to requests), or as both. One “physical device” can have the functionality of more than one logical SIP entity. For example, a network server working as a Proxy server can also function as a Registrar at the same time.
User Agent A User Agent (UA) is the endpoint entity. It initiate and terminate sessions by exchanging requests and responses. RFC2543 defines the User Agent as an application, which contains both a User Agent client and User Agent server, as follows: • User Agent Client (UAC); Calling User Agent A client application that initiates SIP requests. • User Agent Server (UAS); Called User Agent A server application that contacts the user when a SIP request is received and that returns a response on behalf of the user.
User Agent Devices that function as UA in a SIP network: • workstations • IP- phones • telephony gateways • call agents • automated answering services
Proxy Server A Proxy server acts as both a server and a client for the purpose of making requests on behalf of other clients. Requests are serviced either internally or by passing them on, possibly after translation, to other servers. A Proxy interprets, and, if necessary, rewrites a request message before forwarding it. It functions as a kind of a Router.
Redirect Server A Redirect Server is a server that accepts a SIP request, maps the SIP address of the called party to a new addresses and returns them to the client. Unlike Proxy servers, Redirect Servers do not pass the request on to other servers.
Registrar A Registrar is a server that accepts REGISTER requests for the purpose of updating a location database with the contact information of the user specified in the request.
SIP Messages • Text base protocol • Similar to HTTP • Either a request from a client to a server or • A response from a server to a client
General Header Fields General basic fields: • CALL-ID • Cseq • To • From
CALL-ID • The call-id uniquely identifies a particular invitation of a particular client. • Must be a globally unique identifier and must not be reused for latter call • It may use the form localid@host • Case sensitive • Serves to match requests with the corresponding responses • Detects duplicates requests
Cseq • Composed of an unsigned sequence number and the method name. • Incremented at each new request • Starts at a random value
From • Contains the name and the address of the originator of the request
To • Indicates the intended destination of a request.
General Message Type: “REGISTER” “INVITE” “ACK” “BYE” “CANCEL” “OPTIONS”
REGISTER Client uses the register method to register its address with the SIP server. The client needs to register at startup and then periodically thereafter. Recommended to register via multicast. Multicast registration has a well known “all SIP servers” multicast address: “sip.mcast.net” (224.0.1.75)
INVITE Indicates that the user or service is being invited to participate in a session.
ACK The ACK request confirms that the client has received a final response to an INVITE request
BYE The client uses “BYE” to indicate to the server that it wishes to release the call. A party to a call should send a BYE request before hanging up.
CANCEL The CANCEL request cancels a pending request with the same CALL-ID, TO, FROM and Cseq. It doesn’t affect a completed request nor an existing call.
OPTIONS The server (callee) is being queried as to its capabilities.
SIP Example Let’s take a look at an actual call flow (See HTML)
Protocol Comparison Terminal Control/Devices Terminal Control/Devices H.245 RTCP Q.931 RAS RTCP SIP SDP Codecs Codecs RTP RTP TPKT TCP UDP Transport Layer IP and lower layers H.323 SIP
SIP Pros • Speed – Simple, 1 to 5 messages ratio, uses UDP as transport. Thus shorter setup time for endpoints. • Multicast – Messages can be sent to a multicast group (signaling and media channels). • URL usage – uses only one type of URL – SIP URL. Makes easy redirection. • Call prioritization. • Text encoding – It is simple, debugged easily and makes interoperability problems detectable visually.
H.323 Pros • Logical channels – Make clear distinction between capabilities and actual media types. • Conference control – Powerful conference control features. • Binary encoding – PDU size is optimized. • Fast protocol – Structures cast to buffers and vise versa.
Further Reading SIP Demystifiedby Gonzalo Camarillo Understanding the Session Initiation Protocol by Alan B. Johnston Carrier Grade Voice over IPby Daniel Collins