aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_agi.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-20 16:18:07 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-20 16:18:07 +0000
commitbdeac3f78f049fbb26ed5fa35c289de2ff68e826 (patch)
treefb9a0210eae13d787a3ae5c4c41b844c08d29c3c /res/res_agi.c
parentd417e51f7893610a5c84cc5f01c40aa79cc30074 (diff)
add a verbose message to the AGI command, STREAM FILE, similar to the
verbose messages when using Playback, Background, or the GET DATA command (issue #7297, softins) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38021 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_agi.c')
-rw-r--r--res/res_agi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 1624e5455..64c0390eb 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -547,9 +547,14 @@ static int handle_streamfile(struct ast_channel *chan, AGI *agi, int argc, char
struct ast_filestream *vfs;
long sample_offset = 0;
long max_length;
+ char *edigits = "";
if (argc < 4 || argc > 5)
return RESULT_SHOWUSAGE;
+
+ if (argv[3])
+ edigits = argv[3];
+
if ((argc > 4) && (sscanf(argv[4], "%ld", &sample_offset) != 1))
return RESULT_SHOWUSAGE;
@@ -563,6 +568,9 @@ static int handle_streamfile(struct ast_channel *chan, AGI *agi, int argc, char
if (vfs)
ast_log(LOG_DEBUG, "Ooh, found a video stream, too\n");
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Playing '%s' (escape_digits=%s) (sample_offset %ld)\n", argv[2], edigits, sample_offset);
+
ast_seekstream(fs, 0, SEEK_END);
max_length = ast_tellstream(fs);
ast_seekstream(fs, sample_offset, SEEK_SET);
@@ -600,7 +608,7 @@ static int handle_getoption(struct ast_channel *chan, AGI *agi, int argc, char *
long sample_offset = 0;
long max_length;
int timeout = 0;
- char *edigits = NULL;
+ char *edigits = "";
if ( argc < 4 || argc > 5 )
return RESULT_SHOWUSAGE;