![]() |
Content of documentation | User documentation | Administrator documentation | Index of terms | Technical Support | Search on-line |
Introduction into VoiceChange programming |
If the basic functionality of VoiceChange as a phone answering machine is not sufficient, it is necessary to proceed to adjustment of scripts or writing the new ones. This document is designed to provide you guidance through the VoiceChange script programming.
Table of contents
Libraries are attached to the user code by the following line
Dim VXScript : Set VXScript = CreateObject("VXScripting.VXScript") : Execute VXScript.InitCode |
This line must be ALWAYS included in your script - it can be located anywhere OUTSIDE of user functions. By default it is located at the end of script.
User script has to implement four basic functions:
OnInit
user functionOnInit
function is called when the system is initialized. It is intended e.g. for initializing the database connection
or similar action.
OnInit
function need not implement any activity. The entire VoiceChange initialization took place prior to the function call.
OnRing
user functionOnRing
function is called upon incoming call. When calling, the phone is still hanged up; it is the task of this function
either to answer the phone and attend the call, or perform any other activity – e.g. divert the call by using TAPI services.
If the OnRing
function returns without attending the call, it will be called out again upon next ring.
OnIddle
user functionOnIddle
function is called when there is no activity (i.e. there is no incoming call or any other task). It need not perform
any activity, but it can perform an outgoing call.
OnShutdown
user functionOnShutdown
function is called upon completion of the script activity. It is intended e.g. for closing the database connections.
It need not perform any activity.
There is the possibility to call directly the functions of VoiceChange core from the user script by means of VoiceChange COM objects. But this is not recommended and the functionality in next versions of VoiceChange is not guaranteed. For the documentation for COM objects click here.
Directory structure of VoiceChange from the scripting point of view is as follows:
VoiceChange/
- user scripts are saved here.
VoiceChange/_vbs_core/
- basic WSC libraries of VoiceChange are here. We recommend not to modify these libraries;
after their modification Datasys cannot provide the user script support.
VoiceChange/_vbs_modules/
- there are VoiceChange extension modules here (interconnection to other UMS products,
company greeting module etc.) We recommend not to modify these libraries;
after their modification Datasys cannot provide the user script support.
VoiceChange/_vbs_language/
- there are support modules for each language here. We recommend not to modify these libraries;
after their modification Datasys cannot provide the user script support.
VoiceChange/_vbs_script_modules/
- other supporting modules. We recommend not to modify these libraries;
after their modification Datasys cannot provide the user script support.
common/wav/cze/
- Czech
common/wav/eng/
- English
etc. When playing WAVs in script, VoiceChange selects the
right WAV according to the setting of VXScript.Locale
property.
If the WAV is not available in the language required, the default language directory will
be used (created during installation, saved in
common.ini file).
Language-depending activities (playing the date, number of messages) have been
separated into language modules in VoiceChange/_vbs_language/
directory. When
implementing a new language, it is necessary to add these functions for it.