Conference chat in WebRTC Rooms

Usually the conference chat feature is only available in VERTO WebRTC clients, where is given almost for free by the capability of VERTO protocol to keep data structures in sync and distribute events to all connected clients. Verto clients just implements callbacks when a chat event is received.

SIP protocol does not include provisions for syncing of data structures or for events distribution. SIP is a completely different world.

The SIP WebRTC Rooms client has been implemented to only exchange "traditional" SIP SIMPLE messages, it does not use WebRTC or JavaScript techniques to get the chat events, but only uses SIP techniques. Actually it uses the same SIP instant messaging techniques as "traditional" SIP hard and soft phones (and we'll see with WebRTC Rooms that the conference chat messages can be received and sent by "traditional" SIP hard and soft phones too).

As a "bridge" to exchange the conference chat messages with the SIP conference participants we'll use the internal FreeSWITCH CHAT API, and also mod_sms and its chatplan.

Mod_sms, as we'll see later, is able to intercept and route (according to its chatplan) all messages related to the internal CHAT API interface of FreeSWITCH. The conference FreeSWITCH module (mod_conference) send out the chat messages to conference participants using the internal FreeSWITCH CHAT API. Also, SIMPLE SIP messages sent by SIP clients can be received by mod_sms and routed by its chatplan (as incoming voice and video calls are managed by the FreeSWITCH dialplan).

So, it was enough to register the SIP clients with the CHAT API of the conference so they receive chat messages from the conference, and set a chatplan so mod_sms will route the incoming SIMPLE SIP messages sent by SIP clients into the CHAT API of the conference.

By the way, in principle this same mechanism is working also for conference participants coming via mod_dingaling, mod_gsmopen and other modules that implement the CHAT FreeSWITCH API.