Call Finish

It is sometimes desirable to perform some functions at the time when the call finishes, regardless of at which point in the script the call ended. Usually such a script will perform 'clean-up' type operations like database updates, call other programs, send out emails or schedule outbound calls.

VoiceGuide can be instructed to run a separate script when the call has finished using the "Script Properties" option from the "Edit" menu in the Graphical Design Environment.

Below shows the script "C:\My Scripts\Update Databases.vgs" is to be called when the currently edited script is finished:


Modules allowed in the Cleanup/OnHangup script

Only certain types of modules can be used in a Cleanup script. As the call has already ended, modules which play or record sound files or expect user input cannot be used.

The following modules can be used:

Database Query
Web Service Call
Time Switch
Evaluate Expression
  Run Program
  Send Email
  Make Call
  Run VB Script


Changing the Cleanup/OnHangup script at runtime

It is sometimes desirable to change the Cleanup script depending on user selections or other factors. To change the script we need to assign the new filename to the $RV[RUNAFTERHANGUP] Result Variable. The Evaluate Expression module can be used to do this:


Result Variables

All Result Variables from the script which was handling the call are available to the 'Cleanup' script. This allows all information entered by caller or retrieved/created by the original script to be used in the call cleanup script.