VoiceGuide IVR Software Main Page
Jump to content

Vbs Module

Recommended Posts

'===============

Const ForReading = 1

Const ForWriting = 2

Const ForAppending = 8

 

set vg = CreateObject("vgServices.CommandLink")

set fso = CreateObject("Scripting.FileSystemObject")

set tsFile = fso.OpenTextFile("C:\111.txt", ForReading,True)

StrConnStr=tsFile.ReadAll

tsFile.Close

set tsFile = Nothing

set fso = Nothing

 

if Err.Number <>0 then

Else

vg.RvSet $RV_LINEID, "ConnString", StrConnStr

End If

Set vg=Nothing

'==================

 

When running this script in module vbs in the begging of script it fails

 

i want to retrieve connection script from separate file when begging the script and putting it in variable

 

i can read connection string from file before open connection with database but these require to wirte the above code with each vbs module using to connect to database

 

HINT: This script tested successfully with vbs editor

 

what is the mistak?????????

 

Share this post


Link to post

The script looks fine and there is nothing wrong with using a VBScript module as the starting module of your script.

 

How does the script fail? What are the error messages if any that you see or what is shown in the VoiceGuide traces?

 

Which version of VoiceGuide are you using?

 

Please post some traces from VoiceGuide showing the incoming call.

 

If you have any Anti-Virus software installed then please remove it. Antivirus software can interfere with VBScript execution.

 

Share this post


Link to post

Ok Log Files Is attached

 

i use vg v7 and i begging the script with VBS module and in case of success got to welcom module

in fail goto hangup Module , the script goto to hangup module

 

Log.zip

Share this post


Link to post

The traces show why the VoiceGuide script ends. The VBScript is not returning a result to VoiceGuide, so VoiceGuide takes the fail path to the module in your script titled [Hangup the Call 2], which ends the call.

 

You should modify your script to use the Run_ResultReturn command, like this:

 

vg.Run_ResultReturn $RV_LINEID, "success"

 

Then the Success path will be taken.

 

Add the Run_ResultReturn line to just before the Set vg=Nothing call.

Share this post


Link to post

Ok Thanks It is Now Working

 

But I have one more Question

 

in say number module voice guide look for sound files in the directory where it is installed (i.e files 1.wav,....)

 

can i change the directory of these sound files

 

because i want to gather my own script files in one location far from insttalation folder

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
×