06-07-2017 04:44 AM
Hi, I use Finesse Cisco Finesse 11.5 API for my website, when I use xmpp to connect finesse, I can get the message of stanza from xmpp. But the problem is when I refresh the webpage, I have to connect again the xmpp, and then I will get twice the same message of stanza from xmpp. So is there a method can check if xmpp is connected or not? If it is connected, we can ignore and not execute the connection of xmpp. Or if we have got a stanza, then the xmpp will not send the same stanza again. here is my code xmpp with sample-xmpp:
var xmpp = require('simple-xmpp');
xmpp.connect({
jid : ID,
password : PSW,
host : HOST,
port : PORT
});
xmpp.send("finesse@xxx.mcra.fr", `<presence to="finesse@xxx.tel.mcra.fr" type="subscribe" />`);
xmpp.on("stanza", function(stanza){
//function
});
Solved! Go to Solution.
06-13-2017 10:28 AM
Hi,
I haven't used too many xmpp libraries. The only one I've tried is for python, but you can get a list here: https://xmpp.org/software/libraries.html
Here is the sample I created using python: https://github.com/CiscoDevNet/finesse-sample-code/tree/master/NonGadgetPythonSample
Thanx,
Denise
06-07-2017 10:25 AM
Hi,
Which library are you using for your xmpp connection. My initial thought is to see if you can check the presence of the user to see if they are connected or not.
Thanx,
Denise
06-13-2017 12:50 AM
Hello, I use simple-xmpp for the nodejs,but I find it is not very good when I use it for the back-end. Do you have a good library for the front-end? And can you give me a example to get the stanza from finesse API with your library xmpp? Thank you very much !
06-13-2017 10:28 AM
Hi,
I haven't used too many xmpp libraries. The only one I've tried is for python, but you can get a list here: https://xmpp.org/software/libraries.html
Here is the sample I created using python: https://github.com/CiscoDevNet/finesse-sample-code/tree/master/NonGadgetPythonSample
Thanx,
Denise
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide