cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1840
Views
17
Helpful
5
Replies

UCCX script Question

amitprshad
Level 1
Level 1

I have to create a script which should be able to count the no of callers calling the IVR.I have created a local variable named "counter" and have set its initial value to zero and inside the script I am increasing the value of counter by 1.But whenever I place the calls from two IP phones then for every new call the variable takes it intial value and it always plays that there is only 1 call landed o the IVR.

Hence I wanted to know that if there is any variable which intializes only once (like "static int" kind of datatype in normal programming languages )so that i can calulate the no of live calls hitting the UCCX script.

1 Accepted Solution

Accepted Solutions

I have never try to send a call to the meet me  number and someone else could give you a better advice but maybe you can use a consult transfer to the meet me number, so if you are the 9th person, the call will be sent to the busy or unsuccesfull "field" of the consult transfer step, so you will be able to play a prompt to the triggering contact that says "The bridge is already full".

Gabriel.

View solution in original post

5 Replies 5

Aaron Harrison
VIP Alumni
VIP Alumni

Hi

Scripts are not like classes; they're basically a set of steps and a set of variables that are specific to that single execution of the script.

If you want 'global' variables that persist between script execution instances then you have to use something external:

- A database

- An xml file (can be uploaded as a document to the UCCX repository)

Beware that if you use an XML file for this sort of thing, it's not guaranteed thread-safe (i.e. safe for multiple accesses at the same time).

Which leads me to the main point I would make - you don't need to count the number of instances of an IVR app that have run.. all that is counted in the Historical DB and can be reported on.

Or are you trying to count concurrent executions of an IVR? And if so, why?

If you elaborate more on exactly why you want to do it someone will advise you..

Regards

Aaron

Please rate helpful posts...

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Hi Aron,

The scenario for which I am using this type of script is

I have created an IVR for Meet Me application in CUCM.There will be one person who will intiate the meet me conference bridge from IP phones.The external users will call the IVR and first outside caller will get a message that "You are the 1st caller" just like in meeting place then once the 9th caller calls the bridge (as meet me bridge is configured to handle 8 participants only) then it should say "bridge is full".That is why I needed a counter to count the number of callers calling the IVR.

I can use database but can I use the same SQL database installed? Also do you have any document or link explaining the use of database in te scripts.

Reagrds

Amit

I have never try to send a call to the meet me  number and someone else could give you a better advice but maybe you can use a consult transfer to the meet me number, so if you are the 9th person, the call will be sent to the busy or unsuccesfull "field" of the consult transfer step, so you will be able to play a prompt to the triggering contact that says "The bridge is already full".

Gabriel.

Hi

I'd agree with Gabriel - no point trying to be too clever with this.

You'll be redirecting out to the meetme number, or doing a consult transfer.

If someone is the third caller, and is told they are the third caller in the bridge, then goes to the meetme number and then drops out, then next caller will still be the fourth. If someone drops out of the conference when there are 8 participants, then your script will prevent them from dialling back in.

Since it can't be reliable, and will only reduce the potential maximum number of participants I would not try limiting access at all... It would be better to just try the consult transfer, and if it is rejected play out 'Sorry, either the conference has not been started or is full'.

If you do a debug of the script, you may be very lucky and find that a call to a meetme number that has not been started by an IP Phone user returns 'invalid' and a full 8-person conference returns 'busy' - if so you could have an appropriate prompt for each scenario. Just guessing though, it's not something I've tried.

Regards

Aaron

Please rate helpful posts...

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Hi Aron,

I too agree by the idea.

Regards

Amit

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: