08-19-2024 06:19 PM - last edited on 08-19-2024 07:07 PM by shule
I am trying to have UCCX alternate calls between our on prem (Cisco UCCX) and remote (MSFT Teams) support groups.
The remote support group is accessible via a Route Pattern to the MSFT Teams Direct Routing arrangement. This number activates a MSFT Call Queue.
I want use the UCCX Expression Evaluator to obtain a variable called "evenCall" using something like the attached java script.
Having such a variable will allow the script direct every other call to either a UCCX CSQ or connect the call to the MSFT Teams Call Queue.
Solved! Go to Solution.
08-20-2024 09:43 AM
Don’t over complicate things, use a random number and if greater than .5 go to one place and lower go to the other place. As long as calls arrive randomly and there’s enough volume this will get you to a very close 50/50 split
david
08-20-2024 09:43 AM
Don’t over complicate things, use a random number and if greater than .5 go to one place and lower go to the other place. As long as calls arrive randomly and there’s enough volume this will get you to a very close 50/50 split
david
08-20-2024 10:58 AM
Thank you, David. Your solution is indeed elegant. Can you provide the steps to get the random value via the java expression evaluator window? For example: click "Java", then click "Object Methods", etc. I don't know how to get the Math.random() function into that window so that it is assigned to my path control variable.
08-20-2024 02:11 PM
Hi David, I implemented this with the math.random() method. I was surprised that I did not run into any of the other errors I was experiencing trying to use java methods inside the expression evaluator window. On a string of 20 calls, 11 went one way and 9 went the other. On a string of 15 calls, 8 went one way and 7 went the other.
I was also working on an even more elegant solution to assign two triggers from the same script to a CUCM circular Line Group but ran into some signaling issues between CUCM and UCCX. TAC is exploring the issue. If they can resolve the issue then I will go with the CUCM solution instead.
Thank you for your time and tutoring. -- Mike
08-20-2024 02:23 PM
Why did you set your own response as the solution to your question instead of the response given by @david.macias? That’s not very nice.
08-21-2024 05:09 AM
Hi Roger. This was my first ever post and I am unfamiliar with how the Accept as Solution button works.
Clearly, I thanked both David and Elliott immediately for responding and asked David for details about his solution. Later, after I implemented the solution, I circled back to the community and let David know that I implemented his solution, told him how well it worked and thanked him for his time and tutoring.
David, I meant no disrespect to you nor to steal your credit/point. If you can change it back, please do and I thank you once again for the idea.
Mike
08-21-2024 05:56 AM
You can deselect your own answer as the solution and select David’s.
08-21-2024 07:08 AM
Hello again, Roger. I clicked the "Accept as Solution" button on David's post. Now there are 2 accepted solutions. I don't see how to de-select my accepted solution.
08-21-2024 07:53 AM
08-21-2024 08:47 AM
Done
08-20-2024 10:40 AM
You could also create a value in a Session with a predictable key and toggle the value each time the script is invoked.
08-20-2024 11:00 AM
Thank you, Elliot for your response. Unfortunately, I am unfamiliar with manipulating Session variables and will pursue David's KISS solution above for the time being.
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