Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Created by: Piotr Zielinski on 18-05-2011 09:59:39 AM Hi all! I have an issue with CTIOS Toolkit 7.5. Once a day, in random conditions, two agents log in. The first agent logs in correctly and his statistics are correctly shown in supervisor application. The second agent logs in, can make/answer calls, change his state and so on, but supervisor sees him as logged out. I checked server logs and discovered this part:
09:01:47:941 CTIOS1-ctios Trace: ,--> RCV CLIENT[00110]: []:REQ: eIdentifyClientRequest( .2800dotNET_Sess(31914638)_EvtThd(4) ) 09:01:47:941 CTIOS1-ctios Trace: ClientMgr[1]::AddToClientIDMap[1776], Found Duplicate Client ID: .2800dotNET_Sess(31914638)_EvtThd(4), PreviousClient[96, 0x454ef80], NewClient[110, 0x45b69e8] 09:01:47:941 CTIOS1-ctios Trace: ClientMgr[1]::AddToClientIDMap[ThreadId:1776], Client objects in the map were NOT the same object, ClientID[.2800dotNET_Sess(31914638)_EvtThd(4)], PreviousClient[96, 0x0454EF80], NewClient[110, 0x045B69E8]. 09:01:47:941 CTIOS1-ctios Trace: XXX RCV CLIENT[.2800dotNET_Sess(31914638)_EvtThd(4)]: eOnConnectionClosed 09:01:47:941 CTIOS1-ctios Trace: ClientMgr[1]:nConnectionClosed, Client[0x0454EF80][.2800dotNET_Sess(31914638)_EvtThd(4)] 09:01:47:941 CTIOS1-ctios Trace: <-- SND CLIENT[.2800dotNET_Sess(31914638)_EvtThd(4)]: []:EVT: eIdentifyClientConf, EnablementMask(0x0) 09:01:47:941 CTIOS1-ctios Trace: Client[.2800dotNET_Sess(31914638)_EvtThd(4)]::HandleReadHeaderComplete, READ 0 BYTES: Requested(2), Closing Connection 09:01:47:941 CTIOS1-ctios Trace: XXX RCV CLIENT[.2800dotNET_Sess(31914638)_EvtThd(4)]: eOnConnectionClosed 09:01:47:941 CTIOS1-ctios Trace: ClientMgr[1]:nConnectionClosed, Client[0x045B69E8][.2800dotNET_Sess(31914638)_EvtThd(4)] In visual studio, when debugging the toolkit, I discovered threads running and ending with names similar to this one: dotNET_Sess(31914638)_EvtThd(4) When I pass wrong host A and host B address or take the ethernet cable out while running the application, this thread is not running. For me, it looks like two agents try to log in with the same session identifier, but I'm not sure. I must say, that I have no idea of what is hapening or how to fix this issue, so all tips are welcome. Thanks in advance, Piotrek
Subject: RE: A problem with CTIOS Toolkit Replied by: Jean-Marc Lacoste on 26-11-2011 10:18:56 AM Hello,
We are facing the same issue. We have developped two years ago a third party server application for CTIOS that provides an IP Phone XML interface to manage multiple agents, based on Net CIL 7.0.2. The application handles multiple agents. This application has run on production for two years on CTIOS 7.1.5.
However, on CTIOS 7.5 with the previous CIL client or after recompiling with CIL 7.5.9 client, we have found that when login another agent from the application the first one does not receive event but can still control by sending commands.
CTIOS Server is mixing the two CTIOS connections. The CtiOsSession is different but the ClientID is the same, it is actually the Windows Process ID
First CTIOS connection CTIOS Client : 17:59:28.2942 CtiOsSession(11203942).MakeRequest, (ClientPasswordnull) CILClientID:.1504)
How could we force the server to consider the second CTIOS Connection as a new one ? Is it fixed on more recent CTIOS version ?
jmlacoste
Subject: RE: A problem with CTIOS Toolkit Replied by: Jean-Marc Lacoste on 04-12-2011 02:39:07 AM We have found the solution for this issue.
The clientID that identifies the CTIOS connection is built on the machine name, the process ID and the thread name. The issue is that the thread name is not initialized by default, so we have to do it in the code. We have overrided the connect() method to set the thread name to a unique value before calling the CTIOS connect method and it works.
Our understanding is that, before CTIOS 7.5, CTIOS server was not checking that the clientID was unique.
Best regards,
jmlacoste & dostvald
Subject: RE: A problem with CTIOS Toolkit Replied by: AARNE KYLAKALLIO on 09-10-2012 05:58:15 AM We are hitting this same problem. Is there a way to verify from ctios server logs that the threadname is set correctly, since othervise it is hard to see if this is fixed. Also, would you like to share the new connect method.
Subject: RE: New Message from AARNE KYLAKALLIO in Computer Telephony Integration Obj Replied by: David Lender on 09-10-2012 09:40:12 AM A previous customer used this workaround:
Here is an example of code:
public class CtiOsSessionWithAgentID : CtiOsSession { private string _agentID;
public CtiOsSessionWithAgentID(string pAgentID) { _agentID = pAgentID; }
new public CilError SetAgent(Agent NewAgent) { Thread.CurrentThread.Name = pAgentID; return base.SetAgent(NewAgent); } }
We just replaced SetAgent function of CtiOsSession in order to set the thread name.
Subject: RE: A problem with CTIOS Toolkit Replied by: AARNE KYLAKALLIO on 10-10-2012 05:49:35 AM Big Thanks for the code sample. I had to modify it a bit (code below), since the thread name was already set where I called Set_Agent for the first time. I found out that the latest point where current.thread.name was not set in my code was just before connect method. Also I had to create a new property, AgentPeripheralNumber, that I can set later in the code where I know what it is. Is there any (easy) way to see if this fixes the issue other than installing the new client to 600 workstations. <font size="2"> </font> public class CtiOsSessionWithAgentID : CtiOsSession
{ <font size="2"> </font> private string _agentID;<font size="2"> </font> public string sAgentPeripheralNumber { <font size="2"> </font> get { <font size="2"> </font> return _agentID; } <font size="2"> </font> set { <font size="2"> _agentID = </font> value; } } <font size="2"> </font> public CtiOsSessionWithAgentID(string pAgentID) { _agentID = pAgentID; } <font size="2"> </font> new public CilError SetAgent(Agent NewAgent) { <font size="2"> </font> // could not set thread name here, since it was alraedy set <font size="2"> </font> return base.SetAgent(NewAgent); } <font size="2"> </font> new public CilError Connect(Arguments rArgs) { <font size="2"> </font> if (Thread.CurrentThread.Name != null) { <font size="2"> </font> // cant't set the thread name since it is set already
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: