07-22-2024 01:59 AM
I am successfully connected to the XMPP server using jar "smack-tcp-4.4.8"
Also able to subscribed the team and user. got the below response from server.
<pub sub xmlns='http://jabber.org/protocol/pubsub'<pubsub xmlns="http://jabber.org/protocol/pubsub"><subscription node="/finesse/API/User/10101010/Dialogs" jid="10101010@mmm5nitcctcfp1.tnmmthc.com.mm" subscription="subscribed"><subscribe-options/></subscription></pub sub></pub sub>
Now i want to get the event/dialog notification from server in below format whenever agent receive the call. I am using java smack library.
07-23-2024 11:36 AM
Hi @vinaya-govinda ,
The user is automatically subscribed to dialog events. So it is a matter of just adding the listener to receive the events. Take a look at the NotificationSeviceSample
Thanx,
Denise
07-24-2024 03:12 AM
Hi @dekwan
I tried with the same code but events are not printing. if any sample code please share.
PubSubManager subscrManager=PubSubManager.getInstanceFor(connection, JidCreate.bareFrom("pubsub.mmm5nitcctcfp1.tnmmthc.com.mm"));
Node node=subscrManager.getNode("/finesse/api/Team/5000/Users");
node.addItemEventListener(new ItemEventListener(){
public void handlePublishedItems(ItemPublishEvent itemEvents) {
List<PayloadItem> item = itemEvents.getItems();
System.out.println("^^^^^^^^^^^^^^Received Item thru pubsub Item="+item.toString());
for(PayloadItem i:item)
{
System.out.println("message in the item on pubsub="+i);
}
}
}
);
07-25-2024 12:45 PM
Hi,
It's been a while since I've used the smack library to get events so unfortunately I don't have any sample code. Have you tried to use the sample code as is after changing the configuration for your environment? If so, then I don't have any other ideas at the moment.
Thanx,
Denise
09-18-2024 10:08 PM
Hi Vinaya,
Did you resolve the issue or still facing?
Regards,
Umesh
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