VoiceGuide IVR Software Main Page
Jump to content

Create Result Variable by myself

Recommended Posts

I would like to ask that can I create Result Variable by myself? It is because I need it to have a unique id for each call from its beginning to end (using when jumping to other sub-call-flow/script project or calling backend program/api )

Share this post


Link to post

Yes.

Simplest way to create/set a Result Variable is by using an Evaluate Expression module:

https://www.voiceguide.com/vghelp/source/html/modevalexpr.htm

 

Many peopl use the $RV_LINEID and $RV_PORT and the Date/Time $RVs ($RV_YY, $RV_MM, $RV_DD, $RV_HH, $RV_NN $RV_SS etc) to create a unique expression which is the used as the 'Call ID' and save that expression to new $RV.

eg: Put this in the Evaluate Expression module as the expression to evaluate

"$RV_YY$RV_MM$RV_DD$RV_HH$RV_NN$RV_SS_$RV_PORT"

and put this in the "Assign result to the following Result Variable:

my_call_id

you will then be able to use:

$RV[my_call_id]

for rest of script running during the call.

 

Other ways of setting $RVs is by calling the API functions:

https://www.voiceguide.com/vghelp/source/html/com_rvset.htm

https://www.voiceguide.com/vghelp/source/html/com_rvset_rvlist.htm

 

You can also create/set a list of $RVs when using "Run_ResultReturn" API call when returning from JavaScript/VBScript call:

https://www.voiceguide.com/vghelp/source/html/com_run_resultreturn.htm

And the Script_Goto / Script_Gosub / Script_Return API calls:

https://www.voiceguide.com/vghelp/source/html/com_script_goto.htm

https://www.voiceguide.com/vghelp/source/html/com_script_gosub.htm

https://www.voiceguide.com/vghelp/source/html/com_script_return.htm

Share this post


Link to post

Thank you. I would like to ask that should the Evaluate Expression module put before a play module or after play module (Greeting module)? It is because after greeting module, I need to let user to select language.

Share this post


Link to post

You can put it before or after.

There is no noticeable delay when running a Evaluate Expression module (it takes a few milliseconds to run), so it will not make any difference.

Share this post


Link to post

I would like to ask why I can't use the Evaluate Expression module's result Variable for run VBScript. Please refer to the attachment.

Annotation 2020-06-08 124214.png

Annotation 2020-06-08 124306.png

Share this post


Link to post

That  should work.

Can you please post the vgEngine trace file so we can see what happened on the call.

The vgEngine trace file is created in VoiceGuide's \log\ subdirectory.

Please .ZIP up the trace file before posting.

Share this post


Link to post

The module "Call_id" is not part of the active call flow.

Have you set the starting module correctly?

Here are the modules that the callflow on your system goes through during the call:

130122.464  16   3   1     1 state [Greeting] tts generate start (len=65) |
130122.583  16   3   1     1 state [Greeting] Playing tts (C:\Program Files (x86)\VoiceGuide\temp\tts_3_1.wav) |
130124.884  16   3   1     1 state [OutPutCallId] RunScript |
130124.906  28   3   1     1 state [OutPutCallId] RunScript vbs, onhold= |

 

Share this post


Link to post

The "Starting Module" of the script is set in the "Edit" -> "Script Properties" menu in the VoiceGuide Script Designer.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×