cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Walkthrough Wednesdays
155
Views
5
Helpful
0
Replies
ehtasham.malik
Beginner

Strophe XMPP Connection with Finesse

We are developing a CTI web client by using the Strophe library. We are having a few critical issues. 

As there are 2 ways to get the subscription, sync and async 

If we get the async subscription, the code works well, however the event we received from finesse are not in order for example

Inbound call land and agent answer and than end the call, the event we recieve Reserved-> TALKING -> Work -> Ready -> Reserved-> Ready-> Work-> Ready 

 

Which is totally not in a sequence, and doesn't serve the purpose. 

 

On the other hand, if we used sync subscription, our Web UI gets dead-slow and become unresponsive, even though in that code, I am only getting the subscription and printing the event in the console. 

 

This is the simple code i am using for sync subscription 

 

 

<html>
<script src='strophe.min.js'></script>
<script src='powerchat.js'></script>

<script>

var agent = null;
XMPP.OnMessage = function ( message ) {

var msg_str = message.event_items_items[0].notification_text;
console.log(msg_str);

}
XMPP.OnConnectionStatus = console.info;

//XMPP.OnPresence = console.log;

//XMPP.OnMessage = console.log;

XMPP.connect ( {

connection: "https://xxxxxx:7443/http-bind/", // Your bosh / websocket connection
jid: "xxxx@ucce.com",
pass: "xxxxx",
sync: true
} );

</script>

</html>

 

Any help would be really appreciated !!

 

0 REPLIES 0
Content for Community-Ad