« Back to CTIOS Toolkit Questions

RE: New Message from GEOFFREY THOMPSON in Computer Telephony Integration Ob

Combination View Flat View Tree View
Threads [ Previous | Next ]
David, can I just ask a question about Mobile Agents? I am using UCCE 7.5(10).

I have a monitor process (an all events bridge) that watches for agent events. I maintain a hash map. When I get a logout event I remove the agent from the map. When I get a not ready or available event I check the hash map – if the agent does not exist in the hash map, this represents a LOGIN. Otherwise, ignore.

I launch a process that is a CTIOS listener for the individual agents. (SetAgentState, Login etc.). My process works perfectly for VOIP agents.

It would be a huge improvement if the not ready/available event included the remote number and call mode for Mobile Agents.

The documentation shows that these should be there. Like this in VB.NET snippet

currentAgent = m_session.GetValue(tmp.ToString)
If Not (currentAgent Is Nothing) Then
Dim agentCallMode As Integer
agentCallMode = currentAgent.GetValueInt(CStr("AgentCallMode"))
Dim agentRemoteNumber As String
agentRemoteNumber = currentAgent.GetValueString(CStr("AgentRemoteNumber"))
End If

But neither of these two items are there. But I cannot do this for mobile agents because I do not know their remote number.

Do you know if this has been fixed in subsequent versions?

Regards,
Geoff

Mobile Agent
Answer
9/11/12 5:01 PM as a reply to GEOFFREY THOMPSON.
Rather than checking the agent object, Try checking the arguments array returned on the onAgentStateChange event.
For Remote Agent, the extension should contain the extension and remote number separated by a semicolon.

RE: Mobile Agent
Answer
10/11/12 7:30 PM as a reply to David Lender.
David Lender:
Rather than checking the agent object, Try checking the arguments array returned on the onAgentStateChange event. For Remote Agent, the extension should contain the extension and remote number separated by a semicolon.

I am not checking any agent object - this is a monitor (all events bridge) process.
I am processing inside the OnAgentStateChange event.
I am using the Cisco.CTIOSCLIENTLib.Arguments object.I was looking for the documented elements: AgentCallMode and AgentRemoteNumber These are not set.
I have PereipheralID, AgentID, AgentInstrument. Are you saying that I could fetch Extension and that would be LCP;PSTN_Number?
Regards, Geoff

Yes fetch the extension and it should have the extension and the remote number.

RE: Mobile Agent
Answer
10/11/12 8:05 PM as a reply to GEOFFREY THOMPSON.
OK, I just tested this with a mobile agent and the same agent as a VOIP agent. There is no difference - the Extension is the same as the Instrument.
I have no way of determining if the agent is a VOIP agent or a Mobile Agent. Do you have any other ideas?
Regards, Geoff

RE: Mobile Agent
Answer
10/11/12 8:08 PM as a reply to GEOFFREY THOMPSON.
GEOFFREY THOMPSON:
I was looking for the documented elements: AgentCallMode and AgentRemoteNumber These are not set.

Sorry, that was wrong. I was trying to get these off the Cisco.CTIOSCLIENTLib.Agent structure by trying to get the current agent using the UniqueObjectID in the agent state change event, and then looking for AgentCallMode and AgentRemoteNumber on that structure.
Regards,
Geoff

RE: Mobile Agent
Answer
10/11/12 8:35 PM as a reply to GEOFFREY THOMPSON.
My method of getting the current agent using the UniqueObjectID apears to work. The id is something like "agent.5018.772341". I can get valid date off this object - instrument, agent ID etc. The values agree with what comes in through the pointer to the Cisco.CTIOSCLIENTLib.Arguments.
But the AgentCallMode and AgentRemoteNumber are not set.
The document (page 9.2) is confusing - it writes these as "Agent CallMode" and "AgentRemote Number". It's hard to believe these spaces are deliberate. But I'll try.
Regards,
Geoff

RE: Mobile Agent
Answer
10/15/12 2:45 PM as a reply to GEOFFREY THOMPSON.
I suggest looking at the CTIOS Server and Client logs for AgentRemoteNumber and AgentCallMode.

Also call dumpProperties on the agent to see if any of the remote agent properties are set.

RE: Mobile Agent
Answer
10/16/12 6:20 PM as a reply to David Lender.
David Lender:
I suggest looking at the CTIOS Server and Client logs for AgentRemoteNumber and AgentCallMode.

David,
I looked at the client side trace and it shows the request to log in going towards the CTI Object Server with the remote params set.
On the Server side, trace shows the request coming up. The LCP is 77000 and the PSTN number used is 901-263-9289 (don't know why we see it prefix "81"). We see the extension and the instrument set to LACP;PSTN number.
17:51:40:905 CTIOS1-ctios Trace: [agent.5018.772341]SET_AGENT_STATE_REQ ( eLogin )(PrphID:5018 AGState:eLogin NumSGs:0 EvtRsnCode:50004 AGWorkMode:4 AGExt:77000;819012639289 AGID:772341 AGInstr:77000;819012639289 AGPwd:772341 UniqObjID:agent.5018.772341 MsgID:eSetAgentStateRequest ClntAGTempID:agent.1350339647 ClassId:1 CILConnID:47 OrgClntID:CSPRC01006-5224-1708)
The CTIOS next sends out the corresponding not ready event
17:51:40:905 CTIOS1-ctios Trace: <-SND[CSPRC01006-5224-1708 a=772341][agent.5018.772341]:eAgentInfoEvent
17:51:43:983 CTIOS1-ctios Trace: >>CG:[agent.5018.772341]:eAgentStateEvent(eNotReady)(PrphID:5018 PrphTyp:17 AGState:eNotReady SG#:9381 SGID:5594 StateDur:0 SGPri:0 EvtRsnCode:0 SGState:0 SessID:0 MRDID:1 ICMAGID:5603 AGMode:0 MaxTaskLim:0 NumTasks:0 AGExt:77000 AGID:772341 AGInstr:77000 CTIClntSig:CTIOSServer MsgID:eAgentStateEvent DvrKey:agent.5018.772341 AGAvailStatus:0)
You can see that AGMode=0 and there is no encoding in the instrument or extension of LCP;PSTN. It just has the LCP.
Regards,
Geoff
 

If the mobile agent login is working correctly, but you don’t see the agent state events with the correct AgentInstrument, I fear that this information is not available after the Login.

If you open a Service Request and provide the corresponding CTIOS Client and CTIOS and CTI Server Logs showing the successful mobile agent Login but with AgentInstrument not reflecting the ext;PSTN, I will escalate the issue. Please also provide version information.

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