Top Banner
Cmpe 491 Special Project In Cmpe 491 Special Project In Computer Engineering Computer Engineering SIP User Agent In SIP User Agent In JAVA JAVA Alp Eren YILMAZ & Serdar YALÇINKAYA
54

Cmpe 491 Special Project In Computer Engineering

Jan 19, 2016

Download

Documents

Joana Soares

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 - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Cmpe 491 Special Project In Computer Engineering

Cmpe 491 Special Project InCmpe 491 Special Project InComputer EngineeringComputer Engineering

SIP User Agent In JAVASIP User Agent In JAVA

Alp Eren YILMAZ

&

Serdar YALÇINKAYA

Page 2: Cmpe 491 Special Project In Computer Engineering

Our Agenda - IOur Agenda - I

Introduction to SIP – Alp Eren A Sample of SIP Call – Alp ErenBehaviors of SIP User Agents – Alp ErenSIP Programming – Alp ErenSIP Servers – SerdarSIP Message Structure - Serdar

Page 3: Cmpe 491 Special Project In Computer Engineering

Our Agenda – IIOur Agenda – II

Evaluation of Tested User Agents - SerdarProposed System - Serdar

– Overview of the System– Development Steps– Typical GUI of the Sytem

Questions

Page 4: Cmpe 491 Special Project In Computer Engineering

Introduction to SIP:Introduction to SIP:

Session Initiation Protocol (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.

 

Page 5: Cmpe 491 Special Project In Computer Engineering

Important Properties of SIP :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)

Page 6: Cmpe 491 Special Project In Computer Engineering

SIP Communication Messages:SIP Communication Messages:

REGISTRATION – Locate the userINVITE – Initiate the sessionACK – Acknowledge of the INVITEBYE – Termination of the sessionCANCEL – Cancel pending requestOPTIONS – Capability check

Page 7: Cmpe 491 Special Project In Computer Engineering

Complementary IETF Protocols :Complementary IETF Protocols :

Resources Reservation Protocol – RSVP Real Time Protocol – RTP Real Time Streaming Protocol – RTSPSession Announcement Protocol – SAPSession Description Protocol – SDP

Page 8: Cmpe 491 Special Project In Computer Engineering

Protocol Layers:Protocol Layers:

Syntax and Encoding LayerTransportation LayerTransaction LayerUser Transaction Layer

Page 9: Cmpe 491 Special Project In Computer Engineering

Typical SIP Call :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

Page 10: Cmpe 491 Special Project In Computer Engineering

Alp ‘s PC @boun.edu..tr

Serdar’s SIP Phone

Typical SIP Call :Typical SIP Call :

Page 11: Cmpe 491 Special Project In Computer Engineering

Message Sequence:Message Sequence:

Page 12: Cmpe 491 Special Project In Computer Engineering

SIP User SIP User Agent BehaviorsAgent Behaviors::

Three common characterisctic :

• Generating the request

• Sending the request

• Processing the responses

Page 13: Cmpe 491 Special Project In Computer Engineering

SIP Programming:SIP Programming:

SIP has texture encoding feature.[1]

SIP allows third parties or user to program

SIP follows HTTP programming model

SIP Programming:SIP Programming:

Page 14: Cmpe 491 Special Project In Computer Engineering

Programming Mechanisms: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™

Page 15: Cmpe 491 Special Project In Computer Engineering

Call Processing Language (CPL) :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]

– Simple Syntax– 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.

Page 16: Cmpe 491 Special Project In Computer Engineering

CPL Example :CPL Example :

A simple 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>

Page 17: Cmpe 491 Special Project In Computer Engineering

Common Gateway Interface (CGI) :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]

Page 18: Cmpe 491 Special Project In Computer Engineering

Java Servlets :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

Page 19: Cmpe 491 Special Project In Computer Engineering

JAINJAIN™™ SIP API: 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

Page 20: Cmpe 491 Special Project In Computer Engineering

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

JAINJAIN™™ SIP API: ( Cont.) SIP API: ( Cont.)

Page 21: Cmpe 491 Special Project In Computer Engineering

Conclusion: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

Page 22: Cmpe 491 Special Project In Computer Engineering

SIP ServersSIP Servers

Three types of servers:– Registrars– Proxy– Redirect

Page 23: Cmpe 491 Special Project In Computer Engineering

RegistrarsRegistrars

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

Page 24: Cmpe 491 Special Project In Computer Engineering

RegistrarsRegistrars

Registrar first looks at the Request-URI if it has access to a location service

responsible for the domainif not, act like a proxy server and

forward the message

Page 25: Cmpe 491 Special Project In Computer Engineering

