AsterNet Class Library (Sandcastle documentation)

| AGIScript ControlStreamFile Method (String, String, Int32, String, String, String)

Plays the given file, allowing playback to be interrupted by the given digits, if any, and allows the listner to control the stream.
If offset is provided then the audio will seek to sample offset before play starts.
Returns 0 if playback completes without a digit being pressed, or the ASCII numerical value of the digit if one was pressed, or -1 on error or if the channel was disconnected.
Remember, the file extension must not be included in the filename.
Available since Asterisk 1.2

Namespace: AsterNET.FastAGI
Assembly: AsterNET (in AsterNET.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy

    protected int ControlStreamFile(
    	string file,
    	string escapeDigits,
    	int offset,
    	string forwardDigit,
    	string rewindDigit,
    	string pauseDigit
    )

    Protected Function ControlStreamFile (
    	file As String,
    	escapeDigits As String,
    	offset As Integer,
    	forwardDigit As String,
    	rewindDigit As String,
    	pauseDigit As String
    ) As Integer

    protected:
    int ControlStreamFile(
    	String^ file,
    	String^ escapeDigits,
    	int offset,
    	String^ forwardDigit,
    	String^ rewindDigit,
    	String^ pauseDigit
    )

    member ControlStreamFile :
            file : string *
            escapeDigits : string *
            offset : int *
            forwardDigit : string *
            rewindDigit : string *
            pauseDigit : string -> int

#### Parameters

file
  Type: System
  String
  the name of the file to stream, must not include extension.
escapeDigits
  Type: System
  String
  contains the digits that allow the user to interrupt this command.
offset
  Type: System
  Int32
  the offset samples to skip before streaming.
forwardDigit
  Type: System
  String
  the digit for fast forward.
rewindDigit
  Type: System
  String
  the digit for rewind.
pauseDigit
  Type: System
  String
  the digit for pause and unpause.

#### Return Value

Type: Int32
result code
See Also

#### Reference

AGIScript Class
ControlStreamFile Overload
AsterNET.FastAGI Namespace
AsterNET.FastAGI.Command
ControlStreamFileCommand