This document describes the architecture behind Finesse connections that uses Bidirectional-streams Over Synchronous HTTP (BOSH) and how issues related to this can be diagnosed.
What is BOSH?
Extensible Messaging and Presence Protocol (XMPP) is stateful protocol in a client-server model. If an application needs to work with XMPP, mutliple issues arise. Browsers don’t support XMPP natively, so all XMPP traffic must be handled by a program which is running inside the browser.
First problem is that HTTP is stateless protocol, means each HTTP request isn’t related with other request. However this problem can be addressed by applicative means for example by using cookies/post data.
The second problem is the unidirectional behaviour of HTTP only the client sends requests and the server can only respond. The server’s inability to push data makes it unnatural to implement XMPP over HTTP.
The purpose of using BOSH is to cover up the fact that the server doesn’t have to respond as soon there is a request The response is delayed until the server has data for the client and then it is sent as response. As soon as the client gets it he makes a new request (even if he has nothing to send) and so forth.
BOSH is quite efficient, from server load point of view and traffic-wise.
For Finesse Desktop Bosh connection is established every 30 seconds as a stale connection .Also there is SystemInfo request which checks Finesse Tomcat status every minute, as shown in the image:
As shown in the image, Openfire debug log shows the http binding with desktop along with your the IP address and port of agent pc.
As shown in the image, the last active 0 ms shows that session is still active.
Enable Notification Service debug logs of Unified Contact Center Express (UCCX), as shown in the image:
Enable Notification Service debug logs of Unified Contact Center Enterprise (UCCE) (Finesse Standalone), as shown in the image:
Common Issue due to BOSH disconnect
For CCX logout timer is 60 seconds after browser disconnect (Ready or Not Ready state)
For CCE Agent in Ready state moves to Not Ready after 180 seconds(120 Seconds to detect browser disconnect and 60 seconds for CTI Force Logout Event) and then logout is done as per Logout Non-Activity timer in CCE setting whereas if Agent is in Not Ready logout is triggered within 180 seconds
In Debug logs:
2017.06.17 00:14:34 Session (id=f382a015) was last active 0 ms ago: firstname.lastname@example.org/desktop
2017.06.17 00:15:04 Session (id=f382a015) was last active 13230 ms ago: email@example.com/desktop
2017.06.17 00:15:34 Session (id=f382a015) was last active 43230 ms ago: firstname.lastname@example.org/desktop
2017.06.17 00:16:04 Session (id=f382a015) was last active 63231 ms ago: email@example.com/desktop
2017.06.17 00:16:04 Closing idle session (id=f382a015): firstname.lastname@example.org. cisco.com/desktop after being inactive for more than threshold value of 60
2017.06.17 00:16:04 A session is being closed for email@example.com. cisco.com/desktop
Openfire closing the idle session indicates agent logout will trigger 1 min and this appears as reason code 255 in reports
In webservices logs:
0000001043: XX.XX.XX.XXX: Jun 17 2017 00:16:04.630 +0530: %CCBU_Smack Listener Processor (1)-6-PRESENCE_NOTIFICATION_RECIEVED: %[FROM JIDfirstname.lastname@example.org/desktop][PRESENCE_TYPE=unavailable]:Finesse received a presence notifcation
0000000417: XX.XX.XX.XXX: Jun 17 2017 00:16:04.631 +0530: %CCBU_Smack Listener Processor (1)-6-UNSUBSCRIBE_REQUEST_SUCCESS: %[NodeId=/finesse/api/User/1001003/ClientLog][email@example.com]: Sucessfully unsubscribed from a node on the XMPP server
0000001044: XX.XX.XX.XXX: Jun 17 2017 00:16:04.631 +0530: %CCBU_Smack Listener Processor (1)-6-AGENT_PRESENCE_MONITOR: %[message_string=Adding agent 1001003 into the expiry hash.]:
0000001051: XX.XX.XX.XXX: Jun 17 2017 00:16:35.384 +0530: %CCBU_pool-8-thread-1-6-AGENT_PRESENCE_MONITOR: %[message_string=[Expired] Removed agent from cache 1001003]:
0000001060: XX.XX.XX.XXX:: Jun 17 2017 00:17:04.632 +0530: %CCBU_CoreImpl-worker12-6-PRESENCE DRIVEN LOGOUT: %[agent_id=1001003]: Performing CTI Logout on basis of the agents unavailable presence
0000001061: XX.XX.XX.XXX:: Jun 17 2017 00:17:04.633 +0530: %CCBU_CoreImpl-worker12-6-MESSAGE_TO_CTI_SERVER: %[cti_message=Invoke id :39 , agentstate : 1, workmode : 0, reason code: 255, forceflag :1, agentcapacity: 1, agentext: 1001003, agentid: 1001003, supervisorid: null, ssoFlag=false][cti_message_name=SetAgentStateReq]: Message going to the backend cti server