Showing results for 
Search instead for 
Did you mean: 

UCCX: time difference calculation



I have a requirement in the existing UCCX Script where I need to find out how long the call is waiting in the script.


The call flow is like:

1. Incoming call > UCCX Script

2. Here I have configured time variable "tCallEntertime"

3. When caller selects particular option and go to select resources, I have configured another time variable "tCurrentTime.

4. If all the agents are busy the call gets  in to queue and if the wait time is more than 5 min, call needs to go to voicemail.

5. I also have configured integer variable "iWaitTime".


I am stuck at this stage and not able to find out how calculate the difference between two times.
Can someone please help?


Thanks in advance for responding my query.


2 Replies 2

Chris Deren
Hall of Fame
Hall of Fame

Why do you need to know how long call is in script? Normally you want to know how long call is in queue, i.e. once a queue has been selected, and for that all you need to do is using the "get reporting statistics" select "CSQ IPCC Express" object, "Current Wait Duration" field for your current CSQ (i.e. CSQ variable), store it as defined integer variable and and then just check if its value is greater than the max wait time as you loop through your queue logic.

Thanks Chris.

I will try your solution today.
(You are correct, I wanted to find out how long the call is in queue.)


Pranav Parikh
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: