« Back to CTIOS Toolkit Questions

Client not receiving events

Combination View Flat View Tree View
Threads [ Previous | Next ]
I recenlty upgraded my custom CTIOS from 7.2.4 to 7.2.7. We used .net CIL and VS .net  2003.
However after upgrade we are seeing an issue where in after some time there will be no events received from the CTIOS server to the client and as a result no calls come in and CTIOS is all grayed out. The only option is to "X" out of the application and log back in.
 
I have attached the log file snippet below
 
You can see that between 12:35:22.3057 and 14:14:52.8526 there are no events received. Actually at 14:14:52.8526  the agent cliked on not ready after wondering why he was not getting calls. I am not sure what is happening here. Any tips on trouble shooting this issue is much appreciated.
 
3/30/2011 12:35:22.3057 CTIObject.OnEvent: Received Event: eOnNewSkillGroupStatisticsEvent
 Arguments: (InvokeID:does not exist PeripheralID:5000 SkillGroupNumber:3590 SkillGroupID:17119 UniqueObjectID:skillgroup.5000.3590 MessageID:eOnNewSkillGroupStatisticsEvent StatisticsHandledCallsToday:7 HandledCallsTalkTimeToday:534 AgentsLoggedOn:2 AgentsNotReady:0 AgentsReady:2 AgentsTalkingIn:0 AgentsTalkingOut:0 AgentsTalkingOther:0 AgentsWorkNotReady:0 AgentsWorkReady:0 AgentsBusyOther:0 AgentsReserved:0 AgentsHold:0 RouterCallsQNow:0 LongestRouterCallQNow:0) TimerInterval:10)
03/30/2011 14:14:52.8526
CTIObject.SetAgentState: Calling SetAgentState()
 Arguments: (AgentState:eNotReady)
03/30/2011 14:14:52.8526 [agent.5000.61829].SetAgentState( eNotReady )
03/30/2011 14:14:52.8526 [agent.5000.61829].SetAgentState: (AgentState:eNotReady)
03/30/2011 14:14:52.8526 CtiOsSession(12).MakeRequest(eSetAgentStateRequest)
03/30/2011 14:14:52.8526 CtiOsSession(12).MakeRequest, (AgentState:eNotReady UniqueObjectID:agent.5000.61829 ClassIdentifier:1)

I recenlty upgraded my custom CTIOS from 7.2.4 to 7.2.7. We used .net CIL and VS .net  2003.
However after upgrade we are seeing an issue where in after some time there will be no events received from the CTIOS server to the client and as a result no calls come in and CTIOS is all grayed out. The only option is to "X" out of the application and log back in.
 
I have attached the log file snippet below
 
You can see that between 12:35:22.3057 and 14:14:52.8526 there are no events received. Actually at 14:14:52.8526  the agent cliked on not ready after wondering why he was not getting calls. I am not sure what is happening here. Any tips on trouble shooting this issue is much appreciated.
 
3/30/2011 12:35:22.3057 CTIObject.OnEvent: Received Event: eOnNewSkillGroupStatisticsEvent
 Arguments: (InvokeID:does not exist PeripheralID:5000 SkillGroupNumber:3590 SkillGroupID:17119 UniqueObjectID:skillgroup.5000.3590 MessageID:eOnNewSkillGroupStatisticsEvent StatisticsHandledCallsToday:7 HandledCallsTalkTimeToday:534 AgentsLoggedOn:2 AgentsNotReady:0 AgentsReady:2 AgentsTalkingIn:0 AgentsTalkingOut:0 AgentsTalkingOther:0 AgentsWorkNotReady:0 AgentsWorkReady:0 AgentsBusyOther:0 AgentsReserved:0 AgentsHold:0 RouterCallsQNow:0 LongestRouterCallQNow:0) TimerInterval:10)
03/30/2011 14:14:52.8526
CTIObject.SetAgentState: Calling SetAgentState()
 Arguments: (AgentState:eNotReady)
