[svn-commits] branch crichter/0.3.0 - r8185 /team/crichter/0.3.0/channels/misdn/isdn_lib.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Jan 18 06:15:03 MST 2006


Author: crichter
Date: Wed Jan 18 07:15:01 2006
New Revision: 8185

URL: http://svn.digium.com/view/asterisk?rev=8185&view=rev
Log:
added debugging for outgoing and incoming facilities

Modified:
    team/crichter/0.3.0/channels/misdn/isdn_lib.c

Modified: team/crichter/0.3.0/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/misdn/isdn_lib.c?rev=8185&r1=8184&r2=8185&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn/isdn_lib.c (original)
+++ team/crichter/0.3.0/channels/misdn/isdn_lib.c Wed Jan 18 07:15:01 2006
@@ -2606,6 +2606,26 @@
 	return NULL;
 }
 
+
+char *fac2str (enum facility_type type) {
+	struct arr_el { 
+		enum facility_type p; 
+		char *s ; 
+	} arr[] = {
+		{ FACILITY_NONE, "FAC_NONE" },
+		{ FACILITY_CALLDEFLECT, "FAC_CALLDEFLECT"},
+		{ FACILITY_CENTREX, "FAC_CENTREX"}
+	};
+	
+	enum facility_type tmp;
+	int i;
+	
+	for (i=0; i < sizeof(arr)/sizeof( struct arr_el) ; i ++)
+		if ( arr[i].p==type) return arr[i].s;
+	
+	return "FAC_UNKNOWN";
+}
+
 void misdn_lib_log_ies(struct misdn_bchannel *bc)
 {
 	if (!bc) return;
@@ -2616,6 +2636,8 @@
 	
 
 	cb_log(2, stack->port, " --> mode:%s cause:%d ocause:%d rad:%s\n", stack->nt?"NT":"TE", bc->cause, bc->out_cause, bc->rad);
+	
+	cb_log(3, stack->port, " --> facility:%s out_facility:%s\n",fac2str(bc->fac_type),fac2str(bc->out_fac_type));
 	
 	cb_log(2, stack->port,
 	       " --> info_dad:%s onumplan:%c dnumplan:%c rnumplan:%c\n",



More information about the svn-commits mailing list