aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralecdavis <alecdavis@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-02 09:05:43 +0000
committeralecdavis <alecdavis@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-02 09:05:43 +0000
commit0bcb9706a461050ed509639d8d73eb3b5fc8fdf5 (patch)
tree9cbec1f0552c685e3bbf310855635dc5ce22fc2b
parentd032ffdd8a1769b947291ef2bfcf8fd7d53e5c7a (diff)
fixes ability to exit echo app
when called from a ISDN channel, null frames prevent '#' exit. Now only echo back VOICE and DTMF frames (issue #16880) Reported by: alecdavis Patches: echo_exit_1-6-1.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@249844 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_echo.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/apps/app_echo.c b/apps/app_echo.c
index 8b0d21f06..8c56cd534 100644
--- a/apps/app_echo.c
+++ b/apps/app_echo.c
@@ -62,16 +62,23 @@ static int echo_exec(struct ast_channel *chan, void *data)
if (!f) {
break;
}
- f->delivery.tv_sec = 0;
- f->delivery.tv_usec = 0;
- if (ast_write(chan, f)) {
- ast_frfree(f);
- goto end;
- }
- if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#')) {
- res = 0;
- ast_frfree(f);
- goto end;
+ switch (f->frametype) {
+ case AST_FRAME_VOICE:
+ case AST_FRAME_DTMF:
+ f->delivery.tv_sec = 0;
+ f->delivery.tv_usec = 0;
+ if (ast_write(chan, f)) {
+ ast_frfree(f);
+ goto end;
+ }
+ if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#')) {
+ res = 0;
+ ast_frfree(f);
+ goto end;
+ }
+ break;
+ default:
+ break;
}
ast_frfree(f);
}