09-27-2019 06:55 AM - edited 09-27-2019 07:20 AM
Hi All,
I need to write a CallDuration and other parameters of a call starting with a CallRedirect to an external database thorugh REST CALL.
I'm new to uccx and i can't understand how to get CallDuration (and other call parameters) after CallRedirect start.
We are using UCCX 11.6
Regards
Pier Paolo
Solved! Go to Solution.
09-30-2019 01:01 PM
09-27-2019 08:15 AM
I think the easiest way to get the call duration (and maybe the only way), is to set a time variable to the current time at the start of the script, then at the end, do a math equation to subtract the start time you captured, from the now current time.
E.g.,
Variables
Time call_start = null Time call_end = null float duration = 0.0F
Script
Start Set call_start = t[now] ...do some stuff to handle the call... Set call_end = t[now] Set call_duration = (call_end.getTime() - call_start.getTime()) / 1000F End
Call duration will now be in seconds (you could convert to minutes, or a string format, or whatever), and will have some decimal places of precision (convert to int for whole numbers).
What other call parameters to do you need?
09-30-2019 02:04 AM - edited 09-30-2019 06:23 AM
Thanks Anthony for the answer.
This was what i did.
Probably what i miss is how to handle the call .
I need to get the calling number (done) do a query to external db and find to which numbers redirect the call(done)
transfer the call simultaneously to some numbers until one of them pick up the call (still to do) and finally get some information about the transferred call (duration, ringing time before pickup,etc still to do...)
When i debug the code with Reactive script
the flow goes over after the Call Redirect (i've tried also with a Call Consult Transfer in this case at lest wait for the pickup)
and so i get 0 time duration.
How can i wait one of the two parts hangup?
(sorry for the stupid question)
>>What other call parameters to do you need?
i would like to know how much time the phone rings before the call starts and for example.
Thanks in advance,
Pier Paolo
09-30-2019 07:59 AM
09-30-2019 08:17 AM - edited 09-30-2019 08:45 AM
so there is no way to calculate the duration of the call ?
i need to calculate the talking time of a call after a Call Redirect or Call Consult Transfer.
Should I use Finesse api or similar to get this information?
09-30-2019 01:01 PM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide