SailFin - Adding Presence and Voice to WebApps

23
Sun Confidential: NDA Required 1 1 1 SailFin: Adding Presence and Voice to Web applications Binod PG Senior Staff Engineer Sun Microsystems

description

Presentation by Binod PG on how to use SailFin to add Voice and Presence to Web Apps

Transcript of SailFin - Adding Presence and Voice to WebApps

Page 1: SailFin - Adding Presence and Voice to WebApps

Sun Confidential: NDA Required 11 1

SailFin: Adding Presence and Voice to Web applications

Binod PGSenior Staff EngineerSun Microsystems

Page 2: SailFin - Adding Presence and Voice to WebApps

Sun Confidential: NDA Required 2

SIP and HTTP: Converged Environment

HTTP

SIPSIP

SIP

SailFin

Page 3: SailFin - Adding Presence and Voice to WebApps

Sun Confidential: NDA Required 3

SIP Protocol• Resembles HTTP (and SMTP)– Text based protocol– URL for addressing.

• Defined by RFC 3261• Can be asynchronous and bi-directional • Peer to Peer

Page 4: SailFin - Adding Presence and Voice to WebApps

Sun Confidential: NDA Required 4

An Example

Page 5: SailFin - Adding Presence and Voice to WebApps

Sun Proprietary/Confidential: Under NDA 5

SIP Servlets• Handle SIP message processing> Based on Generic Servlet model> SIP Applications, Sessions and Timers

• Defined by JSR-289> Converged Web and SIP applications.> Http and Sip Sessions can access each other.> Http Servlets can initiate calls

• SIP Application Servers> Stand-alone (pure SIP)> Integrated SIP and Java EE Application Servers

Page 6: SailFin - Adding Presence and Voice to WebApps

Sun Proprietary/Confidential: Under NDA 6

SIP Servlet Example Code.

Page 7: SailFin - Adding Presence and Voice to WebApps

Sun Confidential: NDA Required 7

Converged SIP and HTTP Applications:Basic Building Blocks

Page 8: SailFin - Adding Presence and Voice to WebApps

Sun Confidential: NDA Required 8

SIP User Agents➢ Software SIP Phones

➢ X-Lite➢ Ekiga➢ SIP Communicator➢ Adium

➢ Most of the support Audio, Video and Chat➢ Avoid port conflict with SailFin.

Page 9: SailFin - Adding Presence and Voice to WebApps

Sun Proprietary/Confidential: Under NDA 9

SIP Phone Registration• SIP Phone sends a REGISTER message.> Provides the Contact URI(host/port etc) of the SIP Phone.> Typically the first interaction between the phone and

server (SIP Servlet)• Make sure that your SIPServlet handles REGISTER

messges.> Typically Authentication happens during this message.> You can use Java EE role based security.

Page 10: SailFin - Adding Presence and Voice to WebApps

Sun Proprietary/Confidential: Under NDA 10

SIP Application Session• Common Space for Both HTTP and SIP Servlets.• Accessible by an application specific key.• Traverse to all SIP and HTTP sessions and access

application data.• Both HTTP Servlet and SIP Servlet can access the

same SIP Application Session.> Eg: Foo user's HTTP and SIP Servlet access can obtain

the same SIP Application Session.

Page 11: SailFin - Adding Presence and Voice to WebApps

Sun Proprietary/Confidential: Under NDA 11

SipFactory and SipSessionsUtil• Injected to @Resource annotated element.• Available to SIP Servlets, HTTP Servlets and also

EJBs.> Create SIP requests.> Create SIP Address.> Create SIP Application Session.> Lookup SIP Application Session.

Page 12: SailFin - Adding Presence and Voice to WebApps

Sun Proprietary/Confidential: Under NDA 12

Converged HttpServlet Example.

Page 13: SailFin - Adding Presence and Voice to WebApps

Sun Confidential: NDA Required 13

Web based Presence

Page 14: SailFin - Adding Presence and Voice to WebApps

Sun Proprietary/Confidential: Under NDA 14

Presence Agent• SIP Phones publish the presence information to SIP

Servers.• SIP Servlets collect the presence information.• SIP Servlets share the presence information to

HTTP Servlets> SIP Application Session> ServletContext

Page 15: SailFin - Adding Presence and Voice to WebApps

Sun Proprietary/Confidential: Under NDA 15

Presence Agent

SIPServlet

HTTPServlet

SIPApplocation

Session

AJAX/CometSIPSIP

Page 16: SailFin - Adding Presence and Voice to WebApps

Sun Proprietary/Confidential: Under NDA 16

SIP Message with Presence

Page 17: SailFin - Adding Presence and Voice to WebApps

Sun Proprietary/Confidential: Under NDA 17

Example SIP Servlet Code

• HTTP Servlet Accesses the SIP Application Session • Browser can be updated with new status.

Page 18: SailFin - Adding Presence and Voice to WebApps

Sun Confidential: NDA Required 18

How is Sailfin used

Examples of Converged Services

- Conferencing- Call-handling- IP Centrex

Business MobileEnterprise

Fixed-MobileConvergence Home

- Push-to-talk- Chat- Messaging

- Private mobilenumbering

- Mobile workforce

- IPTV, VoD- Games- Ring-back tones

GLASSFISH COMMUNICATIONS SERVER

Page 19: SailFin - Adding Presence and Voice to WebApps

Sun Confidential: NDA Required 19

FUTURESSAILFIN.NEXT

Page 20: SailFin - Adding Presence and Voice to WebApps

Sun Proprietary/Confidential: Under NDA 20

Next Generation Convergence• Web based VOIP phone support.> Avoids the need to install a SIP phone> Integration with Java FX> Server Side Abstraction to Simplify Web based phones.

• SIP POJOs> Annotation based SIP framework> Handles common communication scenarios.> Simplify WEB-SIP convergence.

Page 21: SailFin - Adding Presence and Voice to WebApps

Sun Proprietary/Confidential: Under NDA 21

Next Generation Convergence• SIP Content Management APIs> Presence API> SDP API> Instant Messaging API

• Media Server Integration.> Tighter integration with Media Server.> Making Conferences Easy.

Page 22: SailFin - Adding Presence and Voice to WebApps

Sun Confidential: NDA Required 22

SailFin Communicator

Page 23: SailFin - Adding Presence and Voice to WebApps

Sun Confidential: NDA Required 23

http://blogs.sun.com/theaquarium/tags/sailfin

Thank you

23