" /> Failed to registering a DN and logging an agent - Genesys CTI User Forum

Author Topic: Failed to registering a DN and logging an agent  (Read 3077 times)

Offline Alyw

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
Failed to registering a DN and logging an agent
« on: June 30, 2015, 01:37:01 AM »
Advertisement
I'm facing a problem when try to registering an DN and logging in an agent in my agent desktop (still in developing). Here's what I've got from my debugging:

'EventRegistered' ('53')
message attributes:
AttributeThisDN [str] = "6145"
AttributeReasons [bstr] = KVList:
'ReasonCode' [int] = 2
AttributeExtensions [bstr] = KVList:
'AgentStatus' [int] = 4
'AgentStatusTimestamp' [int] = 1435626052
'AgentStatusReliability' [int] = 0
'AgentLoginTimestamp' [int] = 1435626052
'AgentLoginReliability' [int] = 0
'AgentSessionID' [str] = "NEMK2P1R2P40DBSGH4T7K87AEK0001C6"
'AgentWorkMode' [int] = 3
'mwl' [int] = 0
'fwd' [str] = "off"
'status' [int] = 0
AttributeEventSequenceNumber [long] = 4615
[color=red]AttributeAgentID [str] = "1826"[/color]
AttributeReferenceID [int] = 1
Time            = ComplexClass(TimeStamp):
AttributeTimeinuSecs [int] = 479000
AttributeTimeinSecs [int] = 1435627601
AttributeCustomerID [str] = "Resources"
AttributeAddressType [int] = 2 [Position]

Event registered

'EventError' ('52')
message attributes:
AttributeEventSequenceNumber [long] = 4616
AttributeCustomerID [str] = "Resources"
Time            = ComplexClass(TimeStamp):
AttributeTimeinuSecs [int] = 548000
AttributeTimeinSecs [int] = 1435627601
AttributeErrorCode [int] = 620
AttributeThisDN [str] = "6145"
AttributeReferenceID [int] = 2

EventError

Problem 1:
The attribute agent ID for Agent2 is 1826, but when I change to Agent1, it's still 1826 (The result above are generated by using Agent1).

Problem 2:
I'm not sure the DN is registered successfully, but based on the result I got I assumed it is. When come to logging an agent, it failed. Any solution on the problem?  :'(

Here's my code and I'm not sure what goes wrong:

          #region Registering a DN

            RequestRegisterAddress requestRegisterAddress = RequestRegisterAddress.Create(thisDN, RegisterMode.ModeShare,
                ControlMode.RegisterDefault, AddressType.DN);

            IMessage reqRegAddressResponse = tServerProtocol.Request(requestRegisterAddress);
            Console.WriteLine(reqRegAddressResponse.ToString());

            switch (reqRegAddressResponse.Id)
            {
                case EventRegistered.MessageId: Console.WriteLine("Event registered\n"); break;
                case EventUnregistered.MessageId: Console.WriteLine("Event unregistered\n"); break;
            }

            #endregion

            #region Logging in an Agent

            RequestAgentLogin requestAgentLogin = RequestAgentLogin.Create(thisDN, AgentWorkMode.AfterCallWork);
            requestAgentLogin.AgentID = GlobalVariables.spalLoginID;
            IMessage reqAgentLoginResponse = tServerProtocol.Request(requestAgentLogin);
            Console.WriteLine(reqAgentLoginResponse.ToString());

            switch (reqAgentLoginResponse.Id)
            {
                case EventACK.MessageId: Console.WriteLine("EventACK, Endpoint={0}", reqAgentLoginResponse.Endpoint); break;
                case Genesyslab.Platform.Voice.Protocols.TServer.Events.EventError.MessageId: Console.WriteLine("EventError"); break;
            }

Or is it because of the endpoint connection?

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: Failed to registering a DN and logging an agent
« Reply #1 on: June 30, 2015, 11:59:29 AM »
Did you check if the requested DN is free (i.e. nobody is using this DN at this moment)? It seems like another agent was logged into that DN.
« Last Edit: June 30, 2015, 12:15:09 PM by Kubig »

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Failed to registering a DN and logging an agent
« Reply #2 on: June 30, 2015, 12:13:29 PM »
Post Tserver logs as well or analyze them.

Enviado de meu C6602 usando Tapatalk


Offline Alyw

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
Re: Failed to registering a DN and logging an agent
« Reply #3 on: July 01, 2015, 03:21:09 AM »
So based on what I've got above, if I change my login info to:
Agent Name = Agent1
Agent ID = 1234 (let say)
DN = 6145 (same as above)

For the registering dn part, it tells that agent ID 1826 is using DN 6145. For the registering agent part, it tells that agent ID 1234 can't be registered to DN 6145 because the DN is currently used by agent ID 1826.

Am I right?