juke_box_start_music command

Starts playing a tune.

Input parameters

char music_title[31];

Output parameters

long rc;

Description

This command tells the Juke_Box custom server to start playing a tune. Use ReceiveData to check the return values. Possible return values are shown here using the symbolic names defined in the jb_error.h header-file in the Juke_Box custom server source directory, $VAE/db/current_dir/ca/juke_box_dir.

Use this command only after the call has been set up and before it terminates.

On SendData, we recommend that you use a value of 10 seconds for the Timeout parameter.

Parameters

music_title
This character string must exactly match the music title configured earlier by the juke_box_configure_music command or a music title in the configuration file.

Return codes

0
JB_NO_ERROR

Successful. The tune starts playing. Use the ControlMusic state table action to control the fade time and volume. The list of available music for the relevant trunk will be updated to contain this music title. You can view the list of available music (that is, tunes that are currently playing) from the Blueworx Voice Response System Monitor.

1000
JB_ERROR_MUSIC_NOT_CONFIGURED

The music title is not known to the Juke_Box custom server. Check that the music title exactly matches the title in the configuration file, or the music title configured dynamically by an earlier request.

1001
JB_ERROR_COULD_NOT_START_PLAYER

The player program could not be started. Possible causes are:

  • The Juke_Box custom server does not have enough memory
  • The player program name is invalid, or the path name is incorrect
  • The maximum number of user processes (maxuproc) has been reached, no new processes can be started.
1020
JB_ERROR_PLAYER_DIED

The Juke_Box custom server successfully started the player process, but the player process terminated before it reported it had initialized correctly.

Other
The music player program can pass return codes to your state table via the Juke_Box custom server. These errors are defined in one of the following places:
  • In /usr/include/sys/errno.h 
  • In juke_box_dir/jb_error.h  
  • Internally in the music player program

In your state table, treat this as other failures, that is, if a start request fails, do not issue a corresponding stop request.