06-20-2017 09:34 AM - edited 03-14-2019 05:23 PM
I'm using user global variables as part of a script which opens, closes another script. A user dials in and sets a variable with a 'text' press 1 to close, 2 to open etc , the variable is set with a text 'close' or 'open' another script acts on the text. I tried to locate the 'text' under user variable in the DB, I could locate the user variable but not the 'text' is the actual text written somewhere. The user variable is only set once a day if ever so it isn't being changed along a per basis
Thanks
Solved! Go to Solution.
06-21-2017 12:49 PM
Ahh, so you want this for more of an admin user like yourself who wants to see how that value is set at a certain time, right? You could do it a couple different ways.
For instance, you could use Call Tracer in Script Editor and send a call through a script that goes through the nodes that call upon your variable(s) and look at the output.
You could also query the router directly and check the value of the expression.
You could also potentially look in the database with SQL but there are more caveats (is it set to persistent, is that database set to be populated, etc.).
06-22-2017 05:48 AM
Bill is spot on. For talking to Router memory, run rttest.
Enter
expr Global.user_genCCstatus
Call Tracer is the easiest way to see a bunch of these at once. Create a dummy DN that is totally bizarre and easy to find in Call Tracer. Like 0000000001 or 9999999999 so it sits at the top of bottom of the list. Attach a test Call Type. Schedule the test script.
Create a test script that uses a series of SET nodes to repeatedly set a PV (say PV10) or a dummy global variable to each of your global variables in turn. Then a release node. Drive a dummy call through it with Call Tracer on 9999999999. Press the Save button to create trace.txt.
Now you can easily go through trace.txt and look at the trace of these SET nodes. The value will be in curly brackets (braces) on the far right. When you have a large number of globals, this is about the easiest way.
I hardly ever make globals persistent. The persistent flag is there for Router restarts - it may be important that a certain global variable is initialized to particular value when you bring down both Routers completely and restart.
I have not found a use for this yet. Most people leave it checked because it defaults that way, but I clear it.
Regards,
Geoff
06-21-2017 07:28 AM
What do you mean, database? Maybe I am misunderstanding, but don't you just want to use IF nodes in other scripts to look up the value of that variable as open or close or whatnot?
Basically, something like this?
https://supportforums.cisco.com/discussion/13199141/call-studio-scripting-questions
06-21-2017 07:50 AM
Bill
Thank you for your reply, the example I gave was just an example. I have my scripts working
Caller dials in, gets checks with regards to being authorised, the press to open CC- script uses a set user variable usergen_CCstatus and assigns a text of say 'closed'
The customer facing script then as per call checks the usergen_CCstatus and uses an If statement - if text=='closed' then play message or something. Callers dials in press to open CC, variable now set to 'open'. Customer again looks for the text by if variable =='open' then CC open. All good however I'm trying to see if the actual text 'open, closed' is stored anywhere in UCCE so if need be I can check the Sql quickly to see if it is open or closed.
I've created other script to do as well but also want an option to check if the variable can be 'seen'
Thanks
06-21-2017 12:49 PM
Ahh, so you want this for more of an admin user like yourself who wants to see how that value is set at a certain time, right? You could do it a couple different ways.
For instance, you could use Call Tracer in Script Editor and send a call through a script that goes through the nodes that call upon your variable(s) and look at the output.
You could also query the router directly and check the value of the expression.
You could also potentially look in the database with SQL but there are more caveats (is it set to persistent, is that database set to be populated, etc.).
06-21-2017 12:54 PM
Thanks again
How Where in the router would I look
The variable is set to persistent
Thanks
06-22-2017 05:33 AM
This post gives a good write up on it.
https://supportforums.cisco.com/discussion/9581776/expression-testing-rttest
Just be careful, rttest is powerful.
As far as the variables being written, there is more to it than just being set to persistent, here's a post that talks about it some of the other things that have to be done for it to be in the database. The schema guide also talks about it as well.
https://supportforums.cisco.com/discussion/11694826/ucce-user-variables-set-persistent-not-working-after-icm-router-reboot
Your quickest/easiest/safest bet is for you to do the Call Tracer for that script, but like anything, multiple approaches in CCE.
06-22-2017 07:58 AM
The rttest advice worked for me.
Many thanks
06-22-2017 05:48 AM
Bill is spot on. For talking to Router memory, run rttest.
Enter
expr Global.user_genCCstatus
Call Tracer is the easiest way to see a bunch of these at once. Create a dummy DN that is totally bizarre and easy to find in Call Tracer. Like 0000000001 or 9999999999 so it sits at the top of bottom of the list. Attach a test Call Type. Schedule the test script.
Create a test script that uses a series of SET nodes to repeatedly set a PV (say PV10) or a dummy global variable to each of your global variables in turn. Then a release node. Drive a dummy call through it with Call Tracer on 9999999999. Press the Save button to create trace.txt.
Now you can easily go through trace.txt and look at the trace of these SET nodes. The value will be in curly brackets (braces) on the far right. When you have a large number of globals, this is about the easiest way.
I hardly ever make globals persistent. The persistent flag is there for Router restarts - it may be important that a certain global variable is initialized to particular value when you bring down both Routers completely and restart.
I have not found a use for this yet. Most people leave it checked because it defaults that way, but I clear it.
Regards,
Geoff
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