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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 18 19:07:41 CST 2008


Author: moy
Date: Tue Nov 18 19:07:40 2008
New Revision: 157640

URL: http://svn.digium.com/view/asterisk?view=rev&rev=157640
Log:
updates to match new openr2 API

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

Modified: team/moy/mfcr2-1.2/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2-1.2/channels/chan_zap.c?view=diff&rev=157640&r1=157639&r2=157640
==============================================================================
--- team/moy/mfcr2-1.2/channels/chan_zap.c (original)
+++ team/moy/mfcr2-1.2/channels/chan_zap.c Tue Nov 18 19:07:40 2008
@@ -4182,7 +4182,7 @@
 #ifdef HAVE_OPENR2
 			if (p->sig == SIG_MFCR2) {
 				ast_log(LOG_DEBUG, "bits changed in chan %d\n", p->channel);
-				openr2_proto_handle_abcd_change(p->r2chan);
+				openr2_chan_handle_cas(p->r2chan);
 				break;
 			}
 #endif
@@ -10053,8 +10053,8 @@
 	/* now that we're ready to get calls, unblock our side and
 	   get current line state */
 	for (i = 0; i < mfcr2->numchans; i++) {
-		openr2_proto_set_idle(mfcr2->pvts[i]->r2chan);
-		openr2_proto_handle_abcd_change(mfcr2->pvts[i]->r2chan);
+		openr2_chan_set_idle(mfcr2->pvts[i]->r2chan);
+		openr2_chan_handle_cas(mfcr2->pvts[i]->r2chan);
 	}
 	while(1) {
 		/* we trust here that the mfcr2 channel list will not ever change once
@@ -10159,7 +10159,7 @@
 			return RESULT_SHOWUSAGE;
 		}
 	}
-	ast_cli(fd, FORMAT, "Chan", "Variant", "Max ANI", "Max DNIS", "ANI First", "Immediate Accept", "Tx State", "Rx State");
+	ast_cli(fd, FORMAT, "Chan", "Variant", "Max ANI", "Max DNIS", "ANI First", "Immediate Accept", "Tx CAS", "Rx CAS");
 	ast_mutex_lock(&iflock);
 	p = iflist;
 	while (p) {
@@ -10193,7 +10193,7 @@
 		ast_cli(fd, FORMAT, channo, openr2_proto_get_variant_string(r2variant), 
 				anino, dnisno, openr2_context_get_ani_first(r2context) ? "Yes" : "No",  
 				openr2_context_get_immediate_accept(r2context) ? "Yes" : "No",
-				openr2_proto_get_tx_state_string(p->r2chan), openr2_proto_get_rx_state_string(p->r2chan));
+				openr2_chan_get_tx_cas_string(p->r2chan), openr2_chan_get_rx_cas_string(p->r2chan));
 		p = p->next;
 	}
 	ast_mutex_unlock(&iflock);
@@ -10325,7 +10325,7 @@
 			p = p->next;
 			continue;
 		}
-		openr2_proto_set_idle(p->r2chan);
+		openr2_chan_set_idle(p->r2chan);
 		if (channo != -1) {
 			break;
 		} else {
@@ -10355,7 +10355,7 @@
 			p = p->next;
 			continue;
 		}
-		openr2_proto_set_blocked(p->r2chan);
+		openr2_chan_set_blocked(p->r2chan);
 		if (channo != -1) {
 			break;
 		} else {
@@ -10621,10 +10621,10 @@
 				char calldir[OR2_MAX_PATH];
 				openr2_context_t *r2context = openr2_chan_get_context(tmp->r2chan);
 				openr2_variant_t r2variant = openr2_context_get_variant(r2context);
-				ast_cli(fd, "MFC/R2 MF State: %s\n", openr2_proto_get_mf_state_string(tmp->r2chan));
-				ast_cli(fd, "MFC/R2 MF Group: %s\n", openr2_proto_get_mf_group_string(tmp->r2chan));
-				ast_cli(fd, "MFC/R2 State: %s\n", openr2_proto_get_r2_state_string(tmp->r2chan));
-				ast_cli(fd, "MFC/R2 Call State: %s\n", openr2_proto_get_call_state_string(tmp->r2chan));
+				ast_cli(fd, "MFC/R2 MF State: %s\n", openr2_chan_get_mf_state_string(tmp->r2chan));
+				ast_cli(fd, "MFC/R2 MF Group: %s\n", openr2_chan_get_mf_group_string(tmp->r2chan));
+				ast_cli(fd, "MFC/R2 State: %s\n", openr2_chan_get_r2_state_string(tmp->r2chan));
+				ast_cli(fd, "MFC/R2 Call State: %s\n", openr2_chan_get_call_state_string(tmp->r2chan));
 				ast_cli(fd, "MFC/R2 Call Files Enabled: %s\n", openr2_chan_get_call_files_enabled(tmp->r2chan) ? "Yes" : "No");
 				ast_cli(fd, "MFC/R2 Variant: %s\n", openr2_proto_get_variant_string(r2variant));
 				ast_cli(fd, "MFC/R2 Max ANI: %d\n", openr2_context_get_max_ani(r2context));
@@ -10636,10 +10636,10 @@
 				ast_cli(fd, "MFC/R2 Forced Release: %s\n", tmp->mfcr2_forced_release ? "Yes" : "No");
 				ast_cli(fd, "MFC/R2 MF Back Timeout: %dms\n", openr2_context_get_mf_back_timeout(r2context));
 				ast_cli(fd, "MFC/R2 R2 Metering Pulse Timeout: %dms\n", openr2_context_get_metering_pulse_timeout(r2context));
-				ast_cli(fd, "MFC/R2 Rx State: %s\n", openr2_proto_get_rx_state_string(tmp->r2chan));
-				ast_cli(fd, "MFC/R2 Tx State: %s\n", openr2_proto_get_tx_state_string(tmp->r2chan));
-				ast_cli(fd, "MFC/R2 MF Tx Signal: %d\n", openr2_proto_get_mf_tx(tmp->r2chan));
-				ast_cli(fd, "MFC/R2 MF Rx Signal: %d\n", openr2_proto_get_mf_rx(tmp->r2chan));
+				ast_cli(fd, "MFC/R2 Rx State: %s\n", openr2_chan_get_rx_cas_string(tmp->r2chan));
+				ast_cli(fd, "MFC/R2 Tx State: %s\n", openr2_chan_get_tx_cas_string(tmp->r2chan));
+				ast_cli(fd, "MFC/R2 MF Tx Signal: %d\n", openr2_chan_get_tx_mf_signal(tmp->r2chan));
+				ast_cli(fd, "MFC/R2 MF Rx Signal: %d\n", openr2_chan_get_rx_mf_signal(tmp->r2chan));
 				ast_cli(fd, "MFC/R2 Call Files Directory: %s\n", openr2_context_get_log_directory(r2context, calldir, sizeof(calldir)));
 			}
 #endif




More information about the asterisk-commits mailing list