maxdigits have been entered (without requiring the user to press the <literal>#</literal> key).
Defaults to 0 - no limit - wait for the user press the <literal>#</literal> key.</para>
</parameter>
- <parameter name="prompt" required="false">
- <para>Override the agent-pass prompt file.</para>
+ <parameter name="prompt" required="false" argsep="&">
+ <para>Override the "agent-pass" sound file. Can be
+ an ampersand separated list of filenames. If the filename
+ is a relative filename (it does not begin with a slash), it
+ will be searched for in the Asterisk sounds directory. If the
+ filename is able to be parsed as a URL, Asterisk will
+ download the file and then begin playback on it. To include a
+ literal <literal>&</literal> in the URL you can enclose
+ the URL in single quotes.</para>
+ <argument name="prompt" required="true" />
+ <argument name="prompt2" multiple="true" />
</parameter>
</syntax>
<description>
char *file_copy = ast_strdupa(playback_file);
char *file = NULL;
- while ((file = strsep(&file_copy, "&"))) {
+ while ((file = ast_strsep(&file_copy, '&', AST_STRSEP_STRIP | AST_STRSEP_TRIM))) {
if (ast_stream_and_wait(bridge_channel->chan, file, "")) {
ast_log(LOG_WARNING, "Failed to playback file %s to channel\n", file);
return -1;
char *file_copy = ast_strdupa(playback_file);
char *file = NULL;
- while ((file = strsep(&file_copy, "&"))) {
+ while ((file = ast_strsep(&file_copy, '&', AST_STRSEP_STRIP | AST_STRSEP_TRIM))) {
if (ast_streamfile(bridge_channel->chan, file, ast_channel_language(bridge_channel->chan))) {
ast_log(LOG_WARNING, "Failed to playback file %s to channel\n", file);
return -1;
</synopsis>
<syntax>
<parameter name="filenames" required="true" argsep="&">
+ <para>Ampersand separated list of filenames. If the filename
+ is a relative filename (it does not begin with a slash), it
+ will be searched for in the Asterisk sounds directory. If the
+ filename is able to be parsed as a URL, Asterisk will
+ download the file and then begin playback on it. To include a
+ literal <literal>&</literal> in the URL you can enclose
+ the URL in single quotes.</para>
<argument name="filename" required="true" />
<argument name="filename2" multiple="true" />
</parameter>
char *front;
ast_stopstream(chan);
- while (!res && (front = strsep(&back, "&"))) {
+ while (!res && (front = ast_strsep(&back, '&', AST_STRSEP_STRIP | AST_STRSEP_TRIM))) {
if (option_say)
res = say_full(chan, front, "", ast_channel_language(chan), NULL, -1, -1);
else if (option_mix){
<para><replaceable>URL</replaceable> will be sent to the called party if the channel supports it.</para>
</parameter>
<parameter name="announceoverride" argsep="&">
- <argument name="filename" required="true">
- <para>Announcement file(s) to play to agent before bridging call, overriding the announcement(s)
- configured in <filename>queues.conf</filename>, if any.</para>
- </argument>
- <argument name="filename2" multiple="true" />
+ <para>Announcement file(s) to play to agent before bridging
+ call, overriding the announcement(s) configured in
+ <filename>queues.conf</filename>, if any.</para>
+ <para>Ampersand separated list of filenames. If the filename
+ is a relative filename (it does not begin with a slash), it
+ will be searched for in the Asterisk sounds directory. If the
+ filename is able to be parsed as a URL, Asterisk will
+ download the file and then begin playback on it. To include a
+ literal <literal>&</literal> in the URL you can enclose
+ the URL in single quotes.</para>
+ <argument name="announceoverride" required="true" />
+ <argument name="announceoverride2" multiple="true" />
</parameter>
<parameter name="timeout">
<para>Will cause the queue to fail out after a specified number of
if (!res2 && announce) {
char *front;
char *announcefiles = ast_strdupa(announce);
- while ((front = strsep(&announcefiles, "&"))) {
+ while ((front = ast_strsep(&announcefiles, '&', AST_STRSEP_STRIP | AST_STRSEP_TRIM))) {
if (play_file(peer, front) < 0) {
ast_log(LOG_ERROR, "play_file failed for '%s' on %s\n", front, ast_channel_name(peer));
}
name.</para>
</parameter>
<parameter name="filenames" argsep="&">
- <argument name="filename" required="true">
- <para>file(s) to play before reading digits or tone with option i</para>
- </argument>
+ <para>Ampersand separated list of filenames to play before
+ reading digits or tone with option <literal>i</literal>. If
+ the filename is a relative filename (it does not begin with a
+ slash), it will be searched for in the Asterisk sounds
+ directory. If the filename is able to be parsed as a URL,
+ Asterisk will download the file and then begin playback on
+ it. To include a literal <literal>&</literal> in the URL
+ you can enclose the URL in single quotes.</para>
+ <argument name="filename" required="true" />
<argument name="filename2" multiple="true" />
</parameter>
<parameter name="maxdigits">
char *prompt, *rest = ast_strdupa(prompts);
ast_stopstream(chan);
- while ((prompt = strsep(&rest, "&")) && !ast_stream_and_wait(chan, prompt, "")) {
+ while ((prompt = ast_strsep(&rest, '&', AST_STRSEP_STRIP | AST_STRSEP_TRIM))
+ && !ast_stream_and_wait(chan, prompt, "")) {
ast_stopstream(chan);
}
}
Play a sound file and wait for speech to be recognized.
</synopsis>
<syntax>
- <parameter name="sound_file" required="true" />
+ <parameter name="sound_file" required="true" argsep="&">
+ <para>Ampersand separated list of filenames. If the filename
+ is a relative filename (it does not begin with a slash), it
+ will be searched for in the Asterisk sounds directory. If the
+ filename is able to be parsed as a URL, Asterisk will
+ download the file and then begin playback on it. To include a
+ literal <literal>&</literal> in the URL you can enclose
+ the URL in single quotes.</para>
+ <argument name="sound_file" required="true" />
+ <argument name="sound_file2" multiple="true" />
+ </parameter>
<parameter name="timeout">
<para>Timeout integer in seconds. Note the timeout will only start
once the sound file has stopped playing.</para>
/* Okay it's streaming so go into a loop grabbing frames! */
while (done == 0) {
/* If the filename is null and stream is not running, start up a new sound file */
- if (!quieted && (ast_channel_streamid(chan) == -1 && ast_channel_timingfunc(chan) == NULL) && (filename = strsep(&filename_tmp, "&"))) {
+ if (!quieted
+ && ast_channel_streamid(chan) == -1
+ && ast_channel_timingfunc(chan) == NULL
+ && (filename = ast_strsep(&filename_tmp, '&', AST_STRSEP_STRIP | AST_STRSEP_TRIM))) {
/* Discard old stream information */
ast_stopstream(chan);
/* Start new stream */
prompt = "";
filename = ast_strdupa(prompt);
- while ((front = strsep(&filename, "&"))) {
+ while ((front = ast_strsep(&filename, '&', AST_STRSEP_STRIP | AST_STRSEP_TRIM))) {
if (!ast_strlen_zero(front)) {
res = ast_streamfile(c, front, ast_channel_language(c));
if (res)
</synopsis>
<syntax>
<parameter name="filenames" required="true" argsep="&">
+ <para>Ampersand separated list of filenames. If the filename
+ is a relative filename (it does not begin with a slash), it
+ will be searched for in the Asterisk sounds directory. If the
+ filename is able to be parsed as a URL, Asterisk will
+ download the file and then begin playback on it. To include a
+ literal <literal>&</literal> in the URL you can enclose
+ the URL in single quotes.</para>
<argument name="filename1" required="true" />
<argument name="filename2" multiple="true" />
</parameter>
ast_stopstream(chan); /* Stop anything playing */
/* Stream the list of files */
- while (!res && (front = strsep(&back, "&")) ) {
+ while (!res && (front = ast_strsep(&back, '&', AST_STRSEP_STRIP | AST_STRSEP_TRIM))) {
if ( (res = ast_streamfile(chan, front, args.lang)) ) {
ast_log(LOG_WARNING, "ast_streamfile failed on %s for %s\n", ast_channel_name(chan), (char*)data);
res = 0;