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.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
certified/1.8.6
Alec L Davis 15 years ago
parent 5dbe86a3c2
commit 9257e8573b

@ -62,16 +62,25 @@ static int echo_exec(struct ast_channel *chan, const char *data)
if (!f) { if (!f) {
break; break;
} }
f->delivery.tv_sec = 0; switch (f->frametype) {
f->delivery.tv_usec = 0; case AST_FRAME_VOICE:
if (ast_write(chan, f)) { case AST_FRAME_DTMF:
ast_frfree(f); f->delivery.tv_sec = 0;
goto end; f->delivery.tv_usec = 0;
} if (ast_write(chan, f)) {
if ((f->frametype == AST_FRAME_DTMF) && (f->subclass.integer == '#')) { ast_frfree(f);
res = 0; goto end;
ast_frfree(f); }
goto end; if (f->frametype == AST_FRAME_DTMF) {
if (f->subclass.integer == '#') {
res = 0;
ast_frfree(f);
goto end;
}
}
break;
default:
break;
} }
ast_frfree(f); ast_frfree(f);
} }

Loading…
Cancel
Save