--- apps/app_readexten.c.orig 2007-11-21 22:50:04.000000000 -0500 +++ apps/app_readexten.c 2009-05-22 11:11:44.000000000 -0400 @@ -60,7 +60,7 @@ " option options are:\n" " s - Return immediately if the channel is not answered,\n" " i - Play filename as an indication tone from your\n" -" indications.conf\n" +" indications.conf or as a \"|\" separated tone list.\n" " n - Read digits even if the channel is not answered.\n" " timeout An integer number of seconds to wait for a digit response. If\n" " greater than 0, that value will override the default timeout.\n\n" @@ -151,9 +151,16 @@ ast_stopstream(chan); if (ts && ts->data[0]) + /* Have option i and found an indication */ res = ast_playtones_start(chan, 0, ts->data, 0); - else if (arglist.filename) - res = ast_streamfile(chan, arglist.filename, chan->language); + else if (arglist.filename) { + if (ast_test_flag(&flags, OPT_INDICATION)) + /* Option i, no indication. Tone list */ + res = ast_playtones_start(chan, 0, arglist.filename, 0); + else + res = ast_streamfile(chan, arglist.filename, chan->language); + + } for (x = 0; x < maxdigits; x++) { ast_debug(3, "extension so far: '%s', timeout: %d\n", exten, timeout);