Outline - Unipg.it

Transcription

Outline 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)

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 forcommunication applications– It is the point of integration for multiple network resources andprotocols Value-added services development: high level APIs & opensource 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 ServerMobicents SIP ServletsMobicents Media ServerMobicents SIP Presence ServiceMobicents 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 withJSLEE 1.1)– Implemented as a Service inside the JBoss microkernel

JAIN SLEE architectureJAVA VMJBOSS ASManagement Interface (JMX)JAIN SLEE MobicentsService ContainerService AFacilitiesService BSBB ASBB XTraceAlarmProfilesSBB BSBB CSBB YEvent RouterResource AdaptorsJCC, SIP, TCAP, Parlay/OSA, MGCP, UsageTimer

Component model JSLEE defines different kind of components:––––ServicesService Building Blocks (SBBs)EventsResource Adaptors JSLEE defines how to compose components inorder to create applications inside the container JSLEE defines how to deploy components and amanagement interface to manage installedcomponent– Service Activation– Service Versioning Every component has an XML descriptor thatspecifies 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, callbackmethod implementations A Service component inside JSLEE is composedby one SBB called Root SBB A Root SBB can have child SBB Component,forming an SBB tree Multiple SBBs belonging to the same Servicecan process events in parallel

Developing an SBB The JAIN SLEE specification defines the Sbb Interface SBB developer implements SBB abstract class byimplementing SBB interface– Each SBB created provides an abstract class that implements theSBB interface– SBB abstract class contains the developer provided code for thelife cycle callbacks, event handler methods, and abstract fireevent methods The SLEE deployment tool generates the SBB concrete classby 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 isdeployed into the container by extending the SBB developerprovided SBB abstract class

Resource Adaptor JAIN SLEE represents network resources as resourceadaptors 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, ResponseEventsand TimeoutEvents, each of these classifications containsnumerous 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 (locallyinitiated) 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 locationupdate, . Events Events are routed to SBB entity that are interested in them- An SBB Entity is an instance of an SBB

Overview: JAIN SIP 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 powerfulaccess to the SIP protocol JAIN SIP can be utilized in a user agent, proxy, orembedded into a service container Supported RFCs:– RFC 3261, 2976, 3262,– RFC 3265, 3311, 3428

JAIN SIP ArchitectureApplicationListenerSIP MessagesListenerSIP EventsSIP MessagesSIP EventsProviderProviderListening PointListening PointStackStackNetwork

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 transactionsor statelessly Send Response's to a recently received Requests eitherstatefully 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 fromSipProvider 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 Requestsstatefully. Process Transaction timeouts and retransmits Timerevents.

Responsibilities of the Application Application registers an implementation of theSipListener interface to interact with the SIP Stack Application MUST go via the SipProvider for allmessaging with the stack– Application Sends messages and access stack objects viathe SipProvider Application receives messages from the stack asEvents via the SipListener interface.

SIP RAService ContainerService AService BSBB ASBB BSBB XSBB CSBB YListenerEventsEventRouterSIP RANetworkProviderListening PointStackSIP

Services provided by SIP RA Provide methods to format and send SIP messages Parse incoming messages and enable services toaccess to fields via a standardized JAVA interface Fires appropriate SLEE events during protocoloperation (message arrivals, Transaction time-outs) Provide Transaction support and manageTransaction state and lifetime on behalf of a userapplication Provide Dialog support and manage Dialog stateand lifetime on behalf on a user application

Demo

SIP Registrar

SIP Proxy

Proxy signaling flowRTP Data

JSLEEScratchCardsignalingflow

Used Applications / Framework / Tools Java Development Tools––––Sun / Oracle JDKEclipseAntMaven JAIN SLEE Framework– Mobicents JAIN SLEE Application Server– Mobicents Media Server SIPp (SIP traffic generator) Softphones (Kapanga / X-Lite) Network Analyzer software (Wireshark)

ReferencesSun / Oracle http://maven.apache.orgNIST JAIN Siphttp://www-x.antd.nist.gov/proj/iptel/Mobicents Platformwww.mobicents.org- si consiglia di scaricare la versione 1.2.6.GA dal server ark.org

JSLEE UAS signaling flowJSLEE receives BYEJSLEE sends BYE

SIP TransactionsSIP transaction consists of a single request andany responses to that request.Stateful proxyServer transactionClient transactionServer transactionClient transactionUACUAS

Transaction Support Transaction is created on incoming Request or may be createdto send outgoing request.– When a Request is sent out statefully, application must request aClientTransaction for the outgoing Request.– When a new Request arrives, Stack associates a ServerTransactionwith Request and passes up to application. When a response arrives, the Stack possibly associates apreviously created ClientTransaction with the response andpasses up to the Application. The JAIN SIP implementation manages the associationbetween Transactions and Dialogs.

Support for Dialogs A Dialog is a peer to peer association betweencommunicating 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 TransactionState

Addresses, Messaging and Headers Defines support for Address/Header/Message Factories. Address package contains a URI wrapper and defines URIs forSIP and Tel URIs. Header package defines interfaces for all the supportedheaders. Accessor (set/get) methods for SIP Header parameters. Deep copy requirement for cloning Addresses, Headers andMessages for the benefit of proxies.

Application - Stack CreationInitialize Stack using SipFactory:try {Properties properties new Properties();properties.setProperty("javax.sip.IP avax.sip.OUTBOUND PROXY","129.6.55.182:5070/UDP"); // Other initialization properties.try {sipStack sipFactory.createSipStack(properties);} catch(SipException e) {System.exit(-1);}}

Application – Request CreationInitialize Request using Factories:try {SipURI requestURI addressFactory.createSipURI(toUser, toSipAddress);// Create other headersRequest request messageFactory.createRequest(requestURI, Request.INVITE, callIdHeader,cSeqHeader, fromHeader, toHeader,viaHeaders, maxForwards);}

Application - Sending RequestsSend outgoing messages:try {// Create the client transactionClientTransaction inviteTid sipProvider.getNewClientTransaction(request);// send the }

Application – Processing RequestsHandle incoming messages as Events:try {public void processRequest(RequestEventrequestEvent) {Request request n st requestEvent.getTransaction();// do request specific processing here}}

SBB B SBB C Service A SBB X SBB Y Service B Service Container Trace Alarm . JCC, SIP, TCAP, Parlay/OSA, MGCP, Management Interface (JMX) JAIN SLEE Mobicents JBOSS AS JAVA VM Timer. Component model JSLEE defines different kind of components: - Services - Service Building Blocks (SBBs) . - SIP Events are classified RequestEvents .