PlayUserGreeting

Purpose

Use PlayUserGreeting to play the digitized voice data that speaks the greeting associated with an application profile ID and a greeting ID.


A screen capture of the Action PlayUserGreeting window

Description

PlayUserGreeting can play back the user greeting either from the temporary workspace in which the system holds it until it is saved or from disk.

For the PlayUserGreeting action to succeed, the voice channel must already be connectedthis is achieved through the successful completion of either an AnswerCall or a Makecall action. For an incoming call, the voice channel can also be connected prior to an AnswerCall action, if the system parameter Connect Voice Channel Before Answer is enabled (this parameter is only available if you are logged on as field).

It is not necessary to set any system variables before using PlayUserGreeting. Do not save data at the same time it is being played. If you do so, the Play action will fail.

While a greeting is playing, the caller can press keys to fast-forward, pause, reverse, or stop. System parameters in the Application Server Interface parameter group set these keys as follows:

Activity

Default Key

System Parameter

Fast forward

9

Forward Key

Pause

8

Pause Key

Reverse

7

Reverse Key

Stop

*

Stop Key

In addition, system parameter SV183 can be used to specify other DTMF keys that can stop the action. See System: Play/Record: Alternate stop keys (RW) (SV183) for more information.

To resume after a pause, the caller must press the pause key again. If the caller does not resume after pressing the pause key (by pressing the pause key again), playing continues when the pause times out. The pause time out is configurable using the Play/Record Voice Maximum Pause (seconds) system parameter in the Blueworx Voice Response parameter group. The default value is 10 seconds.

When interrupt by voice detection is active, the caller can interrupt PlayUserGreeting by speaking.

If a fax tone is detected, the action is terminated.

PlayUserGreeting can be used with background music to produce a voice-over effect. If you don't want background music playing at the same time as the prompt, precede this action with a ControlMusic action and set the fade time to 100.

Notes:

  1. All user input and other events are flushed both before this action starts, and when it completes. As a result, any queued DTMF, voice interrupt detection, or fax tones are lost.
  2. You can play a user greeting from Voice in Workspace only if you created it with RecordUserGreeting in your current session and have not saved it. The temporary workspace is cleared when you end the session.
  3. The user greeting can exist in either compressed or uncompressed format. The PlayUserGreeting action plays the user greeting, whatever its format, although there is a small increase in execution time if the compression format of the user greeting does not match the value of the User Greeting Compression Type system parameter.

Parameters

The parameters for PlayUserGreeting identify the user greeting to play and where it is located. This action plays the greeting either from workspace (Voice in Workspace) or from disk (Voice on Disk). If the voice data is in workspace, there are no parameters. If the greeting is stored on disk, the parameters are:

Possible results

PlayUserGreeting can have one of the following results:

Succeeded
The greeting was found and successfully played to the caller, either partly or in full (a truncated greeting that contains at least 128 bytes of the original data is still playedif more than 200 milliseconds of voice is lost a warning message is raised).

The system variable System: Action additional information (SV180) is set to one of the following values:

0
The action completed without interruption.
1
The caller pressed a DTMF key; play was interrupted.
2
Voice was detected; play was interrupted. Use WaitEvent to flush the voice event from the queue (see WaitEvent). Detection of voice interrupt is enabled by setting SV217 to 1 (see System: Voice interrupt detection: On/Off (RW) (SV217) ).
3
Fax tone was detected; play was interrupted. Detection of fax tone is enabled by setting SV227for possible values see System: Fax detection (SV227).
4
A custom server event occurred; play was interrupted. To retrieve the event, use the WaitEvent state table action (see WaitEvent). Detection of a custom server event is enabled by setting SV546 to 1 (see System: Host Interrupt Detection: On/Off (RW) (SV546) ).
Note: If you want to use the information in SV180, you must check it immediately after a state table action because it is reset by other actions.
Voice Channel Problem
The greeting was not played, because there was a problem with the voice channel on which it was supposed to be played.
Voice Record Not Found
The greeting does not exist, or has been truncated to less than 128 bytes of data.
Caller Hung Up
The caller has hung up.

ASCII syntax

When using an ASCII editor, code this action with these parameters in the following order:

  1. "IN_WORKSPACE"

Or:

  1. "ON_DISK"
  2. Profile ID
  3. Greeting ID

For example:

label: "Check Edges"
        PlayUserGreeting("IN_WORKSPACE")
          edge EDGE_PLAYVCE_COMPLETED:   completed
          edge EDGE_PLAYVCE_LINE_PROBLEM:       line_problem
          edge EDGE_PLAYVCE_NOT_FOUND:  not_found
          edge EDGE_HUP:                                  hup
        ;
        PlayUserGreeting("ON_DISK", SV20, SV108); # SV20...Caller Profile ID
            # SV108...Caller Greeting ID

The parameters and edges are described above under "Parameters" and "Possible results". See Testing a state table using the debugger.