[asterisk-commits] moy: branch moy/mfcr2 r118255 - /team/moy/mfcr2/channels/chan_zap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 26 00:41:11 CDT 2008


Author: moy
Date: Mon May 26 00:40:56 2008
New Revision: 118255

URL: http://svn.digium.com/view/asterisk?view=rev&rev=118255
Log:
enable echo cancel when accepting a call and fixed bug with pseudo channel due to trunk merging

Modified:
    team/moy/mfcr2/channels/chan_zap.c

Modified: team/moy/mfcr2/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/channels/chan_zap.c?view=diff&rev=118255&r1=118254&r2=118255
==============================================================================
--- team/moy/mfcr2/channels/chan_zap.c (original)
+++ team/moy/mfcr2/channels/chan_zap.c Mon May 26 00:40:56 2008
@@ -1362,13 +1362,14 @@
 	}
 	ast_mutex_unlock(&mfcr2->monitored_count_lock);
 }
-
+static void zt_enable_ec(struct zt_pvt *p);
 static void zt_r2_on_call_accepted(openr2_chan_t *r2chan)
 {
 	struct zt_pvt *p = NULL;
 	struct ast_channel *c = NULL;
 	ast_log(LOG_NOTICE, "MFC/R2 call has been accepted on chan %d\n", openr2_chan_get_number(r2chan));
 	p = openr2_chan_get_client_data(r2chan);
+	zt_enable_ec(p);
 	if (OR2_DIR_BACKWARD == openr2_chan_get_direction(r2chan)) {
 		c = zt_new(p, AST_STATE_RING, 1, SUB_REAL, ZT_LAW_ALAW, 0);
 		if (c) {
@@ -8791,7 +8792,7 @@
 			}
 #endif
 #ifdef HAVE_OPENR2
-			if (conf->chan.sig == SIG_MFCR2 && !reloading) {
+			if (chan_sig == SIG_MFCR2 && !reloading) {
 				char logdir[OR2_MAX_LOGDIR];
 				struct zt_mfcr2 *zap_r2;
 				int threshold = 0;
@@ -8833,7 +8834,7 @@
 					tmp->r2chan = openr2_chan_new_from_fd(zap_r2->protocol_context, tmp->subs[SUB_REAL].zfd, 
 							&tmp->mf_tx_state, NULL);
 					if (!tmp->r2chan) {
-						ast_log(LOG_ERROR, "Cannot create OpenR2 protocol context.\n");
+						ast_log(LOG_ERROR, "Cannot create OpenR2 channel.\n");
 						destroy_zt_pvt(&tmp);
 						return NULL;
 					}




More information about the asterisk-commits mailing list