VoiceGuide IVR Software Main Page
Jump to content

Vbs Script (fail Path Taken)

Recommended Posts

I have the following VBS code:

 

set vg = CreateObject("vgServices.CommandLink")

if $RV[Q3] >= 9 then
vg.Play_Start $RV_LINEID, "C:\Program Files\VoiceGuide\Scripts\Demo\Q4a.WAV"
end if

if $RV[Q3] >= 7 and $RV[Q3] <= 8 then
vg.Play_Start $RV_LINEID, "C:\Program Files\VoiceGuide\Scripts\Demo\Q4b.WAV"
end if

if $RV[Q3] < 7  then
vg.Play_Start $RV_LINEID, "C:\Program Files\VoiceGuide\Scripts\Demo\Q4c.WAV"
end if

vg.Run_ResultReturn $RV_LINEID, "verify_passed"

 

The script executes just fine and I hear the Q4a/Q4b/Q4c wav files being played. However, the Run_ResultReturn (although always being set to "verify_passed"), the path taken is the "failed" path. Why is this the case?

Share this post


Link to post

Which version of VoiceGuide are you using?

 

Can you please .ZIP up and post a trace from VoiceGuide capturing the call during which this happens.

Share this post


Link to post

Here are the files. We are using the trial version (still seeing if it will work for our needs).

 

BTW - I am loving this support forum.

Logs.zip

Share this post


Link to post

I see that you are running this VBScript from a 'Run VBScript' module (module name: [VBQ3]).

 

When calling the Run_ResultReturn function in a a 'Run VBScript' module you should call it with "success" result, and not the "verify_passed" result. "verify_passed" can only be used if running a verification script from within a Get Numbers module verificaiton scripts.

 

Change

 

vg.Run_ResultReturn $RV_LINEID, "verify_passed"

 

to:

 

vg.Run_ResultReturn $RV_LINEID, "success"

 

and see if that works better for you. Please post here with traces if you still have problems.

 

Share this post


Link to post

Thanks - That solves it.

 

I have another module (getnumber - module Q6) with the following validation code:

 

set vg = CreateObject("vgServices.CommandLink")
i = $RV_ENTEREDNUMBER
if i = 1 or i = 2 then
sResult = "verify_passed"
else
sResult = "verify_failed"
end if
vg.Run_ResultReturn $RV_LINEID, sResult
set vg = Nothing

 

The paths are set as:

on {#} goto [Q6]

on {*} goto [star]

on {success} goto [save Responses]

on {1} goto [save Responses]

on {2} goto [save Responses]

on {fail} goto [Q6]

 

I am never hearing the wav file played when the number fails verification or length? Here are the logs.

Logs.zip

Share this post


Link to post

It looks like you have a Retries count set to 0. Set this to the number of times that you want the [Q6] module to retry asking for data.

 

Also recommend you remove the "on {fail} goto [Q6]" path. Using a circular path like this to point back to itself can cause an infinite loop.

 

If you still have problems please post the script as well as the traces.

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
×