My INSURER PTE LTD - Insurtech Innovation Award 2024
SailFin - Adding Presence and Voice to WebApps
1. SailFin: Adding Presence
and Voice to Web
applications
Binod PG
Senior Staff Engineer
Sun Microsystems
Sun Confidential: NDA Required 1
1
2. SIP and HTTP: Converged Environment
HTTP
SIP
SailFin
SIP
SIP
Sun Confidential: NDA Required 2
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
Sun Confidential: NDA Required 3
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
5
Sun Proprietary/Confidential: Under NDA
7. Converged SIP and HTTP Applications:
Basic Building Blocks
Sun Confidential: NDA Required 7
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.
➢
Sun Confidential: NDA Required 8
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.
9
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.
10
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.
>
11
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
14
Sun Proprietary/Confidential: Under NDA
15. Presence Agent
SIP SIP HTTP
Servlet Applocation Servlet
Session
AJAX/Comet
SIP
SIP
15
Sun Proprietary/Confidential: Under NDA
16. SIP Message with Presence
16
Sun Proprietary/Confidential: Under NDA
17. Example SIP Servlet Code
• HTTP Servlet Accesses the SIP Application Session
• Browser can be updated with new status.
17
Sun Proprietary/Confidential: Under NDA
18. How is Sailfin used
Examples of Converged Services
Mobile Fixed-Mobile
Business Home
Enterprise Convergence
- Private mobile - IPTV, VoD
- Conferencing - Push-to-talk
numbering - Games
- Call-handling - Chat
- Mobile workforce - Ring-back tones
- IP Centrex - Messaging
GLASSFISH COMMUNICATIONS SERVER
Sun Confidential: NDA Required 18
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.
20
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.
21
Sun Proprietary/Confidential: Under NDA