[asterisk-commits] russell: trunk r38021 - /trunk/res/res_agi.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Jul 20 09:18:08 MST 2006


Author: russell
Date: Thu Jul 20 11:18:07 2006
New Revision: 38021

URL: http://svn.digium.com/view/asterisk?rev=38021&view=rev
Log:
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)

Modified:
    trunk/res/res_agi.c

Modified: trunk/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_agi.c?rev=38021&r1=38020&r2=38021&view=diff
==============================================================================
--- trunk/res/res_agi.c (original)
+++ trunk/res/res_agi.c Thu Jul 20 11:18:07 2006
@@ -547,9 +547,14 @@
 	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 @@
 	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 @@
 	long sample_offset = 0;
 	long max_length;
 	int timeout = 0;
-	char *edigits = NULL;
+	char *edigits = "";
 
 	if ( argc < 4 || argc > 5 )
 		return RESULT_SHOWUSAGE;



More information about the asterisk-commits mailing list