Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Use of Time in UCCX scripting

Hi,

    We are working on UCCX7.0(1) and have a scripting question. The requirement I have is to play a prompt for a defined set of time, say 5 minutes, in a loop. On the expiry of the time, the call should end. Following is the steps that I need to achieve-

1) Play a message , Prompt1, asking the user to enter a digit.

2) On timeout or invalid entry, loop through the Prompt1 unlimited number of times.

3) But once the duration of the play reaches 5 minutes, end the call.

I am not aware of checking this timer/duration within the script. This seems pretty basic but Iam a novice to scripting, so any help is highly appreciated.

Thanks,

DM

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Use of Time in UCCX scripting

i don't fully understand what you need but here is an example that may get you going in the right direction.  keep in mind that ending the script at exactly 5 minutes will be nearly impossible, unless you can control exactly how long the prompt playback lasts.  i.e.g, 30 second prompt, loops 10 times.

Pseudo Code

set start_time = d[now].getTime()

label loop_prompt_playback

play prompt(--triggering contact--, p[some_prompt])

set current_time = d[now].getTime()

if (current_time - start_time < 300000)

     true

          goto loop_prompt_playback

     false

terminate(--triggering contact--)

end

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
2 REPLIES

Re: Use of Time in UCCX scripting

i don't fully understand what you need but here is an example that may get you going in the right direction.  keep in mind that ending the script at exactly 5 minutes will be nearly impossible, unless you can control exactly how long the prompt playback lasts.  i.e.g, 30 second prompt, loops 10 times.

Pseudo Code

set start_time = d[now].getTime()

label loop_prompt_playback

play prompt(--triggering contact--, p[some_prompt])

set current_time = d[now].getTime()

if (current_time - start_time < 300000)

     true

          goto loop_prompt_playback

     false

terminate(--triggering contact--)

end

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
New Member

Re: Use of Time in UCCX scripting

It works!! You are right, I will not be able to time it to exactly 5 minutes but the customer is fine with it.

I just had to tweek the code a tiny but in oder to compare 2 Long values :

if (EndTime - StartTime) >= (300000.longvalue()) then

     Goto End

Else

     Goto Prompt_Label.

Thanks a ton!!

DM

286
Views
0
Helpful
2
Replies
CreatePlease to create content