« Back to CTIOS Toolkit Questions

Structure of LastError & substructure (IDispatch)

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hello,

If I due a dump on the event change OnSetAgentModeEvent Event details: Arguments contains 77 Args

…….
LastErroremoticon:1)

…….
SavedLoginInfoemoticon)

…….
StatusSystememoticonStatusCTIServer:1 StatusCtiServerDriver:1 StatusCentralController:1 StatusPeripheralsemoticon5000:1 5001:1 5003:0 5015:0))

…….

we have on the LastError a substructure (IDispatch) who contains N elements. Wihle the “(….)” describes a collection of elements.

But when you look on the collection of LastError, you will see one element with value ‘’ = empty/blank and the value = 1.

My question is now how theLastError structure is build by design…or pointer to related documentation

Thank you

Hp

This is a CTIOS Cil question not a CTI Server protocol question.

Further information on this can be found in the CTIOS Developer's Guide.
Last error is an Integer per the Session properties in table 8-1.

if you require further assistance you will need open a Service Request for Developer Serivices and provide detailed logs and code snippets.

Hi Again,

Further information on this can be found in the CTIOS Developer's Guide.
Last error is an Integer per the Session properties in table 8-1.

OK, here it is documentet as an integer!

Using your Exercice3.exe at the event:

You can Login now!

Requesting SetAgent

OnSetAgentMode Event received
Arguments contains 73 Args
............................................

InternalCallsRcvdTimeToday:0
InternalCallsRcvdSession:0
ClientAgentTemporaryID:agent.1214304569
ClassIdentifier:1
IsSupervisor:0
LastErroremoticon:1) <<<<<<<<<<< NOT INTEGER!
...........................................

the last error comes as LastErroremoticon:1) as an OLE IDispatch in other words as
an Array type. Also the first member has no Key name only the first element of
the array is an Integer with value "1".

If it is only an Integer LasterError would like this LastError:1 what is different to the
real OnSetAgentMode event.

I hope the difference is now clear enough ?

Hp

Edited by: Hanspeter Widmer on Jun 24, 2008 7:02 AM

LastError is an arguments array with key ""

To obtain the value

private void m_session_OnSetAgentModeEvent(Cisco.CTIOSCLIENTLib.Arguments pIArguments) {
LogEvent("OnSetAgentModeEvent", pIArguments);
// Pack up the arguments and perform an agent login
Cisco.CTIOSCLIENTLib.Arguments m_Args = new Cisco.CTIOSCLIENTLib.Arguments();
int nRetVal;
Cisco.CTIOSCLIENTLib.Arguments m_LEArgs = new Cisco.CTIOSCLIENTLib.Arguments();
Cisco.CTIOSARGUMENTSLib.Arg m_LEArg = new Cisco.CTIOSARGUMENTSLib.Arg();
string s;
int i;
s = pIArguments.GetValueString("AgentID");
m_LEArg = pIArguments.GetValue("LastError");
i = m_LEArg.GetType;
if ((i == Cisco.CTIOSARGUMENTSLib.enumArgTypes.ARG_ARGARRAY)) {
m_LEArgs = m_LEArg.GetValueArray;
}
i = m_LEArgs.GetValueInt("");
Log(("Last Error is " + i.ToString));
m_Args.AddItem("Agentid", agentid.Text);
m_Args.AddItem("AgentPassword", agentpw.Text);
m_Args.AddItem("AgentInstrument", instrument.Text);
m_Args.AddItem("PeripheralID", peripheralid.Text);
// send login request
nRetVal = m_Agent.Login(m_Args);
Log(("Login returns("
+ (Str(nRetVal) + ")")));
m_Args = null;
m_LEArgs = null;
}

Generates:

OnSetAgentModeEvent Event received
Arguments contains 80 Args
PeripheralID:5000
PeripheralType:0
AgentState:eUnknown
AvailTimeToday:0
LoggedOnTimeToday:0
NotReadyTimeToday:0
AgentOutCallsToday:0
AgentOutCallsTalkTimeToday:0
AgentOutCallsTimeToday:0
AgentOutCallsHeldToday:0
AgentOutCallsHeldTimeToday:0
HandledCallsToday:0
HandledCallsTalkTimeToday:0
HandledCallsTimeToday:0
IncomingCallsHeldToday:0
IncomingCallsHeldTimeToday:0
InternalCallsHeldToday:0
InternalCallsHeldTimeToday:0
AvailTimeSession:0
LoggedOnTimeSession:0
NotReadyTimeSession:0
AgentOutCallsSession:0
AgentOutCallsTalkTimeSession:0
AgentOutCallsTimeSession:0
AgentOutCallsHeldSession:0
AgentOutCallsHeldTimeSession:0
HandledCallsSession:0
HandledCallsTalkTimeSession:0
HandledCallsTimeSession:0
IncomingCallsHeldSession:0
IncomingCallsHeldTimeSession:0
InternalCallsSession:0
InternalCallsTimeSession:0
InternalCallsRcvdTimeSession:0
InternalCallsHeldSession:0
InternalCallsHeldTimeSession:0
InternalCallsToday:0
InternalCallsTimeToday:0
HandledCallsAfterCallTimeSession:0
HandledCallsAfterCallTimeToday:0
MRDID:0
ICMAgentID:0
AgentMode:2
MaxTaskLimit:0
NumTasks:0
AgentExtensionemoticonnull)
AgentID:5000
AgentInstrumentemoticonnull)
SkillGroupsemoticon)
UniqueObjectID:agent.5000.5000
MessageID:eSetAgentModeEvent
InternalCallsRcvdToday:0
InternalCallsRcvdTimeToday:0
InternalCallsRcvdSession:0
ClientAgentTemporaryID:agent.1214318916
ClassIdentifier:1
IsSupervisor:0
LastErroremoticon:1)
ConnectionMode:1
Filter:filtertarget = agent.5000.5000
CILConnectionID:12
AutoLogin:0
SavedAgentState:9
WaitingforRecovery:0
SavedLoginInfoemoticon)
StatusSystememoticonStatusCTIServer:1 StatusCtiServerDriver:1 StatusCentralController:1 StatusPeripheralsemoticon5000:1))
CurrentProfile:Main Contact Center
LoginTime:0
IsAgentTeamMember:0
AgentAvailabilityStatus:-1
ICMAvailableTimeSession:0
RoutableTimeToday:0
ICMAvailableTimeToday:0
RoutableTimeSession:0
OriginatingClientID:dlender-wxp-97684-98196
LoginNameemoticonnull)
BlockAllEvents:1
AgentCallMode:0
SilentMonitorTargetAgentUIDemoticonnull)
SilentMonitorCallUIDemoticonnull)

Last Error is 1

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