Upgrade 3CX to v18 and get it hosted free!

stream file

Author image
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.

Returns:
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.

Bugs

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

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.