03/30/2011 14:14:52.8526 [agent.5000.61829].SetAgentState( eNotReady )
03/30/2011 14:14:52.8526 [agent.5000.61829].SetAgentState: (AgentState:eNotReady)
03/30/2011 14:14:52.8526 CtiOsSession(12).MakeRequest(eSetAgentStateRequest)
03/30/2011 14:14:52.8526 CtiOsSession(12).MakeRequest, (AgentState:eNotReady UniqueObjectID:agent.5000.61829 ClassIdentifier:1)

 
We had a simliar problem but only some of the message stream would be lost. Ours turned out to be a fault in the core switch that caused the IPCC to lose communication with the remote site and our CtiOs primary server was at the remote site. According to Cisco the CtiOs servers do not actually support real redunancy and when we lose communication IPCC would get gummed up. When communications came back on line (short failures) the servers were out of sync and you had to reestablish communications with the no back up CtiOs server. Sometimes it also resulted in all the agents getting kicked out and having to log back in. I had a monitor mode app that exhibited the same behavior as you are describing so I would perodically "refresh" my connection on a timer. That seemed to be the only way to keep the connection working.

Thanks for looking into this.CTIOS clinets running on older versions are just fine, the problem is just with the upgraded version of CTIOS. So I think the problem I am having is not because of any network connectivity.,

I wonder how I can debug this kind of scenario. This happens once in a while to my pilot agents.

Thanks for looking into this.CTIOS clinets running on older versions are just fine, the problem is just with the upgraded version of CTIOS. So I think the problem I am having is not because of any network connectivity.,

I wonder how I can debug this kind of scenario. This happens once in a while to my pilot agents.

 
You could turn up the level of tracing on a few of the misbehaving clients. You should at least get when the last message came in and what method was called last. That should at least get you to the right place to look in the code. Also are you monitoring your heart beats? Do you stop getting those too? You could try refreshing your connection when you haven't gotten any messages for an extended time. I would also open a TAC case to get some help from Cisco. Its a starting point at least

Also are you recompiling your app with 7.2.7 Cil dlls? Or are you just running your compiled apps? You could try compiling with 2.0, 3.5sp1 or 4. You just have to set the Form.CheckForIllegalCrossThreadCalls = false in in the forms. I know it sound scary but I have clients who have done it with hundreds of agents and hundreds of thousands of calls without compliant. Yes you should fix it so you don't have to do that but it takes some time. I will at least give you a better test bed if you do it with a few agents. You could also try compiling your app with the older dlls. Just remove the reference to the new ones in your project and then add a reference to the old files that are in your Program Files folder instead of the GAC. See if the problem goes away.

Hi Shannon,

I had to compile the my project with 7.2.7 dlls. I did try just replacing the old DLLs with the new ones but without compiling it just doesnt seem to work. I use VS2003 for build as it is the only recommended version to be used with anything below CTIOS 7.5. Are you saying that I can use VS2005 and if I set Form.CheckForIllegalCrossThreadCalls = false it should just work without any issues ?Also what is the test bed you mentioned?


I also didnt quite understand "Just remove the reference to the new ones in your project and then add a reference to the old files that are in your Program Files folder instead of the GAC. See if the problem goes away"

My Dlls are refrerenced from the same location as my CTIOSCsharp project file

You could turn up the level of tracing on a few of the misbehaving clients. You should at least get when the last message came in and what method was called last. That should at least get you to the right place to look in the code. Also are you monitoring your heart beats? Do you stop getting those too? You could try refreshing your connection when you haven't gotten any messages for an extended time. I would also open a TAC case to get some help from Cisco. Its a starting point at least



I some how missed this message of you. Yes as you suggested i did turn up the tracing and this is what I got, We have disabled the chat button from the GUI I am not sure how this chatform is responding to the event. However The same chatform.onevent was recieved several times in the log but the connection closed only once . I am not able to recreate this issue with out of box so i think TAC will not help me here
4/06/2011 11:51:33.5317 GridHelper.ArgsToRow: row[15] set to 0
04/06/2011 11:51:33.5317 GridHelper.FmtArg: Returning 40 for HandledCallsToday
04/06/2011 11:51:33.5317 GridHelper.ArgsToRow: Found 40 for HandledCallsToday
04/06/2011 11:51:33.5317 GridHelper.ArgsToRow: row[16] set to 40
04/06/2011 11:51:33.5317 GridHelper.FmtArg: Returning 05:00:12 for HandledCallsTalkTimeToday
04/06/2011 11:51:33.5317 GridHelper.ArgsToRow: Found 05:00:12 for HandledCallsTalkTimeToday
04/06/2011 11:51:33.5317 GridHelper.ArgsToRow: row[17] set to 05:00:12
04/06/2011 11:51:33.5317 CtiOsGrid.doUpdateRow: Grid has 1 rows after update
04/06/2011 11:51:33.5317 StatsForm.CheckSGs: SG Info: ID: skillgroup.5010.30246 TO: 300000000 prevUpd: 634376874935317266
04/06/2011 11:51:33.5317 ChatForm.OnEvent: Processing event 536871027
04/06/2011 12:34:37.3940 CTIObject.SetAgentState: Calling SetAgentState()
 Arguments: (AgentState:eNotReady)
