Author Topic: How to get the Agent Status  (Read 6164 times)

Offline mhsrinivasan

  • Newbie
  • *
  • Posts: 21
  • Karma: 1
How to get the Agent Status
« on: April 02, 2009, 02:06:40 PM »

I need to monitor the Agent Status. For that i will be registering the DN and How do i know the Agent Status after Registering?

Thanks

Offline sbc279

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Re: How to get the Agent Status
« Reply #1 on: April 03, 2009, 05:49:23 PM »
[quote author=mhsrinivasan link=topic=4051.msg17848#msg17848 date=1238681200]

I need to monitor the Agent Status. For that i will be registering the DN and How do i know the Agent Status after Registering?

Thanks
[/quote]

Hey mhsrinivasan,

The easiest way is to make a TQueryAddress call and capture the event...

Call the function: 
[b]TAgentExtension.TQueryAddress(AddressInfoDNStatus)[/b]


Then capture the event in TAgentExtension_TEvent(Index As Integer, EventInfo As DesktopToolkitX.TEventInfo)...
[b]Private Sub TAgentExtension_TEvent(Index As Integer, EventInfo As DesktopToolkitX.TEventInfo)
  Select Case EventInfo.EventType
    Case EventAddressInfo
      ' This is where you'll get the info:
      ' AddressInfoAddressStatus
      ' AdderssInfoMsgWaitingStatus
      ' AddressInfoAssociationStatus
      ' AddressInfoCallForwardingStatus
      ' AddressInfoAgentStatus  [color=red]<-------- This is what you want[/color]
      ' AddressInfoNumberOfAgentsInQueue
      ' AddressInfoNumberOfAvailableAgentsInQueue
      ' AddressInfoNumberOfCallsInQueue
      ' AddressInfoAddressType
      ' AddressInfoCallsQuery
      ' AddressInfoSendAllCallsStatus
      ' AddressInfoQueueLoginAudit
      ' AddressInfoNumberOfIdleClassifiers
      ' AddressInfoNumberOfClassifiersInUse,
      ' AddressInfoNumberOfIdleTrunks
      ' AddressInfoNumberOfTrunksInUse
      ' AddressInfoDatabaseValue
      ' AddressInfoDNStatus
      ' AddressInfoQueueStatus 
    End Select
  End Sub[/b]

Hope it helps,

Steve
« Last Edit: April 03, 2009, 05:53:04 PM by sbc279 »

Offline bcyk

  • Full Member
  • ***
  • Posts: 113
  • Karma: 6
Re: How to get the Agent Status
« Reply #2 on: April 07, 2009, 01:56:17 AM »
[u][b]At startup[/b][/u]

The "Extensions" KV-pair list of EventRegistered contains agent and DN status information.

[u]AgentStatus integer[/u]
<0 - UNKNOWN - the status of an agent is unknown
0 - LOGGED_OUT - there is no agent logged on this DN
1 - LOGGED_IN - an agent is logged in but work mode is unknown
2 - READY - the status of agent is Ready
3 - NOT_READY - the status of agent is NotReady
4 - ACW - the status of agent is AfterCallWork


[u]status integer[/u]
0 - IDLE - there is no any activity on the DN
>0 - NOT_IDLE - there is some activity on the DN (off-hook, there is at least one call on the DN)
<0 - UNKNOWN - there is no available information about the DN status

[u]conn-%d[/u] string %d is an index; the active connection(s) on the DN

Note:
Agent and DN status are shown separately; 'priority' of DN status should override agent status.
e.g., agent mode = Ready and DN status = not idle ---> agent is busy in conversation
Refer to Genesys Stat Server manual for details



[u][b]After DN registration[/b][/u]
EventReady, EventNotReady and so forth agent mode events will be delivered to the monitored DN asynchronously; thus, no status polling is required.





Offline mhsrinivasan

  • Newbie
  • *
  • Posts: 21
  • Karma: 1
Re: How to get the Agent Status
« Reply #3 on: April 17, 2009, 08:44:06 AM »
Thanks a lot. your post helped me