How Virtual Queue works?

What is Virtual Queue?


Virtual Queue is a logical queue where an interaction is queued if the target is not available. Virtual queues can be associated with any target type like agent, agent groups, place and place groups and commonly used for reporting purpose.

Events on virtual queues are similar to those on actual queues and URS simply uses T-Server to distribute queue events (EventQueued, EventDiverted and EventAbandoned) to the Stat Server for reporting purpose.

How it works?


When an interaction is waiting for a target, URS requests T-Server to distribute an ‘EventQueued‘ for the virtual queue. For Stat Server, this means that interaction is queued for target and will start calculating stats.

When target is available and interaction is routed to target, URS requests T-Server to distribute ‘EventDiverted‘ for the virtual queue.

If the customer hangs up while waiting for the target, URS requests T-Server to distribute ‘EventAbandoned‘ for the virtual queue.

To understand it better, I developed sample routing strategy where call is simply routed to agent ‘agent01’. Let’s see all the above scenarios from URS and T-Server log files.

From URS logs, we can see that call with ConnID ‘006c02462a161006’ is now entering strategy ‘VQDemo’ and immediately targeting agents with Skill ‘Skill1’

_I_I_006c02462a161006 [14:33] strategy: *0x65*VQDemo is attached to the call

16:56:45.741 Int 20001 interaction 006c02462a161006 is started
_I_I_006c02462a161006 [01:14] current call classification: media=voice(100), service=default(200), segment=default(300)
16:56:45.741_I_I_006c02462a161006 [09:06] >>>>>>>>>>>>start interpretator
_I_I_006c02462a161006 [09:04] ASSIGN: __Return(SCRIPT) <- STRING:
_I_I_006c02462a161006 [07:46] no error mode for this call
_I_I_006c02462a161006 [09:04] ASSIGN: __Return(SCRIPT) <- STRING:
_I_I_006c02462a161006 [09:04] ASSIGN: __DBReturn(SCRIPT) <- STRING:
_I_I_006c02462a161006 [09:04] ASSIGN: __DBStrReturn(SCRIPT) <- STRING:
_I_I_006c02462a161006 [09:04] ASSIGN: __TargetVar(SCRIPT) <- STRING:
_I_I_006c02462a161006 [07:14] expression translating: Skill1 > 1 -> Skill1 > 1
16:56:45.741_I_I_006c02462a161006 [07:07] HERE IS TARGETS
TARGETS: ?:Skill1 > 1@RoutingStatServer.GA

EventQueued message while waiting for target


URS now requests T-Server to send ‘EventQueued’ message for this virtual queue as seen below

request to 65200(TServer) message RequestDistributeEvent
AttributeCallUUID    ‘AM5D3AE9D90757BKTSVJTCIAR4000014’
AttributeTimeout    60
AttributeExtensions    [194] 00 07 00 00..
‘SIGNATURE’    ‘router’
‘NAME’    ‘URS76’
‘VERSION’    ‘Version: 7.6.200.11’
‘CLUSTER’    ‘URS76’
‘VQID’    ‘N6NKOJMDT16I93HFG6V041D9L0000001’
‘Location’    ‘AvayaSwitch’
‘CallUUID’    ‘AM5D3AE9D90757BKTSVJTCIAR4000014’
AttributeDNIS    ‘0800123456’
AttributeOtherDNRole    1
AttributeOtherDN    ‘20005’
AttributeThisDNRole    2
AttributeThisQueue    ‘VQ_Sales’
AttributeThisDN    ‘VQ_Sales’
AttributeCallType    2
AttributeCallID    16
AttributeConnID    006c02462a161006
AttributeCustomerID    ‘Resources’
AttributeReferenceID    4294967295
AttributeUserEvent    EventQueued

EventDiverted Request to T-Server – When it will be sent?


When the target is available, URS requests T-Server to route to the target using ‘RequestRouteCall’. After receiving event ‘EventRouteUsed’, URS requests T-Server to send ‘EventDiverted’ event as seen below

16:56:45.834_T_I_006c02462a161006 [14:0c] EventRouteUsed(normal) is received for tserver TServer[AvayaSwitch] (this dn=9001)
_T_I_006c02462a161006 [14:0a] del DN (TServer[AvayaSwitch] 9001) truly(ref.id=12)
_T_I_006c02462a161006 [14:0a] there is no DNs for call, delivering in progress
request to 65200(TServer) message RequestDistributeEvent
AttributeCallUUID    ‘AM5D3AE9D90757BKTSVJTCIAR4000014’
AttributeTimeout    60
AttributeExtensions    [194] 00 07 00 00..
‘SIGNATURE’    ‘router’
‘NAME’    ‘URS76’
‘VERSION’    ‘Version: 7.6.200.11’
‘CLUSTER’    ‘URS76’
‘VQID’    ‘N6NKOJMDT16I93HFG6V041D9L0000001’
‘Location’    ‘AvayaSwitch’
‘CallUUID’    ‘AM5D3AE9D90757BKTSVJTCIAR4000014’
AttributeReason    [14] 00 01 01 00..
‘RTR’    115
AttributeUserData    [598] 00 16 00 00..
‘RTargetAgentGroup’    ‘?:Skill1 > 1’
‘RVQID’    ‘N6NKOJMDT16I93HFG6V041D9L0000001’
‘RTargetTypeSelected’    ‘2’
‘RTargetRuleSelected’    ”
‘RTargetObjectSelected’    ‘?:Skill1 > 1’
‘RTargetObjSelDBID’    ”
‘RTargetAgentSelected’    ‘agent01’
‘RTargetPlaceSelected’    ‘Place_6001’
‘RTenant’    ‘Resources’
‘RStrategyName’    ‘VQDemo’
‘RStrategyDBID’    ‘107’
‘CBR-actual_volume’    ”
‘CBR-Interaction_cost’    ”
‘CBR-contract_DBIDs’    ”
‘CBR-IT-path_DBIDs’    ”
‘RRequestedSkillCombination’    ”
‘RRequestedSkills'(list)
‘RTargetRequested’    ‘?:Skill1 > 1’
‘CustomerSegment’    ‘default’
‘ServiceType’    ‘default’
‘ServiceObjective’    ”
‘PegAG?:Skill1 > 1’    1
AttributeDNIS    ‘0800123456’
AttributeThirdPartyDNRole    2
AttributeThirdPartyDN    ‘6001’
AttributeOtherDNRole    1
AttributeOtherDN    ‘20005’
AttributeThisDNRole    2
AttributeThisQueue    ‘VQ_Sales’
AttributeThisDN    ‘VQ_Sales’
AttributeCallType    2
AttributeCallID    16
AttributeConnID    006c02462a161006
AttributeCustomerID    ‘Resources’
AttributeReferenceID    4294967295
AttributeUserEvent    EventDiverted

StatServer Calculation


Since Stat Server registers for virtual queues, it will receive event messages – EventQueued and EventDiverted – for virtual queues just like physical queues and calculates statistics accordingly.

In the next post, we will see how ‘Clear Target’ option in Target block works for Virtual Queue

Target Block

Tagged: , , ,

  • Rajee Bala

    Thank you. Very helpful.

  • Very HelpFul Thank You..

    • Glad you find this useful 🙂

      • so you are continuing to post the article related to genesys…i need some of related to SIP Server.thank you

  • Rajesh Patel

    Perfect article I was looking for some issue troubleshooting ! Thanks you so much Lakshmikanth.