Successfully reported this slideshow.
Your SlideShare is downloading.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

4

Share

Introduction to SIP

Introduction to Session Initiation Protocol

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to comment

Introduction to SIP

  1. 1. Session Initiation Protocol The Evolution of Signaling
  2. 2. Evolution of Signaling • As Telecommunication networks has advanced so have the Signaling Protocol • Signaling has been an integral part of telecommunications from the beginning • It is necessary for the establishment and control of a telecommunications circuit and the management of the network.
  3. 3. Evolution of Signaling
  4. 4. Evolution of Signaling • GPP makes use of two signaling protocols  Session Initiation Protocol (SIP) used within the GSM Core , EPC and IMS for setting up a session.  Diameter used in both EPC and IMS for Transition , Mobility Management  Both these two protocol are IP Based Protocol.
  5. 5. Evolution of Signaling  SIP is the industry standard for message signaling in real-time communications such as Voice over IP (VoIP) and videoconferencing sessions.  Diameter is the industry standard for data signaling from mobile devices such as smartphones and tablets.  Two protocols are designed to perform separate but complementary functions in IMS/LTE networks. Example: When a SIP session is initiated, user is authorized to use certain network services or application Diameter messages are working behind the scenes within the core network to authenticate that the subscriber is who they say they areas, and is charged correctly for using those services.
  6. 6. What is Signalling ? • Even a Face to face conversation requires signaling.
  7. 7. Signalling in IP world • Signalling in IP world follows the same principle, but instead to signalling in audio waves the signalling is sent via IP packets over the IP networks. • There are lots of different types of IP packets each with the certain function and content. • The most important thing is the sender and receiver understands the packet and what to do with that data.
  8. 8. Signalling in IP world • In an IP communication there are two types of packets they are: • Signallin Packets - To establish or setup a session • Media Packets (Bearer Packets) - To convey the audio, video, application data etc. • In a Voice Session the Analog Wave are encoded into 1's and 0's and are put into media packet and • are sent out over the IP network. • On the other side the 1's and 0's are decoded and the same wave is reconstructed and played back to the user. • Same encoding and decoding apples to video and other application data.
  9. 9. Signalling in IP world • During any IP communication larger number of Media Packets(Real Time Protocal) are exchanged between the two ends to establish a successful real time conversation. • The media packets might contain audio, video or any application data depending upon that session. • For this Communicating to take place we assume two important things: • Both parties know the end user location, i.e they know where to send the media packets and • Both parties uses same codecs for encoding and decoding the media packets to be sent over that IP network. • So all we need is the set of rules, process, description that help us locate each other and agree on which codec to be used, Hence SIP is Introduced.
  10. 10. What is SIP ? • Its basically a Rule book ( Protocol) which describe: • How to locate the called party(Other party) and • Which codec to be used for encoding and decoding the media (RTP) packets. • It also defines how to construct and Send IP Signalling Packet to setup a call. • When the Tom's SIP phone want to call Jack's SIP phone it must follows all the rules defined in SIP protocol, to construct IP signalling and Media Packets. • Tom's SIP phone : Signalling packet is populated with all the data needed to setup the call and sent it out over the IP network. • Jacks SIP phone : On the other side understand the rules of SIP and recognize the packet as initiation to talk and know to alert the Tom SIP phone by ringing sound. • Then with the Signallin message Complete the codec determined then exchange of Media Packet(RTP) packet start. • When the conversation is complete one of the party end the call and both stop sending media, thus call is terminated.
  11. 11. What is SIP ? • Protocol to Initiate a IP Communication Session, using IP devices in a IP network. • SIP is a Signaling Protocol used to setup an IP communication.
  12. 12. What’s SIP? Cont… • SIP: Session Initiation Protocol is an application-layer control protocol used to establish, modify and terminate multimedia sessions or calls. • It works independently of lower layer Eg. IPv4 , IPv6 , UDP , TCP, RTP etc. internet
  13. 13. SIP History • Internet Engineering Task Force (IETF) protocol • Inventors: M. Handley, H. Schulzrinne, E. Schooler, and J. Rosenberg • Became “Proposed Standard” and RFC 2543 in March 1999. • SIPPING (applications) and SIMPLE (presence and instant messaging) WGs using SIP. • SIP is now specified in RFC 3261
  14. 14. What is RFC ? • A Request For Comments (RFC) is a formal document from the Internet Engineering Task Force ( IETF ) that is the result of committee drafting and subsequent review. • Some RFCs are informational in nature of those that are intended to become Internet standards, the final version of the RFC becomes the standard and no further comments or changes are permitted. • Change can occur, however, through subsequent RFCs that supersede or elaborate on all or parts of previous RFCs. • All these standards are defined in different RFC.
  15. 15. The position in signaling stack RTSPRTSP
  16. 16. Related Protocols :Related Protocols : Session Description Protocol (SDP) • SDP is generally confused as a part of SIP. • Defined in RFC 2327 • It is like any other protocol which is used in conjunction with SIP. • SDP does not deliver media itself but is used between end points for negotiation of media type, format, and all associated properties. • i.e It basically deals with end point capabilities; Video/ Audio Support, Codec that can be used are all defined as part of SIP message body by using SDP.
  17. 17. Related Protocol: RTP • RTP – Real-time Transport Protocol Used to transport media packets over IP RTP adds a bit-oriented header containing:  name of media source  timestamp  codec type  sequence number Profiles defined by RFC 1890. RTCP for exchange of participant and quality reports.
  18. 18. The characteristic of SIP • SIP supports five facts of establishing and terminating multimedia communications: • User location: determination of the end system to be used for communication. • User capabilities: determination of the media and media parameters to be used. • User availability: determination of the willingness of the called party to engage in communications. • Call setup: "ringing", establishment of call parameters at both called and calling party. • Call control : establish, modify and terminate multimedia sessions or calls.
  19. 19. Basic concept • Client and Server • Client: A client is any network element that sends SIP requests and receives SIP responses. Clients may or may not interact directly with a human user. User agent clients and proxies are clients. • Server: A server is a network element that receives requests in order to serve them and sends back responses to those requests. Examples of servers are proxies, user agent servers, redirect servers, and registrars. • The Client and Server are logic concepts. • An entity can be a Client, also be a Server. • In a session, there must be a Client and a Server.
  20. 20. Basic concept • Request and Response • Request: A SIP message sent from a client to a server, for the purpose of invoking a particular operation. • Response: A SIP message sent from a server to a client, for indicating the status of a request sent from the client to the server. Page 21 Client Server Request Response
  21. 21. Basic concept • Transaction and Dialog • Transaction: A SIP transaction occurs between a client and a server and comprises all messages from the first request sent from the client to the server up to a final (non-1xx) response sent from the server to the client. • Dialog: A dialog is a peer-to-peer SIP relationship between two UAs that persists for some time. A dialog is established by SIP messages, such as a 2xx response to an INVITE request. Page 22
  22. 22. Basic concept
  23. 23. Chapter 2 : Message Type SIP messages can be separated into two class:  Request -- for initialing a session ; Are called “methods”  Response -- It is the response of the request.  Request i.e Six methods are defined in base RFC 3261: − INVITE: to initiate a session − ACK: the response of INVITE − CANCEL: to cancel a session − BYE: to terminate a session − REGISTER: to register in a server − OPTIONS: for querying servers about their capabilities
  24. 24. SIP Methods - INVITE • INVITE requests the establishment of a session • Carried in Message Body (SDP) • Type of session • IP Address • Port • Codec • An INVITE during an existing session (dialogue) is called a re-INVITE • re-INVITEs can be used to • Place calls on or remove calls from hold • Change session parameters and codecs • The SIP UPDATE method is the proposed replacement for this technique
  25. 25. SIP Methods - ACK • ACK completes the three way session setup handshake (INVITE, final response, ACK) • Only used for INVITE • If INVITE did not contain media information • ACK must contain the media information
  26. 26. SIP Methods – BYE • BYE terminates an established session • User Agents stop sending media packets (RTP)
  27. 27. SIP Methods – CANCEL • CANCEL terminates a pending session. • INVITE sent but no final response (non-1xx) yet received. • User Agents and Proxies stop processing INVITE
  28. 28. SIP Methods - REGISTER • Registration allows a User Agent to upload current location and URLs to a Registrar • Registrar can upload into Location Service • Incoming requests can then be proxied or redirected to that location • Built in SIP support of mobility • UAs do not need static IP addresses • Obtain IP address via DHCP, REGISTER indicating new IP Address as contact. • The Flow is Some thing like
  29. 29. SIP Methods – REGISTER Cont… • The Flow is Some thing like • It's as simple as a three step process staring with the User Agent (endpoint) sending a request. • Upon receipt the SIP SERVER sends back a challenge and upon receiving back a correct response (valid user ID and password) the SIP SERVER validates the user's credentials and registers the user in it's contact database. • It then sends a 200 OK response which includes the user's current contact list in Contact headers. • Now the EndPoint user is registered in Register/ SIP Server showing the end used is now connected to SIP server with allocated IP Address to it.
  30. 30. SIP Methods – REGISTER Cont… SIP Registrar store the location of SIP endpoints.
  31. 31. SIP Uniform Resource IndicatorsSIP Uniform Resource Indicators (URIs)(URIs) SIP address is written in user@domain. lts format in a similar fashion to an email address. An address like : sip:1-999-123-4567@voip-provider.example.net SIP URI schemes: sips:henry@siptest.mci.com is a scheme introduced in RFC 3261 Two types of SIP URIs: Address of Record (AOR) (identifies a user)  sip:henry@mci.com (Needs DNS records to locate SIP Servers for mci.com domain) Contact (identifies a device and is usually a Fully Qualified Domain Name, FQDN)  sip:henry@127.24.45.4 (Which needs no resolution for routing)
  32. 32. SIP Uniform Resource IndicatorsSIP Uniform Resource Indicators (URIs)(URIs)• The Request-URI indicates the destination address of the request. • Proxies and other servers route requests based on Request-URI. • The Request-URI is modified by proxies as the address is resolved. • SIP-URI = sip:x@y:Port where x=Username and y=host (domain or IP), If you do not specify a port, the default sip port will be assumed (5060).
  33. 33. SIP From and To Tags • Tags are pseudo-random numbers inserted in To or From headers to uniquely identify a call leg or dialog . • INVITE request From header contains a tag. • Any User Agent or Server generating a response adds a tag to the To header in the response • To: sip:john@company.com;tag=123456
  34. 34. SIP Method – PRACK (Provisional Response ACKnowledgement) • SIP Provisional responses (1xx) do not have an acknowledgement system so they are not reliable. • There are certain scenarios in which the provisional SIP responses (1xx) must be delivered reliably. • For example in a SIP/ PSTN inter-working scenario it is crucial that the 180 and 183 messages are not missed. • To solve this problem the SIP PRACK method guarantees a reliable and ordered delivery of provisional responses in SIP. • PRACK Improves network reliability by adding an acknowledgement system to the provisional Responses (1xx). • If no PRACK sent, response retransmitted • Defined in RFC 3262
  35. 35. Message Type Response are of 2 Types Provisional Response − 1xx: Provisional -- request received, continuing to process the request; Final Response − 2xx: Success -- the action was successfully received, understood, and accepted; − 3xx: Redirection -- further action needs to be taken in order to complete the request; − 4xx: Client Error -- the request contains bad syntax or cannot be fulfilled at this server; − 5xx: Server Error -- the server failed to fulfill an apparently valid request; − 6xx: Global Failure -- the request cannot be fulfilled at any server.
  36. 36. Provisional Response SIP Responses Final Response
  37. 37. SIP Responses SIP Response Code Brief Description 400 Bad Request Request not understood due to malformed syntax 401 Unauthorized Request requires user authentication 402 Payment Required Reserved for future use 403 Forbidden UAS understood request and refuses to fulfill it 404 Not Found UAS finds that user doesn't exist in the domain 405 Method Not Allowed Method is understood but not allowed 406 Not Acceptable Response content not allowed by Accept header 407 Proxy Authentication Required Client must first authenticate itself with proxy 408 Request Timeout UAS could not produce response in time 410 Gone UAS resource unavailable; no forwarding addr. 413 Request Entity Too Large Request contains body longer than UAS accepts 414 Request-URI Too Long Req-URI longer than server is willing to interpret 415 Unsupported Media Type Format of the body not supported by UAS 416 Unsupported URI Scheme Scheme of URI unknown to server 420 Bad Extension UAS not understand protocol extension 421 Extension Required UAS needs particular extension process request 423 Registration Too Brief Contact header field expiration time too small 480 Temporarily Unavailable UAS contacted successfully but user unavailable 481 Call/Transaction Does Not Exist UAS Rx request not matching any existing dialog 482 Loop Detected UAS has detected a loop 483 Too Many Hops UAS received request containing Max-Forwards=0 484 Address Incomplete UAS Rx request with incomplete Request-URI 485 Ambiguous The Request-URI was ambiguous 486 Busy Here UAS contacted successfully but user busy 487 Request Terminated Request terminated by a BYE or CANCEL request 488 Not Acceptable Here Same as 606 but only applies to addressed entity 491 Request Pending UAS Rx req. & have pending req. for same dialog 493 Undecipherable UAS Rx request with encrypted MIME body & not have decryption key Final Response
  38. 38. SIP Reponse Code Brief Description 500 Server Internal Error UAS unexpected condition & cannot fulfill request 501 Not Implemented UAS not support functionality to fulfill the request 502 Bad Gateway UAS Rx invalid response from a downstream server 503 Service Unavailable UAS can't process due to overload or maintenance 504 Server Time-out UAS not Rx response from external server 505 Version Not Supported UAS not support SIP version in request 513 Message Too Large Message length exceeded UAS capabilities 600 Busy Everywhere End systems contacted, user busy at all of them 603 Decline End systems contacted, user explicitly decline 604 Does Not Exist Anywhere UAS has information Req-URI user not exist 606 Not Acceptable Some aspects of Session Desc. not acceptable Final Response All these responses are described in RFC3261.
  39. 39. Message type with Flow (example) • Register registrar softphone REGISTER 200 OK
  40. 40. Message type with Flow (example) Session setup Client A Proxy A Proxy B Client B INVITE INVITE INVITE100 TRYING 100 TRYING 180 RINGING 180 RINGING 180 RINGING 200 OK 200 OK 200 OK

    Be the first to comment

    Login to see the comments

  • chouhanmanoj

    Feb. 8, 2017
  • MurugeshNadar

    Aug. 1, 2019
  • HusamedinSelmani

    Feb. 6, 2020
  • QuangMan2

    Jun. 16, 2020

Introduction to Session Initiation Protocol

Views

Total views

870

On Slideshare

0

From embeds

0

Number of embeds

5

Actions

Downloads

0

Shares

0

Comments

0

Likes

4

×