Calculating Wait Time in Queue and Agent Status

Unanswered Question
Apr 7th, 2007
User Badges:


Couple of things

1) How to calculate the Agent status, for eg if i need to check if agent status>=1 than route route to CSQ.

How i can achieve the above?

2) I am developing CSQ script where i am struck in making wait time calculations.

I see one predefined script "visibleQ.aef" in the system but that script is also giving errors. Could be it is being called by someother script which i am unable to figure out.

I need to build something like.

IF oldest call waiting <= 5 mins true than play prompt.. if false than Check if oldest call waiting is >=5 and <10 mins, if true than play prompt if false than check next IF.

If someone can give me some kind of hint or script in this i will be really thankfull.

Thanks in advace!



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
mmelbourne Sat, 04/07/2007 - 12:27
User Badges:
  • Silver, 250 points or more

I'm not entirely clear on what you mean by "status>=1" for an Agent status. You can use the Get Reporting Statistic step (with a Report Object of "Resource IPCC Express") to get the status of an individual Agent. The Row Identifier is the Agent ID. The value returned is the agent state, e.g. "Ready, "Not Ready", "Working", "Talking" etc.

The Get Reporting Statistic step can be also be used to report on a CSQ, by selecting "CSQ IPCC Express" as the Report Object. One of the fields is "Oldest Contact In Queue", which returns a value in seconds. "Estimated Wait Time" (for the CSQ) and "Current Wait Duration" (for the contact) are also available; their use will depend on exactly what you're trying to achieve.

Please rate helpful posts!

daljeetsingh1_2 Sun, 04/08/2007 - 20:42
User Badges:

I might be dint explain it properly.

here it is.

1) status>=1 means if number is agent login to the IPCC express is more than 1 than route the call to CSQ, if no agent is logged in than route the call to Voice mail. So i am looking to check the status of agents who are logged in.

2) I dont understand when you say fields like "Oldest contact in Queue" and others.

Can you send me an example script to achieve this


mmelbourne Mon, 04/09/2007 - 05:28
User Badges:
  • Silver, 250 points or more

There's another option in the Get Reporting Statistic step, to obtain the number of Agents logged into the CSQ ("Logged In Resources"). In the field list are other CSQ statistics which can be returned. It all depends what you're trying to achieve.

Attached is a very basic script which only routes to a CSQ if there are agents logged in who are part of that CSQ, otherwise the call routes to VoiceMail.

Please rate useful posts!

daljeetsingh1_2 Mon, 04/09/2007 - 06:09
User Badges:

We were able to do as per your first post mentioned after exploring CSQ node.

Forgot to update to this forum.

Just one thing which is hampering right now is. When in Queue as agents are busy it play prompt "All agents are busy at this time" Call goes on hold for 100 secs as specified, however after 100 secs it should play the Prompt specified,"Like your wait time is" but to our disappointment it doesnt play the prompt, call waits on the Prompt Node and than goes on hold again(continueing going through script without playing the prompts). I doublechecked that files are valid and uploaded to the prompt folders and if i play them individually on new script i am able to play those files.

Is there something i am missing mentioning in the script? or anything out of box?



mmelbourne Mon, 04/09/2007 - 07:36
User Badges:
  • Silver, 250 points or more

Can you post your script? Do the prompts play if you copy them to the start of the script, for example?

daljeetsingh1_2 Mon, 04/09/2007 - 08:04
User Badges:

Yes, i am attaching Script and Wav files, you need to create a table if you wish to run the script.

And yes if i play any prompt in the start of the script it works perfectly fine.

Please have a look and comment.

mmelbourne Mon, 04/09/2007 - 08:37
User Badges:
  • Silver, 250 points or more

You need to issue a "Call Unhold" before playing a prompt, after the Call Hold and Delay steps. From the CRS Step Reference Guide:

"While a call is on hold, media is temporarily disconnected from the CRS server. If you design a script to play back prompts or wait for input from the caller while the call is on hold, the system will attempt, but fail, to play back the prompts, dropping all audio packets and timing out while waiting for caller input. To avoid this problem, you must include a Call Unhold step in the script to remove the call from hold in order to play a prompt or collect digits from the caller."

Also, I'd probably use "Expected Wait Time" rather than the time the oldest call has been in queue.

I think your "Wait_Time > 300 || Wait_Time <= 600" expression should use an AND (&&) rather than an OR (||) operator, i.e. greater than 5 minutes AND less than or equal to 10 minutes.

Please rate helpful posts!

daljeetsingh1_2 Tue, 04/10/2007 - 01:41
User Badges:

Thanks mate, Your inputs are really helpfull. We are able to do unhold and it works fine, but do u really think "Expected Wait time" and "Oldest Call In Queue" calculate the Wait Time? as we see in the scripting guide that they dont calculate while the call is on hold. If that is the case than how we can able to calculate the wait time/oldest call? as we dont see its happening at all as well.. any inputs?


This Discussion