CommunicationBean defined in SailFin CAFE act as the listener for any communication events. For example, in case of instant messaging between
two SIP clients, a CommunicationBean would intercept all the messages. These messages are available to the CommunicationBean implementation
as POJO. That also mean that, you can implement the business logic in the CommunicationBean.
RFC 3994 standardized how SIP applications implement "Indication of Messages" or "Typing detection" at protocol level. SailFin CAFE provides a simple way to detect typing using a Communication Bean. Also a web application can send a "Message Indication" to a SIP client.
Here is the code that implements receiving Instant Messages and Message Indication from a SIP client.
Hope you have read my last blog on using SailFin CAFE with web applications. Mohit has added an entry on how to enable Communication capabilities in JSPs. The approach is exactly same except that the CommunicationSession object is available as a session attribute.
Take a look!
So far I have described how create server applications that handle call, conference and IM using SailFin CAFE. In this edition lets take a look at how to add communication capabilities to web applications in a (very) simple way.
I like to start with the code. So, here is some code that implements making a phone call between two parties from the web application.
package my.test;import javax....