Skip to content

ControlPlayback()

Synopsis

Play a file with fast forward and rewind.

Description

This application will play back the given filename.

It sets the following channel variables upon completion:

  • CPLAYBACKSTATUS - Contains the status of the attempt as a text string

    • SUCCESS

    • USERSTOPPED

    • REMOTESTOPPED

    • ERROR

  • CPLAYBACKOFFSET - Contains the offset in ms into the file where playback was at when it stopped. '-1' is end of file.

  • CPLAYBACKSTOPKEY - If the playback is stopped by the user this variable contains the key that was pressed.

Syntax

ControlPlayback(filename,[skipms,[ff,[rew,[stop,[pause,[restart,[options]]]]]]])
Arguments
  • filename

  • skipms - This is number of milliseconds to skip when rewinding or fast-forwarding.

  • ff - Fast-forward when this DTMF digit is received. (defaults to '#')

  • rew - Rewind when this DTMF digit is received. (defaults to '*')

  • stop - Stop playback when this DTMF digit is received.

  • pause - Pause playback when this DTMF digit is received.

  • restart - Restart playback when this DTMF digit is received.

  • options

    • o(time)

      • time required - Start at time ms from the beginning of the file.

Generated Version

This documentation was generated from Asterisk branch 22 using version GIT