It is actually interesting that your TargetSelected returns .GA . Are you using Agent Groups or Virtual Agent Groups?
You are using TargetSelected and according to the manual for 6.5:
TargetSelected:
This function returns the DN and the switch name of the target to which the interaction was routed definitively; the result is returned in an apparent highlevel target format ([email removed]). If the interaction has not yet been routed definitively, the function returns the empty string.
The Type of the target selected is one of the following high level Types as described in the Framework 6.5 Stat Server Userfs Guide: Agent, Place, Queue, RoutePoint, GroupAgents, or GroupPlaces.
What you want to use is TargetObjectSelected:
TargetObjectSelected
Parameters: none
Return value type: STRING
This function returns the highlevel target to which the interaction was routed definitively. If the interaction has not yet been routed definitively, the function returns the empty string.
If that still does not get you what you want (depends what highlevel target you are using), then try:
I have never done this, but I heard that use_agentid=true for URS option might do the trick, because it actually tells PBX to route to agent and not DN, but BE VERY VERY CAREFUL! It might not work depending on your PBX, so test it first.
Our agents belong to groups and so we identify a call and route to a particular group of agents…we dont target a specific individual…we look for who have been ready the longest within that group.
I dont think that the name of the agent in question who has received the call will be readily available in a variable, but i do have his/her number as you can see so i can strip that out.
But, i will then need to DB Dip into the database to resolve their name but do not know the table structure…are you able to advise on this at all ???