ast_log(LOG_DEBUG, "Prodding channel '%s'\n", chan->name);
a.subclass = chan->rawwriteformat;
a.data = nothing + AST_FRIENDLY_OFFSET;
- a.src = "ast_prod";
+ a.src = "ast_prod"; /* this better match check in ast_write */
if (ast_write(chan, &a))
ast_log(LOG_WARNING, "Prodding channel '%s' failed\n", chan->name);
}
res = 0; /* XXX explain, why 0 ? */
goto done;
}
- if (chan->generatordata) {
- if (ast_test_flag(chan, AST_FLAG_WRITE_INT))
- ast_deactivate_generator(chan);
- else {
+ if (chan->generatordata && strcasecmp(fr->src, "ast_prod")) {
+ if (ast_test_flag(chan, AST_FLAG_WRITE_INT)) {
+ ast_deactivate_generator(chan);
+ } else {
if (fr->frametype == AST_FRAME_DTMF_END) {
/* There is a generator running while we're in the middle of a digit.
* It's probably inband DTMF, so go ahead and pass it so it can