Voicemail Pro Examples: Using VB Script

7.1.2.34 PlayWav Method

This method is used to play a wave file through voicemail to the active connection.

 

Method

Voice.PlayWav(wav, [wait], [interruptables], dlgid)

 

Parameters

wav (String)

 

 

This contains the name of the wave file to be played or the name of a system parameter to be

 

 

spoken. The following formats are allowable. If the string just contains numbers, then the digits

 

 

are played, for example 12345 plays "one two three four five". If the fully qualified path is

 

 

specified (drive:\path\file) then the full specified pathname is used otherwise the file is relative to

 

 

the WAVS directory.

$NAM

Plays the recorded name for the mailbox if one has been recorded. If a name has not been recorded then optional TTS can be used (providing it has been licensed).

$TIME:hh[:mm[:ss] [ Y][ dd[/mm[/yy]]]] = Plays out the specified time and date. The hours to speak must always be specified and optional the number of minutes, seconds, day, month and year. Note that the actual prompts spoken and order of playing of the elements varies according to locale. Further examples are given in the table below:

English UK: "At eleven hour fifty five, date twenty first September two oh oh three".

English US: "Sunday September twenty first, eleven fifty five AM".

$QPOS [:position] = This plays out "You are at queue position 'position' in the queue".

$QTIM [:eta] = This plays out “Estimated time to answer is 'eta' minutes".

$MSGN:msgs = Plays out the specified number of new messages. For example $MSGN:10 plays "You have ten new messages".

$MSGO:msgs = Plays out the specified number of old messages. For example $MSGN:0 plays "You have no old messages".

$MSGS:msgs = Plays out the specified number of saved messages. For example $MSGS:5 plays "You have five saved messages".

$CID, $CLI, $DATE, $ETA, $KEY, $POS, $SAV, $TIME Play out the contents of the call variable.

[GREETING]\greeting

Plays out the greeting stored within the greetings directory. The .WAV extension is automatically appended.

[ACCOUNTS]\mailbox\message

Plays out the message stored within the specified mailbox. The .WAV extension is automatically appended.

[CAMPAIGN]\campaign\message

Plays out a campaign message stored within the specified campaign. The .WAV extension is automatically appended.

wait (Boolean)

This optional parameter specifes whether voicemail should return immediately (0) or wait until the wave file has been played first (1).

interruptables (String, Default = "Any") This is for future development.

dlgid (Long. Default = 0)

The connection for the voicemail session.

Return Value

The key press that was used to terminate the playback. (String)

Example

Sub Main (dlgid) dim registration

Set Voice = CreateObject("vmprov5.voicescript") registration = Voice.Register(dlgid)

if registration Then dim key

key = Voice.PlayWav(“test”, True, “Any”, dlgid); end if

End Sub

Voicemail Pro Installation and Maintenance

Page 359

IP Office Release 6

15-601063 Issue 22e (16 May 2010)

Page 359
Image 359
Avaya 6 manual PlayWav Method, Wavs directory