06-22-2017 02:16 AM - last edited on 03-05-2021 09:45 AM by dekwan
Hello,
I'm pretty new on CTI OS development, and i stacked on a problem.
I try to create a monitor program where i can show some statistics about the agent.
So i need a session and an agent object, i tried it, session is connected successfully but the agent did not. I followed the documentation and sample codes, but i do not know what is the next step.
I tried to add it to ConnectToCTIOS (based on All Calls Sample .NET sample application)
…
m_Agent = new Agent();
CilError returnCode;
/* 6. Log in the agent.*/
Arguments rArgs = new Arguments();
statusConnect = m_ctiSession.Connect(args); //it gives back CIL_OK
returnCode = m_ctiSession.SetAgent(m_Agent); //it gives back CIL_OK
returnCode = m_Agent.Login(rArgs); //it gives back E_CTIOS_INVALID_SESSION
…
If I tried to add agent to the session before m_ctiSession.Connect(args) statement, it gave back CIL_FAIL for setAgent and E_CTIOS_INVALID_SESSION for Login.
If I deleted the agent login from ConnectToCTIOS and added it on ProcessOnConnection event handler I got E_CTIOS_SET_AGENT_SESSION_DISCONNECT_REQUIRED error for SetAgent and E_CTIOS_INVALID_SESSION for Login. The code looks like in this case:
... after all of the statement in the method
m_Agent = new Agent();
CilError returnCode;
/* 6. Log in the agent.*/
Arguments rArgs = new Arguments();
returnCode = m_ctiSession.SetAgent(m_Agent);
returnCode = m_Agent.Login(rArgs);
…
The example was “Set up agent application to receive agent statistics” phrase at page 80-81.
Documentation is here: https://developer.cisco.com/fileMedia/6f295204-f4a4-49c9-9250-a4992756af2d/ucce_b_cti-os-developer-guide.pdf
Thanks for help.
Bests,
Norbert
07-04-2017 06:36 AM
Hi
The basic steps to login an Agent is given below
rSession.AddEventListener(this, CtiOs_Enums.SubscriberList.eAllInOneList);
/* 1. Create Arguments object.*/
Arguments rArgs = new Arguments();
/* 2. Set Connection values.*/
rArgs.SetValue(CTIOS_enums.CTIOS_CTIOSA, "CTIOSServerA");
rArgs.SetValue(CTIOS_enums.CTIOS_PORTA, 42408);
rArgs.SetValue(CTIOS_enums.CTIOS_CTIOSB, "CTIOSServerB");
rArgs.SetValue(CTIOS_enums.CTIOS_PORTB, 42408);
rArgs.SetValue(CTIOS_enums.CTIOS_HEARTBEAT, 100);
int returnCode = rSession.Connect(rArgs);
/* 1. Create and agent and set the required properties. */
Agent agent = new Agent();
agent.SetValue(CtiOs_IKeywordIDs.CTIOS_AGENTID, "275");
agent.SetValue(CtiOs_IKeywordIDs.CTIOS_PERIPHERALID, "5002");
/* 2. Set the session's agent */
int returnValue = session.SetAgent(agent);
/* 1. Create Arguments object*/
}
Arguments rArgs = new Arguments();
/* 2. Set log in values.*/
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_AGENTID, “275”);
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_PERIPHERALID, “5002”);
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_AGENTINSTRUMENT, “5002”)
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_AGENTPASSWORD, “********”);
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_AUTOLOGIN, “1”);
/* 3. Log in the agent.*/
int returnValue = agent.Login(rArgs);
We need CTIOS server and client logs with trace fff
You can use diagnostic portico to set the trace level 3
you can open command prompt and type
"cdlog <instance name> CTIOS1" hit enter
then type "dumplog ctios /last /o"
then type "citios.txt"
CIL logs you can find in the path %HOMEPATH%. Go to Run in your CTIOS client machine and type %HOMEPATH%
all CTIOSClient logs will be available.
You should also try to login with sample desktop to make sure CTIOS is working fine.
Thanks,
Shikhar
07-05-2017 05:23 AM
Thanks, i could solve it without Agent, I used monitor mode, it was enough for me.
By the way, do you have idea how can I get wrap-up time? I can get wrap-up data, but it is only a string (at eCallDataUpdateEvent ).
07-07-2017 12:25 AM
Hi
You need to setup wrap-up time in Agent Desksetting tool in configuration manager in AW. And assign the desksetting to Agent in Agent explorer tool.
Thanks,
Shikhar
07-07-2017 12:29 AM
It has been already configured, but in my custom application i don't know which event i can get. I mean i can get the string value, but not the time value.
07-07-2017 12:50 AM
HI
Only wrap-up string will be sent. Wrap-up time is internal to server. When agent is done with the call then agent goes to wrap up mode. Wrap up time is a time out entity which will be handled internally by PIM.
07-07-2017 01:18 AM
Hello,
Just for sure, i understand it correctly. It will be an internal value on the server and i do not have chance to get it in my custom application, am i right?
Because i would like to show to the agent, how much time he/she has before the available state, and it is impossible as i understand your comment.
Thanks for the help.
Bests,
Norbert
07-07-2017 01:30 AM
Yes you are right. CTIOS is not sending the wrap-time data as this is a configuration data not an agent state event.
Thanks,
Shikhar
07-07-2017 04:43 AM
But you can get Agent Desk Settings via CTI Server protocol which will contain the configuration for wrap time.
Once the agent starts wrap, you could do a count down clock on how much time they have left in wrap state.
07-07-2017 04:47 AM
Do you have a sample code for it?
07-07-2017 04:58 AM
Sorry. I do not.
The idea is that when you see an agent logs in, you can query for its agent desk settings.
07-07-2017 05:03 AM
Thanks, i will try it. I haven't queried anything yet, i was in monitor mode and all of the relevant agent data was there.
07-10-2017 03:42 AM
I tried it, it was not in the desktop settings parameter, thanks for the idea.
07-11-2017 02:52 AM - last edited on 03-05-2021 09:46 AM by dekwan
Hi
David was referring to CTI protocol guide
You are using CTIOS developer guide which is used to develop CTIOS custom clients
But you can create sessions with CTI server directly using CTI Server reference guide and check for config data.
But if you are looking for configuration data from CTIOS events then we are not sending wrap up time in CTIOS events.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide