outline - unipg.itconan.diei.unipg.it/web-rtm/lucidircm/slee.pdfsipuri requesturi =...

33
JAIN SLEE Intro Architecture Features and Facilities SIP RA and JAIN SIP JAIN SIP overview and architecture SIP RA SIP Proxy call scenario Demonstration Wireshark capture Advanced service (optional) Outline

Upload: vokhuong

Post on 20-Apr-2018

216 views

Category:

Documents


3 download

TRANSCRIPT

• JAIN SLEE– Intro– Architecture– Features and Facilities

• SIP RA and JAIN SIP– JAIN SIP overview and architecture– SIP RA

• SIP Proxy call scenario– Demonstration– Wireshark capture– Advanced service (optional)

Outline

JAIN SLEE background• SLEE concept (Service Logic Execution Environment):

– telecommunication vs enterprise services– Requirements: real time (high throughput and low latencies),

high availability.– Event oriented– Service container that offers the non logical capabilities

• Java JAIN activity: SIP, SIP Servlet, SLEE• JAIN SLEE is a Java standard for SLEE as reported in JSR 22

(v.1.0) and JSR 240 (v.1.1)– It is a specification designed to meet stringent requirements for

communication applications– It is the point of integration for multiple network resources and

protocols• Value-added services development: high level APIs & open

source standard interfaces

Mobicents Platform• Mobicents Platform is an open source project (LGPL License)

• The project is hosted on http://www.mobicents.org

• Mobicents Platform includes:– Mobicents JAIN SLEE Server

– Mobicents SIP Servlets

– Mobicents Media Server

– Mobicents SIP Presence Service

– Mobicents Diameter Server

• Mobicents JAIN SLEE Server:– Provides an open source implementation of a JSLEE container,

compliant with JSR 22 - JSLEE 1.0 (Mobicents 2.xx is compliant with JSLEE 1.1)

– Implemented as a Service inside the JBoss microkernel

JAIN SLEE architecture

SBB A

SBB CSBB B

Service A

SBB X

SBB Y

Service B

Service Container

Trace

Alarm

Usage

Profiles

Facilities

Event Router

Resource AdaptorsJCC, SIP, TCAP, Parlay/OSA, MGCP,…

Man

agem

ent I

nter

face

(JM

X)

JAIN SLEE Mobicents

JBOSS AS

JAVA VM

Timer

Component model• JSLEE defines different kind of components:

– Services– Service Building Blocks (SBBs)– Events– Resource Adaptors

• JSLEE defines how to compose components in order to create applications inside the container

• JSLEE defines how to deploy components and a management interface to manage installed component– Service Activation– Service Versioning

• Every component has an XML descriptor that specifies its properties

SBB and Service• An SBB is a Service Building Block

– Contains application and service logic (like an EJB)– Event handler, local interface, life cycle, callback

method implementations

• A Service component inside JSLEE is composed by one SBB called Root SBB

• A Root SBB can have child SBB Component, forming an SBB tree

• Multiple SBBs belonging to the same Service can process events in parallel

Developing an SBB• The JAIN SLEE specification defines the Sbb Interface

• SBB developer implements SBB abstract class by implementing SBB interface– Each SBB created provides an abstract class that implements the

SBB interface– SBB abstract class contains the developer provided code for the

life cycle callbacks, event handler methods, and abstract fire event methods

• The SLEE deployment tool generates the SBB concrete class by implementing the SBB abstract class– The SBB developer doesn't implement the SBB concrete class– The SBB concrete class is generated by the SLEE when the SBB is

deployed into the container by extending the SBB developer provided SBB abstract class

Resource Adaptor• JAIN SLEE represents network resources as resource

adaptors and each resource adaptor has a type– Resource adaptor type for SIP is ‘javax.sip’

• JAIN SLEE identifies Event by Event types– SIP Events are classified RequestEvents, ResponseEvents

and TimeoutEvents, each of these classifications contains numerous types

– For example the event type of a Request message of type ‘INVITE’ is javax.sip.RequestEvent.Request.INVITE’

• JAIN SLEE represents the flow of events as activities– Activity Objects in SIP are ClientTransactions (locally

initiated) and ServerTransactions (remotely initiated)

Activity• Abstraction for a related stream of events• Examples:

– Call object emitting call connected, disconnected, ... events

– Mobile location report object emitting location update, ... Events

• Events are routed to SBB entity that are interested in them- An SBB Entity is an instance of an SBB

• JAIN: Java APIs for Integrated Networks• Java-standard interface to a SIP signaling stack

– Standardized the interface to the stack– Standardized the events and event semantics– Application portability - verified via the TCK

• Designed for the developer who requires powerful access to the SIP protocol

• JAIN SIP can be utilized in a user agent, proxy, or embedded into a service container

• Supported RFCs:– RFC 3261, 2976, 3262,– RFC 3265, 3311, 3428

Overview: JAIN SIP

JAIN SIP Architecture

Listener

Provider Provider

Stack Stack

Listener

Network

SIP Events SIP EventsSIP Messages SIP Messages

Application

Listening Point Listening Point

SipStack Interface

• Manages Listening Points and Providers

• SipStack associated with an IP address─ Can Have multiple Listening points

