This document was generated from CDN thread Created by: Fabien LECLER on 08-11-2013 05:30:46 AM Hello,We developped a VB.Net CTI bar with CTIOS 8.5Sometimes, the agent log in and log out in loop.In the log I can see the following message :MsgWaitForMultipleObjectsEx returned 102 while waiting for mutex
But I don't understand what it meansI have put an a log extract in attachment.Would someone explain to me what could be the problem ?Thank you for your help.Subject: RE: New Message from Fabien LECLER in Computer Telephony Integration Object Replied by: David Lender on 08-11-2013 08:36:44 AMTry setting the agent mode for the session and do not login the agent until you see the onSetAgentModeEvent.See the ctiosphone sample in the Win32 samples directory of the CTIOS Toolkit.Subject: RE: New Message from Fabien LECLER in Computer Telephony Integration Object Replied by: Fabien LECLER on 13-11-2013 02:48:06 AMHi David,Thank you for your message.I have developped my CTI client from the sample "CTI Toolkit AgentDesktop" in the directory of the CTIOS Toolkit.When client start i get the login and password for the current user.ActiveX starts session automatically. When i see the "Session_OnConnection" event for the first time, i get the current session with the "session resolver" object:1 m_SessionResolver = New Cisco.CTIOSSESSIONRESOLVERLib.SessionResolver
2 m_Session = m_SessionResolver.GetSession("")
And I set CTI server properties (host and port) :1Dim arguments As New Arguments
2Call arguments.SetValue("CtiOsA", "CTI_HostA")
3Call arguments.SetValue("PortA", 42028)
4Call arguments.SetValue("CtiOsB", "CTI_HostB")
5Call arguments.SetValue("PortB", 42028)
6AConnect = m_Session.Connect(arguments)
When i see the "Session_OnConnection" event for the second time, I set the agent mode for the session: 1Dim retval As Boolean
2Dim m_Agent As Agent
3
4m_Agent = New Agent
5' intialize the agent object using SetValue
6m_Agent.SetValue("AgentID", m_AgentID)
7m_Agent.SetValue("AgentName", m_AgentID)
8m_Agent.SetValue("AgentPassword", m_AgentPwd)
9m_Agent.SetValue("AgentInstrument", InstrumentID)
10m_Agent.SetValue("PeripheralID", PeripheralID)
11m_Agent.SetValue("AutoLogin", "1")
12
13retval = m_Session.SetAgent(m_Agent)
Finally, when I see the "OnSetAgentModeEvent" event, I login if my Agent is in an unknown state: 1bRetVal = m_Args.SetValue("Agentid", m_AgentID)
2bRetVal = m_Args.SetValue("AgentPassword", m_AgentPwd)
3bRetVal = m_Args.SetValue("AgentInstrument", InstrumentID)
4bRetVal = m_Args.SetValue("PeripheralID", PeripheralID)
5
6Dim m_Agent As Agent
7' send login request
8m_Agent = m_Session.GetCurrentAgent()
9
10Dim iAgentState As Integer = m_Agent.GetAgentState()
11
12If (iAgentState = 9) Then
13 nRetVal = m_Agent.Login(m_Args)
14 m_Agent.EnableAgentStatistics(New Arguments())
15End If
Is it the good way ? (I think I already set agent mode for session and I wait for onSetAgentModeEvent befor login).Thanks for help !Subject: RE: New Message from Fabien LECLER in Computer Telephony Integration Object Replied by: David Lender on 13-11-2013 08:18:44 AMThe log snippet you posted earlier showed a Login *before* the setagentmode event11/06/13 08:39:57.379 5208 iexplore Thd(5356) []::Login()11/06/13 08:39:57.379 5208 iexplore Thd(5356) [] EnableSkillGroupStatistics: No ConnectionProfile Main Contact Center in session properties11/06/13 08:39:57.379 5208 iexplore Thd(5356) []::SetAgentState()11/06/13 08:39:57.379 5208 iexplore Thd(5356) []::MakeRequest( eSetAgentStateRequest )11/06/13 08:39:57.379 5208 iexplore Thd(5356) []::MakeRequest: (PrphID:5000 AGState:eLogin AGExt
null) AGID:760302 AGInstr:61886 AGPwd:zaiogc UniqObjID
null) ClntAGTempID:agent.1383721305 ClassId:1)11/06/13 08:39:57.379 5208 iexplore Thd(5356) CCtiOsSession::MakeRequest(eSetAgentStateRequest)11/06/13 08:39:57.379 5208 iexplore Thd(5356) CCtiOsSession::MakeRequest: (PrphID:5000 AGState:eLogin AGExt
null) AGID:760302 AGInstr:61886 AGPwd:zaiogc UniqObjID
null) ClntAGTempID:agent.1383721305 ClassId:1)11/06/13 08:39:57.379 5208 iexplore Thd(5356) CService(0E1B13F4)::SendMessage, Link not established, cannot send message.11/06/13 08:39:57.379 5208 iexplore Thd(5356) [] EnableSkillGroupStatistics: No ConnectionProfile Main Contact Center in session properties11/06/13 08:39:57.379 5208 iexplore Thd(5356) []::MakeRequest( eEnableAgentStatisticsRequest )11/06/13 08:39:57.379 5208 iexplore Thd(5356) []::MakeRequest: (UniqObjID
null) ClassId:1)11/06/13 08:39:57.379 5208 iexplore Thd(5356) CCtiOsSession::MakeRequest(eEnableAgentStatisticsRequest)11/06/13 08:39:57.379 5208 iexplore Thd(5356) CCtiOsSession::MakeRequest: (UniqObjID
null) ClassId:1)11/06/13 08:39:57.379 5208 iexplore Thd(5356) CService(0E1B13F4)::SendMessage, Link not established, cannot send message.11/06/13 08:39:57.379 5208 iexplore Thd(5356) []::GetAgentState()11/06/13 08:39:57.379 5208 iexplore Thd(5356) m_Agent_OnSetAgentModeEvent : m_Agent récupéré à partir de la session dans l'état 0Subject: RE: New Message from Fabien LECLER in Computer Telephony Integration Object Replied by: Fabien LECLER on 21-11-2013 03:05:08 AMHi David,Sorry it's just an extract of the log to show the context of error.It's not the begining of the loop.Fabien