diff options
Diffstat (limited to 'apps/app_waitforring.c')
-rw-r--r-- | apps/app_waitforring.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/app_waitforring.c b/apps/app_waitforring.c index c4cea20e8..a136701d5 100644 --- a/apps/app_waitforring.c +++ b/apps/app_waitforring.c @@ -57,6 +57,7 @@ static int waitforring_exec(struct ast_channel *chan, void *data) { struct ast_module_user *u; struct ast_frame *f; + struct ast_silence_generator *silgen = NULL; int res = 0; int ms; @@ -67,6 +68,10 @@ static int waitforring_exec(struct ast_channel *chan, void *data) u = ast_module_user_add(chan); + if (ast_opt_transmit_silence) { + silgen = ast_channel_start_silence_generator(chan); + } + ms *= 1000; while(ms > 0) { ms = ast_waitfor(chan, ms); @@ -114,6 +119,10 @@ static int waitforring_exec(struct ast_channel *chan, void *data) } ast_module_user_remove(u); + if (silgen) { + ast_channel_stop_silence_generator(chan, silgen); + } + return res; } |