An alternative way to do this would be to use variables to populate Enterprise Data before connecting an agent to a call; the name of the CSQ would then show up in the window before the agent answers the call.
In fact I think the CSQ may be a system-defined call variable which is displayed along with ANI and DNIS information.