add the ability to be able to echo DTMF_BEGIN/END, HTML, and IMAGE frames, too

(issue #7193, Mithraen, with some mods)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Russell Bryant 19 years ago
parent d2872c914d
commit 55d67e71f1

@ -72,26 +72,30 @@ static int echo_exec(struct ast_channel *chan, void *data)
break; break;
f->delivery.tv_sec = 0; f->delivery.tv_sec = 0;
f->delivery.tv_usec = 0; f->delivery.tv_usec = 0;
if (f->frametype == AST_FRAME_VOICE) { switch (f->frametype) {
if (ast_write(chan, f)) case AST_FRAME_DTMF:
break; case AST_FRAME_DTMF_END:
} else if (f->frametype == AST_FRAME_VIDEO) {
if (ast_write(chan, f))
break;
} else if (f->frametype == AST_FRAME_DTMF) {
if (f->subclass == '#') { if (f->subclass == '#') {
res = 0; res = 0;
break; ast_frfree(f);
} else { goto end;
if (ast_write(chan, f)) }
break; /* fall through */
case AST_FRAME_DTMF_BEGIN:
case AST_FRAME_VOICE:
case AST_FRAME_VIDEO:
case AST_FRAME_TEXT:
case AST_FRAME_HTML:
case AST_FRAME_IMAGE:
if (ast_write(chan, f)) {
ast_frfree(f);
goto end;
} }
} }
ast_frfree(f); ast_frfree(f);
} }
end:
LOCAL_USER_REMOVE(u); LOCAL_USER_REMOVE(u);
return res; return res;
} }

Loading…
Cancel
Save