don't play any sounds when using the quiet option (bug #4348)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2-netsec
Russell Bryant 20 years ago
parent 2cd9d4c676
commit dc21f68a95

@ -712,13 +712,15 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
} }
for(;;) { for(;;) {
res = ast_streamfile(chan, "beep", chan->language); if (!silent) {
if (!res) res = ast_streamfile(chan, "beep", chan->language);
res = ast_waitstream(chan, ""); if (!res)
if (res < 0) { res = ast_waitstream(chan, "");
ast_clear_flag(chan, AST_FLAG_SPYING); if (res < 0) {
break; ast_clear_flag(chan, AST_FLAG_SPYING);
} break;
}
}
count = 0; count = 0;
res = ast_waitfordigit(chan, waitms); res = ast_waitfordigit(chan, waitms);

Loading…
Cancel
Save