cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4998
Views
6
Helpful
13
Replies

Agent connect to server problem

norbert.posan
Level 1
Level 1

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();

  1. rArgs.SetValue(Enum_CtiOs.CTIOS_AGENTID, "9012");
  2. rArgs.SetValue(Enum_CtiOs.CTIOS_PERIPHERALID, "5000");
  3. rArgs.SetValue(Enum_CtiOs.CTIOS_AGENTINSTRUMENT, "8209001");
  4. rArgs.SetValue(Enum_CtiOs.CTIOS_AGENTPASSWORD, "9012");

 

 

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();

  1. rArgs.SetValue(Enum_CtiOs.CTIOS_AGENTID, "9012");
  2. rArgs.SetValue(Enum_CtiOs.CTIOS_PERIPHERALID, "5000");
  3. rArgs.SetValue(Enum_CtiOs.CTIOS_AGENTINSTRUMENT, "8209001");
  4. rArgs.SetValue(Enum_CtiOs.CTIOS_AGENTPASSWORD, "9012");

 

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

13 Replies 13

shidas
Cisco Employee
Cisco Employee

Hi

The basic steps to login an Agent is given below

  • CtiOsSession rSession = new CtiOsSession();

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

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 ).

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

norbert.posan
Level 1
Level 1

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.

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.

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

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

dreich
Cisco Employee
Cisco Employee

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.

Do you have a sample code for it?

Sorry. I do not.

The idea is that when you see an agent logs in, you can query for its agent desk settings.

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.

I tried it, it was not in the desktop settings parameter, thanks for the idea.

Hi

 

David was referring to CTI protocol guide

https://developer.cisco.com/fileMedia/f5a3cda4-c4f3-46ed-9459-2a0c2cc31e35/ucce_b_cti-server-message-reference-guide.pdf 

 

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.

Getting Started

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: