[asterisk-commits] moy: branch 1.8 r299531 - in /branches/1.8: ./ channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 23 02:53:06 UTC 2010


Author: moy
Date: Wed Dec 22 20:53:02 2010
New Revision: 299531

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=299531
Log:
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
........

Modified:
    branches/1.8/   (props changed)
    branches/1.8/channels/chan_dahdi.c

Propchange: branches/1.8/
------------------------------------------------------------------------------
Binary property 'branch-1.6.2-merged' - no diff available.

Modified: branches/1.8/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_dahdi.c?view=diff&rev=299531&r1=299530&r2=299531
==============================================================================
--- branches/1.8/channels/chan_dahdi.c (original)
+++ branches/1.8/channels/chan_dahdi.c Wed Dec 22 20:53:02 2010
@@ -1188,6 +1188,7 @@
 	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 @@
 			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 @@
 #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
 




More information about the asterisk-commits mailing list