ForNeVeR / Kaiwa

A modern XMPP Web client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kaiwa Call Feature not working

patelvanita360 opened this issue · comments

Hello @vitalyster I want to develop audio and video call feature in kaiwa. Can you please share any reference what should I use for it ?

Call feature should be available when contact supports it, check it there
I think you can try to login with two different jids with Kaiwa (in different tabs) and should try and check the log

I'm really very interest in knowing the outcome. It would be great to have audio/video call working!

@vitalyster, I have set up fresh kaiwa and check in two different browser with two different user
But its not enable call feature on user get online
I can see that logs like
<iq xmlns="jabber:client" to="jid/1202466217378674350477283" id="rr-1528174677625-12376335517571216083-Bfr2/duLILLNcGw5PTz7p5mUTYw=-75574673" type="result"><query xmlns="http://jabber.org/protocol/disco#info" node="https://stanza.io#PRuuNgeGKGmTAmpGp40E+pnz1XI=1XIAAAAA"><identity category="client" type="web"/><feature var="http://jabber.org/protocol/disco#info"/><feature var="http://jabber.org/protocol/disco#items"/><feature var="urn:xmpp:attention:0"/><feature var="urn:xmpp:avatar:metadata+notify"/><feature var="urn:xmpp:blocking"/><feature var="urn:xmpp:bob"/><feature var="urn:xmpp:carbons:2"/><feature var="http://jabber.org/protocol/chatstates"/><feature var="http://jabber.org/protocol/commands"/><feature var="urn:xmpp:message-correct:0"/><feature var="jabber:x:data"/><feature var="urn:xmpp:media-element"/><feature var="http://jabber.org/protocol/xdata-validate"/><feature var="http://jabber.org/protocol/xdata-layout"/><feature var="urn:xmpp:delay"/><feature var="jid\20escaping"/><feature var="urn:xmpp:extdisco:1"/><feature var="urn:xmpp:forward:0"/><feature var="http://jabber.org/protocol/geoloc"/><feature var="http://jabber.org/protocol/geoloc+notify"/><feature var="urn:xmpp:hashes:1"/><feature var="urn:xmpp:hash-function-text-names:md5"/><feature var="urn:xmpp:hash-function-text-names:sha-1"/><feature var="urn:xmpp:hash-function-text-names:sha-224"/><feature var="urn:xmpp:hash-function-text-names:sha-256"/><feature var="urn:xmpp:hash-function-text-names:sha-384"/><feature var="urn:xmpp:hash-function-text-names:sha-512"/><feature var="urn:xmpp:idle:1"/><feature var="urn:xmpp:jingle:1"/><feature var="urn:xmpp:jingle:apps:rtp:1"/><feature var="urn:xmpp:jingle:apps:rtp:audio"/><feature var="urn:xmpp:jingle:apps:rtp:video"/><feature var="urn:xmpp:jingle:apps:rtp:rtcb-fb:0"/><feature var="urn:xmpp:jingle:apps:rtp:rtp-hdrext:0"/><feature var="urn:xmpp:jingle:apps:rtp:ssma:0"/><feature var="urn:xmpp:jingle:apps:dtls:0"/><feature var="urn:xmpp:jingle:apps:grouping:0"/><feature var="urn:xmpp:jingle:apps:file-transfer:3"/><feature var="urn:xmpp:jingle:transports:ice-udp:1"/><feature var="urn:xmpp:jingle:transports:dtls-sctp:1"/><feature var="urn:ietf:rfc:3264"/><feature var="urn:ietf:rfc:5576"/><feature var="urn:ietf:rfc:5888"/><feature var="urn:xmpp:json:0"/><feature var="urn:xmpp:mam:0"/><feature var="http://jabber.org/protocol/muc"/><feature var="jabber:x:conference"/><feature var="urn:xmpp:hats:0"/><feature var="http://jabber.org/protocol/mood"/><feature var="http://jabber.org/protocol/mood+notify"/><feature var="http://jabber.org/protocol/nick"/><feature var="http://jabber.org/protocol/nick+notify"/><feature var="jabber:x:oob"/><feature var="urn:xmpp:ping"/><feature var="urn:xmpp:psa"/><feature var="urn:xmpp:reach:0"/><feature var="urn:xmpp:reach:0+notify"/><feature var="urn:xmpp:receipts"/><feature var="urn:xmpp:reference:0"/><feature var="urn:xmpp:rtt:0"/><feature var="http://jabber.org/protocol/shim"/><feature var="urn:xmpp:time"/><feature var="vcard-temp"/><feature var="jabber:iq:version"/></query></iq>

but not getting any response , is there any settings require at ejabberd side to support jingle audio video call ?

I just checked code and looks like kaiwa waiting for calls from other clients, call initiation is not implemented. Trying to find another jingle client to test

