10-30-2017 07:58 AM
Hello,
I want to subscribe a supervisor to team and queue node, here is my code:
let pub = $iq({ type: 'set', to: "pubsub.service.com",from:"agentID@service.com",id:"sub1" })
.c('subscribe', { node: "/finesse/api/Team/5001/Users", jid :agentID@service.com });
console.log("Sending IQ Request to XMPP server to connect to Node");
connection.sendIQ(pub,successPub,errorPub,5000);
function successPub(a,b,c){
10-30-2017 08:10 AM
Hello,
I want to subscribe a supervisor to team and queue node, here is my code:
let pub = $iq({ type: 'set', to: "pubsub.service.com",from:"agentID@service.com",id:"sub1" })
.c('subscribe', { node: "/finesse/api/Team/5001/Users", jid :agentID@service.com });
connection.sendIQ(pub,successPub,errorPub,5000);
function errorPub(e){
console.log(e)
}
and I get a error:
<iq xmlns="jabber:client" type="error" id="sub1" from="pubsub.service.com" to="agentID@service.com/15224f4"><error code="500" type="wait"><internal-server-error xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
Somebody can help me?Thank you !
10-30-2017 10:14 AM
Hi,
Please take a look at this article: https://devnetsupport.cisco.com/hc/en-us/articles/115012759067-How-do-you-subscribe-to-Finesse-Notifications
A few questions:
1. Is the FQDN of your finesse server service.com?
2. What is the agentId of the supervisor you are trying to get the team events for? Is it actually "agentID"?
3. What is the Team Id for that supervisor? Is it actually 5001?
Thanx,
Denise
10-31-2017 01:54 AM
Hi Denise,
Here is the info of my supervisor:
<User>
<dialogs>/finesse/api/User/7131000/Dialogs</dialogs>
<extension></extension>
<firstName>Asma</firstName>
<lastName>CA.ABDELFADEL</lastName>
<loginId>7131000</loginId>
<loginName>7131000@cc.tel.mcra.fr</loginName>
<mediaType>1</mediaType>
<pendingState></pendingState>
<reasonCodeId>-1</reasonCodeId>
<roles>
<role>Agent</role>
<role>Supervisor</role>
</roles>
<settings>
<wrapUpOnIncoming>REQUIRED</wrapUpOnIncoming>
</settings>
<state>LOGOUT</state>
<stateChangeTime>2017-10-30T13:31:55.221Z</stateChangeTime>
<teamId>5949</teamId>
<teamName>AT_TEST_CAS_01</teamName>
<teams>
<Team>
<id>5949</id>
<name>AT_TEST_CAS_01</name>
<uri>/finesse/api/Team/5949</uri>
</Team>
</teams>
<uri>/finesse/api/User/7131000</uri>
</User>
and info of xmpp:
<xmppDomain>FRDC2ICMFIN2A.cc.tel.mcra.fr</xmppDomain>
<xmppPubSubDomain>pubsub.FRDC2ICMFIN2A.cc.tel.mcra.fr</xmppPubSubDomain>
so my code(strophe xmpp) is:
pub = $iq({ type: 'set', to: "pubsub.FRDC2ICMFIN2A.cc.tel.mcra.fr",from:"7131000@FRDC2ICMFIN2A.cc.tel.mcra.fr",id:"sub1" })
.c('subscribe', { node: "/finesse/api/Team/5949/Users", jid :7131000@FRDC2ICMFIN2A.cc.tel.mcra.fr });
and the xmppdomain is FRDC2ICMFIN2A.cc.tel.mcra.fr,
agenID of supervisor is 7131000
the Team ID is 5949
I have tested with the same code some days before, It was OK and I have got the node teams and queue.
But now it doesn't work, I can get the notification of users and dialogs of agent but not the node of teams and queue for a supervisor.
and I have the error:
"<iq xmlns="jabber:client" type="error" id="sub1" from="pubsub.frdc2icmfin2a.cc.tel.mcra.fr" to="7131000@frdc2icmfin2a.cc.tel.mcra.fr/68fad082"><error code="500" type="wait"><internal-server-error xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></internal-server-error></ip>"
I see the doc of strophe xmpp for this error:
"Several error conditions are possible. For example, the server may encounter an internal condition that prevents it from creating the session, the username or authorization identity may lack permissions to create a session, or there may already be an active resource associated with a resource identifier of the same name.
If the server encounters an internal condition that prevents it from creating the session, it MUST return an error with type'wait'."
Maybe my server finesse have some conditions to limit the users to subcribe the team or queue?
Thank you !
10-31-2017 08:51 AM
I found the problem, I should add the "xmlns: 'http://jabber.org/protocol/pubsub'" in my code. Now it works. Thanks.
10-31-2017 10:22 AM
Cool! Glad that you figured it out!
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: