aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-12 17:26:10 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-12 17:26:10 +0000
commitb9c441a77fd5e2c8c97d595c24bc95809241ec2e (patch)
tree6a9e94d6e5a7a92deb106f60f31139fbae94ee4d
parente8a21b70a3fc9d15c68f8c77f9e58d523cf07aca (diff)
Merged revisions 275682 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r275682 | jpeeler | 2010-07-12 12:21:01 -0500 (Mon, 12 Jul 2010) | 18 lines Merged revisions 275665 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r275665 | jpeeler | 2010-07-12 11:58:39 -0500 (Mon, 12 Jul 2010) | 11 lines Change ast_write to not stop generator when called from ast_prod. For SIP channels configured with the progressinband option on, the ringback was being immediately stopped. This problem was due to ast_prod being moved for a deadlock fix in 259858. Prodding the channel after setting up the generator triggered the check in ast_write to stop the generator. The fix here should write the frame the same as was done before the call to ast_prod was moved. (closes issue #17372) Reported by: tech_admin ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@275706 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/channel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/channel.c b/main/channel.c
index 2e58c42aa..71081bde1 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3454,7 +3454,7 @@ int ast_prod(struct ast_channel *chan)
ast_debug(1, "Prodding channel '%s'\n", chan->name);
a.subclass = chan->rawwriteformat;
a.data.ptr = 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);
}
@@ -3604,10 +3604,10 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
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