aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormoy <moy@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-23 02:53:02 +0000
committermoy <moy@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-23 02:53:02 +0000
commit8de06aa5faeda918d41ee63a013d31a9e89836a4 (patch)
tree0bd097eb9190e56afeffd588c930d488b4e6cb26 /channels
parent8fc9d71301a5db88592817fab8c7e2f680a41168 (diff)
Merged revisions 299530 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r299530 | moy | 2010-12-22 21:28:37 -0500 (Wed, 22 Dec 2010) | 7 lines Enqueue AST_CONTROL_PROGRESS after AST_CONTROL_RINGING when MFC-R2 calls are accepted (closes issue #18438) Reported by: mariner7 Tested by: moy ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@299531 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 3d0eb4df0..ccd410178 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -1188,6 +1188,7 @@ struct dahdi_pvt {
int mfcr2_forced_release:1;
int mfcr2_dnis_matched:1;
int mfcr2_call_accepted:1;
+ int mfcr2_progress:1;
int mfcr2_accept_on_offer:1;
#endif
/*! \brief DTMF digit in progress. 0 when no digit in progress. */
@@ -5306,6 +5307,8 @@ static int dahdi_call(struct ast_channel *ast, char *rdest, int timeout)
ast_log(LOG_ERROR, "unable to make new MFC/R2 call!\n");
return -1;
}
+ p->mfcr2_call_accepted = 0;
+ p->mfcr2_progress = 0;
ast_setstate(ast, AST_STATE_DIALING);
}
#endif /* HAVE_OPENR2 */
@@ -8683,6 +8686,18 @@ static struct ast_frame *dahdi_read(struct ast_channel *ast)
#ifdef HAVE_OPENR2
if (p->mfcr2) {
openr2_chan_process_event(p->r2chan);
+ if (OR2_DIR_FORWARD == openr2_chan_get_direction(p->r2chan)) {
+ struct ast_frame f = { AST_FRAME_CONTROL, { AST_CONTROL_PROGRESS }, };
+ /* if the call is already accepted and we already delivered AST_CONTROL_RINGING
+ * now enqueue a progress frame to bridge the media up */
+ if (p->mfcr2_call_accepted &&
+ !p->mfcr2_progress &&
+ ast->_state == AST_STATE_RINGING) {
+ ast_log(LOG_DEBUG, "Enqueuing progress frame after R2 accept in chan %d\n", p->channel);
+ ast_queue_frame(p->owner, &f);
+ p->mfcr2_progress = 1;
+ }
+ }
}
#endif