VoiceGuide IVR Software Main Page
Jump to content

Calling Vbscript

Recommended Posts

I am trying to call a VBscript and pass in the Voice Mail Box Id captured and return the voice mail Extension by parsing the

voicemail box xml file. I don't know how to pass in and return the extension. Here is the code but it errors out on the $RV variable on line 22

 

We are using a D/41H and Version 6.xxx of the voiceguide.

 

[Run VB Script 12]

Type=Run VB Script

DispSize=69

Txt=Run a VB Script.

VbsFileToRun=

VbsWait=1

VbScript=

set vg=CreateObject("VoiceGuide.CommandLink")

 

Set objFSO = CreateObject("Scripting.FileSystemObject")

 

Set objFile = objFSO.OpenTextFile("C:\Program Files\VoiceGuide\Data\VmBoxList.xml", 1)

 

dim stuff

 

stuff = ""

i = 0

Do Until objFile.AtEndOfStream

 

 

stuff = stuff & objFile.ReadLine

loop

objFile.Close

 

'Then you can iterate it like this

 

' look up and then

 

x = "Id=" & chr(34) & $RV[get numbers 8]

 

y = instr(stuff,x)

 

 

if y <> 0 then

 

z = instr(y,stuff,"/Ext")

if z <> 0 then

 

idout = mid(stuff,z-4,3)

 

end if

 

end if

 

vg.Run_ResultReturn $RV_LINEID, "[Run VB Script 12]{" & idout & "}"

 

set vg=Nothing

 

VbsHoldPlay=

on {success} goto [Play 2]

on {fail} goto [Play 5]

on {success} goto [say Numbers 6]

 

Position=270,208

Share this post


Link to post

Try changing:

 

x = "Id=" & chr(34) & $RV[get numbers 8]

 

to:

 

x = "Id=" & chr(34) & "$RV[get numbers 8]"

 

 

the $RV[get numbers 8] would get replaced by its value exactly. You need to put the string quotes around that $RV if the string quotes are required to make expression correctly formatted.

 

If you are still going to encounter problems then please post the script that you are using along with the vgEngine trace (.ZIPed)

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
×