RegistrarRegistrar

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

Page 26: Cmpe 491 Special Project In Computer Engineering

RegistrarRegistrar

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.

Page 27: Cmpe 491 Special Project In Computer Engineering

ProxyProxy

Proxy servers are application-layer routers

that forward the SIP requests and responses to

the proper destinations.

Page 28: Cmpe 491 Special Project In Computer Engineering

ProxyProxy

Proxies will make routing decisions and modify messages

Responses will route the same proxies in reverse order

Page 29: Cmpe 491 Special Project In Computer Engineering

ProxyProxy

Two kinds of proxy:– Stateless– Stateful

Page 30: Cmpe 491 Special Project In Computer Engineering

Stateless ProxyStateless Proxy

Acts as a simple forwarding element Decides the route for the request &

forwards itThen forget all information about the

message

Page 31: Cmpe 491 Special Project In Computer Engineering

Stateful ProxyStateful 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

Page 32: Cmpe 491 Special Project In Computer Engineering

Stateful ProxyStateful Proxy

Creates new server transactions for requests Check validity of messageDecide route

Page 33: Cmpe 491 Special Project In Computer Engineering

RedirectRedirect

Redirect servers are useful for reducing the load of the proxy servers that are responsible for routing requests by relying on redirection

Servers push redirect information in the response

Client got the redirection & will send a new request based on the new routing information

Page 34: Cmpe 491 Special Project In Computer Engineering

SIP MessagesSIP Messages

SIP messages are text based

generic message = start line message header CRLF [message body]

Page 35: Cmpe 491 Special Project In Computer Engineering

SIP MessagesSIP Messages

Two groups of messages:

– Requests– Responses

Page 36: Cmpe 491 Special Project In Computer Engineering

RequestsRequests

RegisterInviteAckCancelByeOptions

Page 37: Cmpe 491 Special Project In Computer Engineering

Requests-RegisterRequests-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

Page 38: Cmpe 491 Special Project In Computer Engineering

Requests-InviteRequests-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

SDP is used generally

Page 39: Cmpe 491 Special Project In Computer Engineering

Requests-AckRequests-Ack

Indicates that the caller has 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

Page 40: Cmpe 491 Special Project In Computer Engineering

Requests-Cancel & ByeRequests-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

Page 41: Cmpe 491 Special Project In Computer Engineering

Requests-OptionsRequests-Options

Options allows a client to query a client or server for their capabilities

Client discovers information about

methods, content types, extensions, codecs etc. supported without actually ”ringing” the other party

Page 42: Cmpe 491 Special Project In Computer Engineering

ResponsesResponses

SIP Version – Status Code – Reason Phrase3-digit Status CodeThe first digit describes the class of the

response

Page 43: Cmpe 491 Special Project In Computer Engineering

Responses-Status CodeResponses-Status Code

1xx: Informational 2xx: Success 3xx: Redirection 4xx: Client Error 5xx: Server Error 6xx: Global Failure

Page 44: Cmpe 491 Special Project In Computer Engineering

Responses-ExamplesResponses-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

Page 45: Cmpe 491 Special Project In Computer Engineering

SDPSDP

SDP is intended for describing multimedia sessions for the purposes of session announcement, session invitation, and other forms of multimedia session initiation.

Page 46: Cmpe 491 Special Project In Computer Engineering

SDPSDP

The purpose of SDP is to convey information about media streams in multimedia sessions to allow the recipients of a session description to participate in the session

Page 47: Cmpe 491 Special Project In Computer Engineering

SDP includes description ofSDP includes description of

Media to use (codec, sampling rate)

Media destination (IP address and port number)

Session name and purposeTimes the session is activeContact information

Page 48: Cmpe 491 Special Project In Computer Engineering

User Agents- EZ-PhoneUser Agents- EZ-Phone

Page 49: Cmpe 491 Special Project In Computer Engineering

User Agents- UbiquityUser Agents- Ubiquity

Page 50: Cmpe 491 Special Project In Computer Engineering

User Agents- UbiquityUser Agents- Ubiquity

Page 51: Cmpe 491 Special Project In Computer Engineering

Proposed User AgentProposed User Agent

Implementing a JAVA based User Agent

providing functions: Registering Making, canceling, forwarding, ending a call Address book Debugging Window (Optional) Video Conferencing

Page 52: Cmpe 491 Special Project In Computer Engineering

Proposed User AgentProposed User Agent

Page 53: Cmpe 491 Special Project In Computer Engineering

Proposed User AgentProposed User Agent

Page 54: Cmpe 491 Special Project In Computer Engineering

Proposed User AgentProposed User Agent