04/06/2011 12:34:37.4096 [agent.5010.11111].SetAgentState( eNotReady )
04/06/2011 12:34:37.4096 [agent.5010.11111].SetAgentState: (AgentState:eNotReady)

Hi Shannon,

I had to compile the my project with 7.2.7 dlls. I did try just replacing the old DLLs with the new ones but without compiling it just doesnt seem to work. I use VS2003 for build as it is the only recommended version to be used with anything below CTIOS 7.5. Are you saying that I can use VS2005 and if I set Form.CheckForIllegalCrossThreadCalls = false it should just work without any issues ?Also what is the test bed you mentioned?


I also didnt quite understand "Just remove the reference to the new ones in your project and then add a reference to the old files that are in your Program Files folder instead of the GAC. See if the problem goes away"

My Dlls are refrerenced from the same location as my CTIOSCsharp project file

 
In your VS project look under the References branch you should see NetCil and NetUtil those are both references to the Cisco .NET Cil. By default they are using the dlls in the Global Assembly Cache which are the newest DLLs. Remove those 2 references and then right click on the References itself and choose Add Reference. Then choose Browse and navigate to the Program Files folder for the Cisco Desktop install go in to the CtiOs Toolkit and keep going down until you find the .NET Cil files. Since you upgraded you will have a sub folder that has the old DLLs in it marked with the upgrade number. Its a little confusing because the ones in the top folder are the new ones and the ones in the 7.2.7 folder are the old ones. Just select whatever ones you want and that is the version you will compile with. Unless I am using the ActiveX controls or silent monitoring I don't even install the toolkit I just use the dlls for whatever version I want copied from previous installs. You don't need to install the toolkit the Cils are just wrappers around a bunch of GED TCP/IP calls.
 
As for the version thing. Yes Cisco has to officially support the product and sinse prior to 7.5 the .NET Cil was compiled with .NET 1.1 they only "reccommend/support" using VS2003/.NET 1.1.  1.1 was the only version that had "possible" breaking changes but those are in know areas of .NET specific to things not commonly used. I have used .NET 2.0, 3.5SP1 and am now using 4.0 with no problems with any of the CIL versions. I have hundreds of client instances taking hundreds of thousands of calls without a single support call regarding incompatibility. One of the principle changes from 1.1 to 2.0 in .NET was to enforce the rule that you can only access the UI from the UI thread. This was also the case for 1.1 but it was not strictly enforced it was just "reccomended" This means if an async even comes in on another thread (such as a CIL event ) that you have to switch threads to the UI thread before accessing a UI component like a text box or grid. This is very well documented by Microsoft and how to code it. You can google it very easliy. If you don't change threads .NET WinForms 2.0 throws an exception. You can turn that exception off by using CheckForIllegalCrossThreadCall = false. I did it as a test and had a customer deploy it as a beta test and it worked with no ill effects so we certified it and use it in production. This was only while we rewrote the code to do it properly to give us some slack time but I have other customers who just blew it off and just use it that way with no problems. It is not a Cisco issue but a Microsoft one so don't bother Cisco wiith it. This is bread and butter WinForms stuff. You can use a WorkerThread componenet or just recode how you react to events its your call but easy to deal with. .NET was created to run side by side DLLs for reverse compatibiliy without "DLL Hell" so you can run any version of .NET with the old 1.1 dlls as long as you are not using known breaking changes. From 2.0 on it is supposed to be 100% reverse compatible so even though 7.5 uses VS 2005 you still can use VS2008 or VS2010. FYI the sample code from 7.5 still requires the CheckForIllegalCrossThreadCalls fix because it is not much different from 7.2. Hope this helps 
 
Shannon

Thanks for the detailed explanation Shanon. Really appreciate your help here. Took some time to procure VS2010 . Do I need to set this property of illegalcrossthread in each of the form I deal with ? Also can you share the test bed ?

David Lender (467)
Shannon McCoy (91)
Arthur Shats (57)
Christopher Nagel (47)
GEOFFREY THOMPSON (38)