cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
808
Views
20
Helpful
5
Replies

UCCX write call duration to exernal DB

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

1 Accepted Solution

Accepted Solutions

Once you do a successful Call Redirect or Call Consult Transfer you just told UCCX to forget about the call. So no, there would be no way in UCCX to understand how long the call lasted. You would however, be able to get that data from CUCM CDR.

View solution in original post

5 Replies 5

Anthony Holloway
Cisco Employee
Cisco Employee

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?

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

The Call Redirect step will fall to one of its branches immediately, regardless of the result of the step. Only the Call Consult Transfer step will allow you to wait during ringing, and then fall to the Successful branch if it's answered, or to the Timeout branch if the timer you set expires.

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?

Once you do a successful Call Redirect or Call Consult Transfer you just told UCCX to forget about the call. So no, there would be no way in UCCX to understand how long the call lasted. You would however, be able to get that data from CUCM CDR.