@vitalyster , Is there any option to reflect change without kaiwa compilation ?
Its taking to much time on single change.

@vitalyster , http://legastero.github.io/jingle-interop-demos/stanzaio/

i found demo for call and its working . Can we use this in kaiwa?

Sure we can, just need to add to kaiwa code :)

:) but this is video call , do you have any reference for audio call ? Please share with me if it is.

@vitalyster , I am getting following error while using kaiwa call function.

contact.js:258 Uncaught TypeError: app.api.call is not a function

I have try to Integrate that demo in kaiwa but its difficult to integrate in kaiwa. :(

Yes, call function is actually missing :) But Kaiwa should be able to receive calls

Hi @vitalyster , @wokawoka , @ForNeVeR

I am exploring this solution for my learning on ejabberd and web based solution for chat and calling services. it is really nice experience and very good for me to learn new things from kaiwa.

But now i stuck on point to integrate audio calling services with ejabberd using kaiwa. I found some links to integrate video call using stanza.io but that is not useful for me because I want to add only audio calls using SIP PROTOCOL.

Can anybody guide me to integrate ejabberd sip support on kaiwa platform.

I did some analysis but i am not sure that i am going to right track or not. I have share some information so you can get better idea what I am exactly looking for.

https://github.com/processone/ejabberd/blob/master/src/mod_sip.erl

I have one SIP server which can handle SIP traffic but i don't know how can i configure it on kaiwa so it can be terminate SIP traffic on my media server.

Please help me to do integration of SIP using kaiwa with ejabberd.

Any help will be appreciable and looking for reply soon...!!!

Thank you

@patelvanita360 kaiwa is xmpp client, not sip. Event if want to add xmpp/jingle calls - you need to write code for that (with help of stanza.io library it should be easy). For SIP calls you need SIP javascript library and I don't know how kaiwa code can help with that

Is there any chance to add WebRTC support with kaiwa?

It have WebRTC support - it reads user media streams and advertize to other contacts as xmpp jingle candidates, and vice versa - when others making call to kaiwa client - kaiwa reads their jingle candidates and able to open it as WebRTC stream. You just need to add UI for that.

@vitalyster , Any update for my last question ?

Sorry, I don't have time to answer "explain me everything from scratch" questions. I can help only with exact issues.

okay. Thank you

@vitalyster , Can you please tell me how to call custom js and css file in kaiwa? Direct calling not working in kaiwa

I am getting following

Cannot GET "js file path name"

require('custom.js') ?

@vitalyster , I had tried with require(custom.js) while render template, but its not working. Can you plese help to add custom jquery in kaiwa src ?

I did an example there - #231 - what is wrong now?

its working fine. No issues with it. But there was whole emoji module.

Now this is other issue :

Let me state my case here.
I am printing User nickname instead of user profile image in contact list item in sidebar if user has no profile picture.

I have added jquery in src/js/models/contact.js file in setAvatar function.

But its not working properly. So can i add that js in separate js file ? If yes then how to add that js file ?

Still not clear to me what does not work. jquery library is bundled with kaiwa, so any jquery calls should work, if not - then your call or selector or something - is wrong. What error message you get?

Let me clear you in detail. please check below link.
it is in src/js/models/contact.js
https://pastebin.com/tcWhuW2b

in left sidebar there are user contact lists to chat . right ?
Now in that i want like if user has no avatar set, then there should display short name of user (OR nickname from ejabberd).

For that i have added jquery code like in above link.

Issue : if I hide shortname where user profile image is available, then its hide for all user where profile image not set also.

So can i add that hide and show js in separate js file?

I am displaying user short name like in gmail contact display in mobile if user image not avaiable instead of default gravatar image.

Hope you get my point

You should read how Backbone.js framework works, that is the framework which powers Kaiwa UI. contact.js - is a model, it does not have DOM attached, you can not find css classes there, you only can change properties there, like self.avatar.
But model is bound to view (contactListItem for example). When you change avatar on bounded view - it's automatically refresh view. Take a look at simple examples - https://codepen.io/zakirt/pen/zrEZPv

okay. Thank you. :)

@vitalyster can you please suggest me how to integrate following module in kaiwa source for SIP call?
https://www.npmjs.com/package/jssip

i have follow following steps

  1. npm install jssip --save
  2. include jssip in chat.js file
  3. add following code in render function in chat.js file
    https://pastebin.com/xv6W48n5

issue: getting blank response in console.

I will not help with SIP integration just because it is unrelated to Kaiwa at all. You need to maintain different connection, not related to XMPP, different contact list, not related to XMPP. And you are trying to integrate it in terrible way - trying to create new SIP connection for every XMPP contact, how you will maintain 500 SIP connections when you have 500 users? Why you need to use Kaiwa there? Just get any js sip client example and work on it.

@vitalyster Thank you for guide. :)