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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 4 12:02:22 CDT 2008


Author: moy
Date: Fri Jul  4 12:02:21 2008
New Revision: 128083

URL: http://svn.digium.com/view/asterisk?view=rev&rev=128083
Log:
added MFCR2_CALL_MODE support

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=128083&r1=128082&r2=128083
==============================================================================
--- team/moy/mfcr2/channels/chan_zap.c (original)
+++ team/moy/mfcr2/channels/chan_zap.c Fri Jul  4 12:02:21 2008
@@ -1340,7 +1340,7 @@
 				p->channel, p->exten, p->context);
 		openr2_chan_disconnect_call(r2chan, OR2_CAUSE_UNALLOCATED_NUMBER);
 	} else {
-		openr2_chan_accept_call(r2chan, OR2_ACCEPT_WITH_CHARGE);
+		openr2_chan_accept_call(r2chan, OR2_CALL_WITH_CHARGE);
 	}	
 }
 
@@ -1367,7 +1367,7 @@
 	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)
+static void zt_r2_on_call_accepted(openr2_chan_t *r2chan, openr2_call_mode_t mode)
 {
 	struct zt_pvt *p = NULL;
 	struct ast_channel *c = NULL;
@@ -1387,6 +1387,11 @@
 		}
 		pbx_builtin_setvar_helper(c, "MFCR2_CATEGORY", openr2_proto_get_category_string(p->mfcr2_recvd_category));
 	} else {
+		if (p->owner) {
+			pbx_builtin_setvar_helper(p->owner, "MFCR2_CALL_MODE", openr2_proto_get_call_mode_string(mode));
+		} else {
+			ast_log(LOG_WARNING, "odd ... we should have an owner, right? right?!");
+		}	
 		ast_log(LOG_NOTICE, "Call accepted on forward channel %d\n", p->channel);
 		p->subs[SUB_REAL].needringing = 1;
 		p->dialing = 0;




More information about the asterisk-commits mailing list