cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
477
Views
0
Helpful
4
Replies

read the dialog notification from xmpp finesse

vinaya-govinda
Level 1
Level 1

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.

 

 

vinayagovinda_1-1721638528897.png

 

4 Replies 4

dekwan
Cisco Employee
Cisco Employee

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

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);
}
}
}
);

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

Hi Vinaya,

Did you resolve the issue or still facing?

Regards,

Umesh