VoiceChange news Content of documentation User documentation Administrator documentation Index of terms Technical Support Search on-line

Sample applications

Introduction

Sample applications are here for two reasons:

You can use and modify them to suit your needs.


Table of contents


Automatic switch operator

Introduction

"Automatic switch operator" is basically a simple application replacing a secretary. The "operator" offers the caller options, to which department he/she can be switched, or offers to leave a message.

Description of the application

Sample application will offer the following options:

1 ... switching to secretary (line 111)
2 ... switching to commercial department (line 225)
3 ... switching to customer support department (line 250)
4 ... leaving a message for line 100
* ... collection of line 100 voice box (this option is not said in the offer)

The options will be repeated twice. If the user selects nothing, the action will be the same as for option "4" – leaving a message. If the user selects any of the options, the playback will stop immediately.

Technology

In most branch exchanges, the current call is switched over by pressing FLASH followed by selection of the line number using DTMF direct inward dialing.

In VoiceChange environment, FLASH is sent as a DTMF character "!". I.e., the switch over of the current call to line 357 will be carried out by means of the following commands:

 
Line.SendDTMF "!357"
Line.Hangup
 

Sample code

You can find the sample code in samples/autoswitch/ directory

Copy autoswitch.vbs file into VoiceChange directory and rename to line0.vbs (or any name for other lines).

Copy the wav/ directory to common/wav/.

If you want to change the line numbers, correct them in the application code. The same applies to the number of the line, for which the message should be left.

The line, for which the message should be left, should be properly configured (i.e. it should be owned by any e-mail addressee).

back to top


Automatic customer support line

Introduction

"Automatic support line" is a widespread form of answering machine. It will separately inquire important data (name, company...) from the caller and then send the general message by e-mail.

Description of application

At the beginning of the call the application will ask, whether the user wants to communicate in Czech (1) or English (2). Language of the following messages will be set accordingly.

The application will ask for the name, company and e-mail of the caller, their phone number (should be entered from the phone keyboard!), related product (1 = FaxChange, 2 = VoiceChange, 3 = MobilChange, 4 = any other product). Then the user is asked to describe the problem.

Then the application will e-mail this information to a specified address.

Technology

The following technologies are employed in support_line.vbs application:

How is the multilingual support ensured? By means of Locale property of Voice object. The choice of the Czech language is carried out by command
 
Voice.Locale = "cze"
 

and from this moment all WAVs are selected from common/wav/cze/directory. The choice of the English language can be made by means of
 
Voice.Locale = "eng"
 

and all WAVs will be played from common/wav/eng/ directory. For example, after choosing the language at the beginning of the script, the programmer need not to take care of the language anymore, it is enough to use the same names of WAV files in both language directories.

Sending of common e-mail with more attachments is base on direct use of VoiceChange COM object Mail and its method SendMessage.
 
rc = Voice.VXVoice.Mail.SendMessage( _
    "administrator@pcbrouzda.syscae.cz", _
    "Incomming support call", _
    MessageText, _
    tempPath & "\ci_name.wav" & ";" _
        & tempPath & "\ci_company.wav" & ";" _
        & tempPath & "\ci_email.wav" & ";" _
        & tempPath & "\ci_problem.wav", _
    "" )
 

Further we recommend viewing the function RecordWavEx (in support_line.vbs file), which will play the message, then record WAV, and if it is too long (i.e. the user has hanged up and there is a busy signal on the line) or too short (0.5 sec or less), it will repeat the whole procedure until the total number of attempts is reached.

Sample code

You can see the sample code in samples/support_line/ directory.

Copy support_line.vbs file to Change directory and rename to line0.vbs (or any name for other lines).

Copy wav/ directory to common/wav/.

Set the target e-mail address to line 195 (enter either alias name or e-mail address instead of "Administrator" name).

back to top


Infoline: Sending of TIFF document (static fax-on-demand)

Introduction

One of most common Voice applications is fax on demand. Person call to an information line, select a document that he/she want and this document will be sent to caller via fax - still within the single call originat by caller.

Description of application

Sample application will offer sellection from two documents. Caller select one of them. Selected document is sent to caller via fax.

Technology

This application demonstrate function SendFax() from COM object Voice.VXVoice.

This function send a fax within the existing call. The simplest usage of that function follows:
 
Voice.VXVoice.SendFax "TIFF_to_be_sent.tif"
 

More description can be found in documentation.

Document to be send must be "fax" TIFF - with resolution 204x196 DPI, width 1728 pixels, bicolor and with CCITT Fax.G3 or Fax.G4 compression.

TIFF file with this required characteristic can be done for example by printing to FaxChange Client Printer.

Sample code

You can found sample code in samples/fax-on-demand_static/ directory.

Copy fod_static.vbs file info VoiceChange directory and rename it to line0.vbs (or any name for other lines).

Copy wav/ directory into VoiceChange's common/wav/ directory. Copy common-fax/ directory into VoiceChange's common/fax/ directory.

back to top


Infoline: Generating and sending of a document (dynamic fax-on-demand)

Introduction

Dynamic version of fax on demand is an extension to preceding application. Document to be sent can be in any format supported by FaxChange (DOC, XLS, ...). Application will convert "any" document format into TIFF when required.

Description of application

Sample application will offer a following sellection:
  1. actual time information
  2. directory C:\ listing
Caller will select document he/she want. Application will generate text file with requested content, convert it via FaxChange and send a fax back to caller.

Technology

Sample application demonstrate functionality of COM object CnvDoc. This object is intended for converting of common documents into TIFF files by using FaxChange Converter. So it works only if FaxChange Server version 4.0 SP2 or higher is installed at this computer or anywhere in network environment.

Full usage description can be found in documentation. Conversion of one document is done by following function call:
 
rc = CnvDoc.Convert( _
        "c:/dokumenty/source.rtf", _
        "c:/temp/to_be_sent.tif", _
        60 )
 

This command will convert file "c:/dokumenty/source.rtf" into TIFF file "c:/temp/to_be_sent.tif". Timeout is set to sixty seconds; if conversion is not done within that limit, function will return False.

Sample code

Sample code can be found in samples/fax-on-demand_dynamic/ directory.

Copy fod_dynamic.vbs file info VoiceChange directory and rename it to line0.vbs (or any name for other lines).

Copy wav/ directory into VoiceChange's common/wav/ directory.

back to top