stream file

Usage: STREAM FILE <filename> <escape digits> [sample offset]

Send the given file, allowing playback to be interrupted by the given digits, if any.

Use double quotes for the digits if you wish none to be permitted.

If sample offset is provided then the audio will seek to sample offset before play starts.

Remember, the file extension must not be included in the filename.

failure: 200 result=-1 endpos=<sample offset>
failure on open: 200 result=0 endpos=0
success: 200 result=0 endpos=<offset>
digit pressed: 200 result=<digit> endpos=<offset>

<offset> is the stream position streaming stopped. If it equals <sample offset> there was probably an error.
<digit> is the ascii code for the digit pressed.


STREAM FILE is known to behave inconsistently, especially when used in conjuction with other languages, i.e. Set(LANGUAGE()=xy).
Workaround: Use EXEC PLAYBACK instead.
STREAM FILE works correctly with respect to languages on 1.6, so use please it! Background has the side effect of jumping to an extension if there is a matching one.

Go back to Asterisk AGI
Created by: pinhole, Last modification: Wed 23 of Sep, 2009 (15:58 UTC) by 6150frank
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+