Integrating kaiwa with sip


#1

Hi All,
I am working on an opensource web ui project which provide chat, call and video chat functionality over browser more similar to jitsii.

In Background, we are using ejabberd for chat related stuff and in front we are using kaiwa. We are going good with chat and video using jingle module for ejabberd but as we are also using sip server i.e. freeswitch. We want to integrate our sip contacts to kaiwa, so that all can connect with each other.

In short, I want some help to integrate sip over xmpp in kaiwa or you can suggest any hint which can be useful to use sip with ejabberd.


#2

I can tell you how this integration works in jitsi-meet, whether it will work in your environment and what changes need to be made you need to figure it yourself.
So we have this component jigasi(https://github.com/jitsi/jigasi) which reuses the code from jitsi desktop and its ability to create sip and xmpp jingle calls and be able to merge those.

You can install jigasi, configure it with sip client credentials, where to connect as xmpp component (by default it is localhost, as default deployment is with jitsi-meet, xmpp server and jigasi on the same host).

Then jicofo (our focus component, that orchestrates the conference) sees a jigasi instance and offer that option to the jitsi-meet clients which can dial-out. When client dial-out a rayo message is sent to jigasi which then joins the muc amd jicofo invites the web client and the jigasi client, soding the jingle part and then jigasi creates a sip call which then bridges with the xmpp call.

The other direction, jigasi sees incoming sip call, extract from the sip headers the room it needs to join, it joins the muc and the same flow with jicofo inviting people to connect is executed again and the calls are connected.

Jigasi decodes all the audio that comes from the multiple streams coming on the xmpp side and mixes the audio and then encodes it and sends it to sip. The incoming audio from sip is also transcoded to the codec(opus) using in the xmpp call and send to the bridge.
Jigasi do no support video and will never will.

There is a translator mode for jigasi, which do not transcode anything, but just re-sends all media streams it receives to the sip server and let the sip server to take care of the mixing, this is in case the sip side supports multistreams.


#3

Hi Damencho,
Your reply is mean a lot to me. Thanks for up to the mark clarifications on my query. As I have installed jitsi using ubutu stable repo. I am able to launch web conference gui. But as I told you that we are using ejabbered and freeswitch in backend, Can you please just guide me that how can I integrate your source or which technology you have used. As from overview, I can say all connections are made with some lua scripts if I am true. Also somewhere all ports listening are more common with ejabberd default ports.

So it will boost my energy if you give me some hint on core parts on which I can start my modification to integrate jitsi with my source.

Again Thanks a lot for your response.


#4

There is a simple overview of the system here: https://github.com/jitsi/jitsi-meet/blob/master/doc/manual-install.md#network-description (with nginx as a webserver on the schema, the default install if there is no apache or nginx installed will configure jetty inside jvb to serve the web).

The lua you are mentioning is prosody, a xmpp server where all components connect and communicate to each other.

The easiest way for you will be to keep jitsi-meet deployment separate from yours and use it through the iframe API https://github.com/jitsi/jitsi-meet/blob/master/doc/api.md.

If you want to integrate it with your ejabberd server to use authentication and already existing accounts, than you can search the forum, there were few people reporting that had used ejabberd, cannot help you there. If you want to use authentication this is the documentation: https://github.com/jitsi/jicofo#secure-domain