Paths

Paths is the name given to the transitions between the Script Modules.

Creating new paths

To create a new path, press the Properties button on the module from which the path will start, and go to the Paths tab.

Paths are specified using the format:

on {Trigger} goto [Module Title]

The text in the Paths window can be edited directly, or you can use the Add New Path help frame.

 

Selection Paths

Taken when caller has made a matching selection. This can be a keypress or a series of keypresses, a keyword or phrase recognised by the Speech Recognition system, matching data retrieved from database or web service, or data returned by external program or VBScript/JavaScript etc.

 

Timeout Paths

A Timeout path will be taken if a caller has not made a selection within the specified number of seconds. A Timeout path with a wait time of zero seconds will be taken immediately after the last sound file in the module has completed playing.

 

Paths to Voicemail System

Paths can direct the caller to a Voicemail Box, Voicemail Box Menu or Voicemail Retrieve Menu, eg:

When specifying the Voicemail Box as the destination, the Voicemail Box number must be specified as well. make sure that the Voicemail Box specified exists and has been configured using the Voicemail System Manager.

 

Returning from the Voicemail system

If you would like the caller to go to a certain module after returning from the Voicemail system then you can specify a return module. The Path definition needs to be:

on {Trigger} goto [Voicemail System Module] Return [Module Title]

Eg: if after Retrieving Voicemail the caller should be sent to the main menu again, the path will look like this:

If the titles of the modules are too long to fit on one line, the path description will wrap around to the following lines. This is OK.

 

Branching to other scripts and calling subscripts

The Enterprise and Evaluation versions of VoiceGuide can call subscripts.

To branch (goto) to a script you can specify a path like this:

on {event} goto [script filename|module name]

eg:

on {1} goto [c:\scripts\myscript.vgs|PlayWelcome]

To run a subscript (gosub) to a script you can specify a path:

on {event} gosub [script filename|module name]

eg:

on {1} gosub [c:\scripts\myscript.vgs|PlayWelcome]

The script name or the module name can be left blank. If the Script Filename is left blank then the current script is assumed, and if the Module Name is left blank then the script's default starting module is used.

eg: on {1} gosub [|PlayWelcome]

on {1} gosub [c:\scripts\myscript.vgs|]

Note: If the [|module name] notation is used, the path to the destination module will not be drawn. This can be used to visually de-clutter highly linked scripts.

 

To specify what module should be the next module once the subscript returns the "return" path option should be used.
If the "return" path option is not used when the subscript returns then VoiceGuide will start running the default start module in the returned to script.

To specify a return module:

on {event} gosub [script filename|module name] return [return script filename|return module name]

The Return script can be a different script. eg:

on {1} gosub [c:\scripts\admin.vgs|Verify Caller] return [c:\TakeOrder.vgs|Main Menu]

The return script can be omitted if you would like the subscript to return to the same script. eg:

on {1} gosub [c:\scripts\utils.vgs|Lookup Status] return [Read Out Current Status]

To return from a subscript use a path like this in the subscript:

on {event} return

eg: on {4} return

The various goto/gosub/return paths are briefly demonstrated in the sample scripts in VoiceGuide's \scripts\more sample scripts\paths directory.

 

Using Result Variables in Paths

$RVs can be used in Paths expressions.

Any $RVs in paths are evaluated before the Paths are looked at to determine what action is taken after an event arrives.

eg: this approach would work:

on {$RV[option1]} goto [some module]
on {$RV[option2]} goto [some other module]
on {$RV[option3]} goto [and so on]

where $RV[option1] - $RV[option3] are assigned keypad digits or other events triggers.

This approach would also work:

on {1} goto [$RV[option1]]
on {2} goto [$RV[option2]]
on {3} goto [$RV[option3]]

where $RV[option1] - $RV[option3] are assigned module titles.

Entire path expressions can also be assigned to an $RV. eg: a single $RV can have this value assigned to it:

on {1} goto [some module]
on {2} goto [some other module]
on {timeout 5} goto [and so on]

and then that $RV can be used in the Paths list (along with other paths/$RVs if needed).

 

Subscripts using COM/WCF interface

Please see the VoiceGuide COM/WCF Reference section in this Help file for information on how the goto/gosub/return commands can be issued to VoiceGuide from external applications.

 

VoiceGuide

© Katalina Technologies Pty. Ltd.