Candy plugin for Openfire

The ignite realtime community is happy to announce a plugin for the popular Candy (Chats Are Not Dead Yet) group-chat web client. Candy was developed by Michael Weibel (@weibelm) and Patrick Stadler (@pstadler) on behalf of their employer Amiado Group. It provides group and private chat for collaborative working between teams.

The Candy plugin for Openfire adds audo-conferencing and a telephone voicebridge service to Candy. In practice, it means a user can join a group-chat with voice using their PC mic/speaker or their SIP Phone. If the optional PSTN/PBX gateway is configured, then an external mobile phone or home telephone can be used. The voice bridge can call the destination or accept an incoming call. The audio bridge is based on the jVoiceBridge project an can handle hundreds of concurrent users across multiple conferences, Each MUC room in Openfire is accesible as a sip address room@your_domain or via telephone extension associated with each room. See readme below. The Openfire SIP plugin can be used to enter the SIP registration details of the external PSTN/PBX gateway as well keep a log of all calls.

The Candy web client has been extended by a voicebridge plugin which activates/deactivates audio-conferencing when user clicks on the group-chat room/conference tab. Both group-chat and private chats are supported. It uses the XMPP Openlink XEP to handle the telephone messages

Sample configuration for candy voicebridge plugin

// uncomment and edit to use a SIP phone for // audio-conferencing (voip phone).
// voicebridge will call this SIP address
//CandyShop.VoiceBridge.init('sip:1000@192.168.1.96');

// uncomment and edit to use a PBX/PSTN Telephone number
// for audio-conferencing (mobile/desk phone).
// voicebridge will forward this call to the PSTN/PBX gateway
//CandyShop.VoiceBridge.init('+447925589467');

// uncomment and edit to use Flash Player for audio-conferencing (desktop).
// voicebridge will call connect two RTMP streams to audio-conference
// setup Flash Player with mic permissions with '../plugins/voicebridge/setup.html'
CandyShop.VoiceBridge.init('rtmp:');Candy.Core.connect();

Note that this plugin includes a RTMP server on TCP port 1935 and a SIP server on UDP port 5060 and will clash with any other VOIP software or plugin like Redfire on the same server unless you changes the default ports. For more information visit the project web site at http://code.google.com/p/openfire-candy/

Candy Plugin Readme

Installation

  1. Stop Openfire.
  2. Copy the clientcontrol.jar file to the OPENFIRE_HOME/plugins directory.
  3. Copy the sip.jar file to the OPENFIRE_HOME/plugins directory.
  4. Copy the candy.war file to the OPENFIRE_HOME/plugins directory.
  5. Restart Openfire.
  6. From a browser, go to http://your_openfire-server:7070/candy/candy/plugins/voicebridge/setup.html and give Flash permissions to use your mic. Select the remember checkbox.
  7. From a browser, go to http://your_openfire-server:7070/candy
  8. If this pages do not appear, please check you log files and post any errors on www.igniterealtime.org

Configuration

Normal

  • Follow steps from https://github.com/candy-chat/candy/wiki/Installing-a-Jabber-server
  • To associate a MUC room with a voicebridge for incoming SIP calls, make the room name a telephone extension or prefix the room description with a telephone extension. This is needed when making incoming calls from a telephone into the voicebridge. Any room can be accessed via their SIP address (room@your_domain). For security, enable a numeric password to be used as a pin number.
    Image2.jpg

Advanced

  • To setup a PSTN/PBX gateway for external VOIP telephone calls, use the SIP plugin to setup the SIP account and add the follwing two properties to Openfire. Use the standard admin user or any other admin account…

Property
Default Value
Description
voicebridge.default.proxy.name

A unique name for Voice bridge external PSTN Gateway
voicebridge.default.proxy.username

XMPP username used to create the SIP registration by SIP plugin

  • Change the http-bind ports from 7070/7443 to your choice like 80/443

  • Create or modify any of the folowing system properties

Property
Default Value
Description
candy.webapp.connection
bosh
Type of xmpp web connection. Use bosh or websockets. Note that you need Openfire 3.7.2 for websockets
candy.webapp.name
candy
Web application root name
voicebridge.rtmp.port
1935
Listening TCP port for RTMP Server
voicebridge.sip.port
5060
Listening UDP port for SIP Server
voicebridge.default.private.host
localhost
SIP Server internal network host name or ip address
voicebridge.default.public.host
localhost
SIP Server external network host name or ip address
voicebridge.default.conf.exten

Telephone extension for accessing conference bridge from external PSTN gateway
voicebridge.rtp.start.port
3200
RTP Port range start
voicebridge.rtp.end.port
3299
RTP Port range start
voicebridge.server.log.level
1
Logging level for VoiceBridge Server. 1-9
voicebridge.sip.log.level
1
Logging level for SIP Server. 1-9

I have openfire 3.7.2 setup and have tried to get this to work with websockts.

I have added

candy.webapp.connection:websockets

to the sys prop and that seems to do nothing.

I can connect but it’s still just using bosh.

In looking at the index.html I see

is commented out. I have tried uncommenting that with no luck. That fails to connect with a 403.

Can you describe the steps involved in getting an established websockets connection with this plugin?

try comenting the strophe-connection-bosh.js as well

Hi,

How can i change the ulr like this:

:7070/candy/candy/example/index.html

to something

/chat

only?

Thanks,