1 / 54

Cmpe 491 Special Project In Computer Engineering

Cmpe 491 Special Project In Computer Engineering. SIP User Agent In JAVA. Alp Eren YILMAZ & Serdar YALÇINKAYA. Our Agenda - I. Introduction to SIP – Alp Eren A Sample of SIP Call – Alp Eren Behaviors of SIP User Agents – Alp Eren SIP Programming – Alp Eren SIP Servers – Serdar

joanna
Télécharger la présentation

Cmpe 491 Special Project In Computer Engineering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Cmpe 491 Special Project InComputer Engineering SIP User Agent In JAVA Alp Eren YILMAZ & Serdar YALÇINKAYA

  2. Our Agenda - I • Introduction to SIP – Alp Eren • A Sample of SIP Call – Alp Eren • Behaviors of SIP User Agents – Alp Eren • SIP Programming – Alp Eren • SIP Servers – Serdar • SIP Message Structure - Serdar

  3. Our Agenda – II • Evaluation of Tested User Agents - Serdar • Proposed System - Serdar • Overview of the System • Development Steps • Typical GUI of the Sytem • Questions

  4. Introduction to SIP: Session Initiation Protocol (SIP) is an application – layer control (signaling) protocol for creating, modifying and terminating sessions with one or more participants. These sessions includes Internet telephone calls, multimedia distributions and multimedia conferences.

  5. Important Properties of SIP : • The ability of establishing and modifying peer – to – peer multimedia sessions independently of underlying transport protocols and characteristic of session • SIP supports the personal mobility by assigning a single SIP Uniform Resource Identifier (URI)

  6. SIP Communication Messages: • REGISTRATION – Locate the user • INVITE – Initiate the session • ACK – Acknowledge of the INVITE • BYE – Termination of the session • CANCEL – Cancel pending request • OPTIONS – Capability check

  7. Complementary IETF Protocols : • Resources Reservation Protocol – RSVP • Real Time Protocol – RTP • Real Time Streaming Protocol – RTSP • Session Announcement Protocol – SAP • Session Description Protocol – SDP

  8. Protocol Layers: • Syntax and EncodingLayer • Transportation Layer • Transaction Layer • User Transaction Layer

  9. Typical SIP Call : • The caller agent Alp @boun.edu.tr • PC user (Soft Phone) • The called party Serdar @ibm.com.tr • SIP Phone user • Two Proxy Servers

  10. Typical SIP Call : Serdar’s SIP Phone Alp ‘s PC @boun.edu..tr

  11. Message Sequence:

  12. SIP User Agent Behaviors: • Three common characterisctic : • Generating the request • Sending the request • Processing the responses

  13. SIP Programming: SIP Programming: • SIP has texture encoding feature.[1] • SIP allows third parties or user to program • SIP follows HTTP programming model

  14. Programming Mechanisms: • In order to develop services programmers needs APIs • Three mechanisms suggested in IETF:[2] • SIP Call Processing Language ( SIP – CPL ) • SIP Common Gateway Interface ( SIP – CGI ) • SIP Servlet • Other efforts • Parlay • JAIN™

  15. Call Processing Language (CPL) : • Designed by the IETF to support sophisticated telephony services • May be used by both SIP or H.323. • XML based scripting language for describing controlling call services[3] • SimpleSyntax • Extendible • Easily edited by GUI tools • Scripts runs on network SIP signaling server to create end user services • Lightweight CPL interpreter is need to parser & validate scripts.

  16. CPL Example : Asimple script that blocks anonymous callers[4]; <?xml version="1.0" ?><!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"><cpl> <incoming> <address-switch field="origin" subfield="user"> <address is="anonymous"> <reject status="reject" reason="I don't accept anonymous calls" /> </address> </address-switch> </incoming></cpl>

  17. Common Gateway Interface (CGI) : • Almost identical to HTTP CGI [5] • Language independent ( Perl, Tcl, C, C++, ... ) • Any binary may be executed as a separate program • Suitable for services that contains substantial web content • Passes message parameters through environmental variables to a separate program. • More flexible but more risky • Feb. 1, 2001: RFC 3050 (Common Gateway Interface for SIP) published [6]

  18. Java Servlets : • Similar to HTTP servlets • Instead of using a separate process, messages are passed to a class • The class runs within a JVM (Java Virtual Machine) on server • Security provided by Java • Portable between OSs & servers

  19. JAIN™ SIP API: • Low level API that maps to IETF - RFC 2543 • Interfaces for services across circuit switched and packet networks • Three major objectives : • Service Portability – Write Once Run Anywhere • Network Converges – Any underlying network architecture IP, ATM,Wireless,... • Service Provider Access by Anyone

  20. JAIN™ SIP API: ( Cont.) • Three SIP APIs under JAIN initiative; • JAIN™ SIP API (JSR 32) : • Low level API for almost any signaling protocol ( SIP, H.323, ... ) • Requires extensive knowledge of SIP. • Avaliable at Final Release, http://jcp.org/jsr/stage/final.jsp • JAIN™ SIP Lite : • High Level API for rapid application development • Especially User Agent development • Under development , http://jcp.org/jsr/detail/125.jsp • SIP Servlets : [7] • API for SIP servlets • Under development, http://jcp.org/jsr/detail/116.jsp

  21. Conclusion: • The proposed user agent client will be implemented by using the JAIN SIP API [9] that is released in December 2001. • GUI is designed by using Java Swing

  22. SIP Servers Three types of servers: • Registrars • Proxy • Redirect

  23. Registrars • Registrars keep track of users within their assigned network domain • Registrars take register requests and stores the information in the SIP message in a location service

  24. Registrars Registrar first looks at the Request-URI • if it has access to a location service responsible for the domain • if not, act like a proxy server and forward the message

  25. Registrar • When gets a register message, it should authenticate the user agent client. • Registrar takes the address in the TO field • Checks this address in its location service for the set of bindings • Compares the contact addresses • If exists overwrite, else create new binding

  26. Registrar • Checks expiration interval of binding • if it is not refreshed then remove • The registrar must send a 200 (OK) response back if everything Ok • If it fails then a 404 (not found) response is sent.

  27. Proxy Proxy servers are application-layer routers that forward the SIP requests and responses to the proper destinations.

  28. Proxy • Proxies will make routing decisions and modify messages • Responses will route the same proxies in reverse order

  29. Proxy Two kinds of proxy: • Stateless • Stateful

  30. Stateless Proxy • Acts as a simple forwarding element • Decides the route for the request & forwards it • Then forget all information about the message

  31. Stateful Proxy • Remembers information (transaction state) about each incoming and outgoing (processed incoming request) request • This information is used to process future messages related to that particular request • Proxy can decide to fork an incoming request, which must be handled statefully

  32. Stateful Proxy • Creates new server transactions for requests • Check validity of message • Decide route

  33. Redirect • Redirect servers are useful for reducing the load of the proxy servers that are responsible for routing requests by relying on redirection • Serverspush redirect information in the response • Client got the redirection & will send a new request based on the new routing information

  34. SIP Messages SIP messages are text based generic message = start line message header CRLF [message body]

  35. SIP Messages Two groups of messages: • Requests • Responses

  36. Requests • Register • Invite • Ack • Cancel • Bye • Options

  37. Requests-Register • Register provides a new binding between an address and one or more contact addresses • Can remove previous bindings • Query which bindings are currently in place

  38. Requests-Invite • Invite indicates that the user is being invited to participate in a session • The message body contains a description of the session to which the callee is being invited • SDPis used generally

  39. Requests-Ack • Indicates that the callerhas received a final response to the Invite • Ack may contain a body with the final session description • Empty body indicates the session description in the Invite will be used

  40. Requests-Cancel & Bye • The Cancel request cancels a pending request with given Call-ID, To, From and CSeq • Bye indicates to the server that the call will be ended

  41. Requests-Options • Options allows a client to query aclient or server for their capabilities • Client discovers information about methods, content types, extensions, codecs etc. supported without actually ”ringing” the other party

  42. Responses • SIP Version – Status Code – Reason Phrase • 3-digit Status Code • The first digit describes the class of the response

  43. Responses-Status Code • 1xx: Informational • 2xx: Success • 3xx: Redirection • 4xx: Client Error • 5xx: Server Error • 6xx: Global Failure

  44. Responses-Examples • 100 – Trying • 180 – Ringing • 200 – OK • 300 – Multiple Choices • 301 – Moved Temporarily • 400 – Bad Request • 401 – Unauthorized • 500 – Internal Server Error • 504 – Gateway Time-out • 600 – Busy Everywhere

  45. SDP • SDPisintended for describing multimediasessionsforthe purposes ofsessionannouncement, session invitation, and otherforms ofmultimedia session initiation.

  46. SDP • The purpose of SDP is to conveyinformationabout media streams inmultimedia sessions to allow the recipients ofa session descriptionto participate in the session

  47. SDP includes description of • Media to use (codec, sampling rate) • Media destination (IP address and port number) • Session name and purpose • Times the session is active • Contact information

  48. User Agents- EZ-Phone

  49. User Agents- Ubiquity

  50. User Agents- Ubiquity

More Related