• Application can have multiple SipStacks

• Parses network messages and wrap them in objects

• Manages retransmissions and fires timer events

SipProvider Interface

• Send Request's either statefully via client transactions or statelessly

• Send Response's to a recently received Requests either statefully via server transactions or statelessly

• Register a SipListener to the SipProvider– Notifies Registered Listener of Events

(Request/Response/Timeout) • De-register a SipListener from the SipProvider

– Once de-registered, no longer receives Events from SipProvider

• New Client and Server Transaction methods• Listening Point manipulation methods

– Only one provider per listening point

SipListener Interface

• Process Request's either statefully or statelesslydependent on application.

• Process Response's to a recently sent Requests statefully.

• Process Transaction timeouts and retransmits Timer events.

Responsibilities of the Application

• Application registers an implementation of the SipListener interface to interact with the SIP Stack

• Application MUST go via the SipProvider for all messaging with the stack– Application Sends messages and access stack objects via

the SipProvider

• Application receives messages from the stack as Events via the SipListener interface.

SIP RA

Listener

Provider

Stack

Listening Point

SBB A

SBB CSBB B

Service A

SBB X

SBB Y

Service B

Service Container

NetworkEvent

Router

SIP RA

SIP

Events

Services provided by SIP RA

• Provide methods to format and send SIP messages• Parse incoming messages and enable services to

access to fields via a standardized JAVA interface• Fires appropriate SLEE events during protocol

operation (message arrivals, Transaction time-outs)• Provide Transaction support and manage

Transaction state and lifetime on behalf of a user application

• Provide Dialog support and manage Dialog state and lifetime on behalf on a user application

Demo

SIP Registrar

SIP Proxy

Proxy signaling flow

RTP Data

JSLEE ScratchCard

signaling flow

• Java Development Tools– Sun / Oracle JDK– Eclipse– Ant– Maven

• JAIN SLEE Framework – Mobicents JAIN SLEE Application Server– Mobicents Media Server

• SIPp (SIP traffic generator)• Softphones (Kapanga / X-Lite)• Network Analyzer software (Wireshark)

Used Applications / Framework / Tools

Sun / Oracle JDK http://java.sun.com/javase/downloads/index.jsp

Eclipse www.eclipse.org

Ant http://ant.apache.org

Maven http://maven.apache.org

NIST JAIN Sip http://www-x.antd.nist.gov/proj/iptel/

Mobicents Platform www.mobicents.org- si consiglia di scaricare la versione 1.2.6.GA dal server SVN

SIPp http://sipp.sourceforge.net

Kapanga www.kapanga.net

X-Lite www.counterpath.com

Wireshark www.wireshark.org

References

JSLEE UAS signaling flow

JSLEE receives BYE JSLEE sends BYE

SIP Transactions

Server transaction

Client transaction

Client transaction

Server transaction

Stateful proxyUAC UAS

SIP transaction consists of a single request and any responses to that request.

Transaction Support

• Transaction is created on incoming Request or may be created to send outgoing request.– When a Request is sent out statefully, application must request a

ClientTransaction for the outgoing Request.– When a new Request arrives, Stack associates a ServerTransaction

with Request and passes up to application.

• When a response arrives, the Stack possibly associates a previously created ClientTransaction with the response and passes up to the Application.

• The JAIN SIP implementation manages the association between Transactions and Dialogs.

Support for Dialogs

• A Dialog is a peer to peer association between communicating SIP endpoints.– Maintains Route Sets and Sequence Numbers.

• Dialog deletion may be under application control.

• Transactions may belong to a Dialog– Dialog state changes as a result of changes in Transaction

State

Addresses, Messaging and Headers

• Defines support for Address/Header/Message Factories.

• Address package contains a URI wrapper and defines URIs for SIP and Tel URIs.

• Header package defines interfaces for all the supported headers.

• Accessor (set/get) methods for SIP Header parameters.

• Deep copy requirement for cloning Addresses, Headers and Messages for the benefit of proxies.

Application - Stack Creation

try {Properties properties = new Properties();properties.setProperty("javax.sip.IP_ADDRESS",

"129.6.55.181");properties.setProperty("javax.sip.OUTBOUND_PROXY",

"129.6.55.182:5070/UDP");……// Other initialization properties.try {

sipStack = sipFactory.createSipStack(properties);} catch(SipException e) {

System.exit(-1);}

}

Initialize Stack using SipFactory:

Application – Request Creation

try {SipURI requestURI = addressFactory.createSipURI

(toUser, toSipAddress);// … Create other headersRequest request = messageFactory.createRequest

(requestURI, Request.INVITE, callIdHeader, cSeqHeader, fromHeader, toHeader, viaHeaders, maxForwards);

}

Initialize Request using Factories:

Application - Sending Requests

try {// Create the client transactionClientTransaction inviteTid =

sipProvider.getNewClientTransaction(request);// send the requestsipProvider.sendRequest(inviteTid,request);

}

Send outgoing messages:

Application – Processing Requests

try {public void processRequest(RequestEvent

requestEvent) {Request request =

requestReceivedEvent.getRequest();ServerTransaction st =

requestEvent.getTransaction();// do request specific processing here

}}

Handle incoming messages as Events: