Session Initiation Protocol Lecture plan 1 SIP Basics
Session Initiation Protocol
Lecture plan: 1. SIP Basics 2. SIP network architecture 3. Message structure 4. Commands (requests) 5. Replies 6. SIP in the NGN
Literature Vo. IP books: 1. Daniel Collins. Carrier Grade Voice Over IP (second edition) - Mc. Graw-Hill Professional, 2002 2. Theodore Wallingford. Switching to Vo. IP - O'Reilly Media, 2005 3. Jim Van Meggelen. Asterisk: The Future of Telephony - O'Reilly Media, 2005 SIP books: 1. Gonzalo Camarillo. SIP Demystified - Mc. Graw-Hill Professional, 2001 2. Alan B. Johnston. SIP: Understanding the Session Initiation Protocol, Second Edition - Artech House, 2003 3. Rfc 3261 and so on… RTP books: 1. Colin Perkins. RTP: Audio and Video for the Internet - Addison-Wesley Professional, 2003
SIP Basics Session Initiation Protocol (SIP) – is an application layer protocol and is intended for the organization, modification and completion of communication session: multimedia conferences, telephone calls and distribution of multimedia information. This protocol is designed by IETF committee (Internet Engineering Task Force); protocol specifications are in RFC 2543.
SIP is based on the following principles: • Personal mobility for users. A unique identifier is assigned to user, and the network provides communications services to him, regardless of where it is; • scalability of the network (characterized primarily by the possibility of increasing the number of network elements in its expansion); • extensibility of the protocol is characterized by the ability to supplement the protocol with new features with the introduction of new services and adapt it to different applications Another important principle of SIP is its independence of transport technologies. As transport protocols can be used UDP or TCP.
Place in IP-model
SIP network architecture Main functional elements: Redirect Server Registrar/ Location Server PSTN User Agent Proxy Server GW
Network elements necessary for SIP Server – an application that allows the system to accept requests, execute them and send replies. Types of servers: SIP Proxy Server Øtransmits signaling – works as a client and a server Øuses the principle of transaction Ødo not store any data about the connection Øperforms routing (routing) – defines who (UA / proxy / redirect) want to send messages Øprogrammability provides routing Øprovides separation (Forking) posts – may require multiple destinations simultaneously or sequentially SIP Redirect Server üredirects calls to other servers or directly to the called user SIP Registrar Øaccepts registration requests from users Østores information about a visitor Øacts as a gatekeeper (Gateway) in the direction of the PSTN
Network elements necessary for SIP User Agent (UA) - an application that consists of two parts: 1. User agent client, UAC - an application that initiates the SIPrequest (request); 2. User agent server, UAS - application communicate with the user after the SIP-request, return response (response) at the request of the user. User Agent method (request) UAC UAS response UAS UAC
SIP message structure A SIP message is either a request from a client to a server, or a response from a server to a client. Both Request and Response messages use the generic-message format. Both types of messages consist of a start-line, one or more header fields (also known as "headers"), an empty line (i. e. , a line with nothing preceding the carriage-return line-feed (CRLF)) indicating the end of the header fields, and an optional messagebody. Start Line Headers Empty Line Message body
Examples request INVITE sip: nekdo@iskratel. si SIP/2. 0 To: Nekdo <sip: nekdo@iskratel. si> From: Jaz<sip: jaz@atlanta. com> Call-Id: a 84 b 4 c 76 e 66710 Content-Type: application/sdp Content-Length: 142 response SIP/2. 0 100 Trying To: Nekdo <sip: nekdo@iskratel. si> From: Jaz <sip: jaz@atlanta. com> Call-Id: a 84 b 4 c 76 e 66710
Methods: • • • "INVITE" "ACK" "OPTIONS" "BYE" "CANCEL" "REGISTER"
The INVITE method indicates that the user or service is being invited to participate in a session. The message body contains a description of the session to which the callee is being invited. For two-party calls, the caller indicates the type of media it is able to receive and possibly the media it is willing to send as well as their parameters such as network destination. A success response MUST indicate in its message body which media the callee wishes to receive and MAY indicate the media the callee is going to send. A server MAY automatically respond to an invitation for a conference the user is already participating in, identified either by the SIP Call-ID or a globally unique identifier within the session description, with a 200 (OK) response. The ACK request confirms that the client has received a final response to an INVITE request. (ACK is used only with INVITE requests. ) 2 xx responses are acknowledged by client user agents, all other final responses by the first proxy or client user agent to receive the response. OPTIONS The server is being queried as to its capabilities. A server that believes it can contact the user, such as a user agent where the user is logged in and has been recently active, MAY respond to this request with a capability set. The user agent client uses BYE to indicate to the server that it wishes to release the call. A BYE request is forwarded like an INVITE request and MAY be issued by either caller or callee. A party to a call SHOULD issue a BYE request before releasing a call ("hanging up"). A party receiving a BYE request MUST cease transmitting media streams specifically directed at the party issuing the BYE request. The CANCEL request cancels a pending request with the same Call-ID, To, From and CSeq (sequence number only) header field values, but does not affect a completed request. (A request is considered completed if the server has returned a final status response. ) A user agent client or proxy client MAY issue a CANCEL request at any time. A client uses the REGISTER method to register the address listed in the To header field with a SIP server.
Replies: SIP/2. 0 allows 6 values for the first digit: 1 xx: Informational -- request received, continuing to process the request; 2 xx: Success -- the action was successfully received, understood, and accepted; 3 xx: Redirection -- further action needs to be taken in order to complete the request; 4 xx: Client Error -- the request contains bad syntax or cannot be fulfilled at this server; 5 xx: Server Error -- the server failed to fulfill an apparently valid request; 6 xx: Global Failure -- the request cannot be fulfilled at any server.
Main scenarios Registration Location service store Registrar REGISTER User 200 (OK)
Main scenarios SIP – Call (redirect mode) Location service Пользователь A Proxy Registrar INVITE query 301 (Moved) ACK resp Пользователь B
Main scenarios SIP – Call (redirect mode) Пользователь A Location service Proxy Registrar Пользователь B INVITE 180 (Ringing) 200 (OK) ACK
Main scenarios Пользователь A INVITE Proxy 1 100 (Trying) Пользователь B Proxy 2 INVITE 100 (Trying) INVITE 180 (Ringing) 200 (OK) ACK 200 (OK)
Main scenarios Пользователь A Proxy 1 ACK Proxy 2 Пользователь B Перенос данных (media session) BYE 200 (OK)
Main scenarios 172. 18. 25. 203 172. 18. 25. 90 172. 18. 25. 91 INVITE 100 INVITE 183 PRACK 200 180 PRACK 200 ACK BAY 200
A next-generation network (NGN) is a packet-based network which can provide services including Telecommunication Services and able to make use of multiple broadband, quality of Service-enabled transport technologies and in which service-related functions are independent from underlying transport-related technologies. It offers unrestricted access by users to different service providers. It supports generalized mobility which will allow consistent and ubiquitous provision of services to users. For voice applications one of the most important devices in NGN is a Softswitch – a programmable device that controls Voice over IP (Vo. IP) calls. It enables correct integration of different protocols within NGN. The most important function of the Softswitch is creating the interface to the existing telephone network, PSTN, through Signalling Gateways and Media Gateways. A Media gateway is a translation device or service that converts digital media streams between disparate telecommunications networks such as PSTN, SS 7, Next Generation Networks.
- Slides: 21