[asterisk-commits] branch crichter/0.3.0 r13636 - in /team/crichter/0.3.0: channels/ channels/mi...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Mar 20 11:03:21 MST 2006


Author: crichter
Date: Mon Mar 20 12:03:16 2006
New Revision: 13636

URL: http://svn.digium.com/view/asterisk?rev=13636&view=rev
Log:
removed dynamic switching from transparent to hdlc mode. Instead we've got a config option hdlc=yes now which enables the hdlc controller for a data call 

Modified:
    team/crichter/0.3.0/channels/chan_misdn.c
    team/crichter/0.3.0/channels/misdn/chan_misdn_config.h
    team/crichter/0.3.0/channels/misdn/isdn_lib.c
    team/crichter/0.3.0/channels/misdn_config.c
    team/crichter/0.3.0/configs/misdn.conf.sample

Modified: team/crichter/0.3.0/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/chan_misdn.c?rev=13636&r1=13635&r2=13636&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/chan_misdn.c (original)
+++ team/crichter/0.3.0/channels/chan_misdn.c Mon Mar 20 12:03:16 2006
@@ -1104,6 +1104,21 @@
 	
 	chan_misdn_log(1,port,"update_config: Getting Config\n");
 
+
+	int hdlc=0;
+	misdn_cfg_get( port, MISDN_CFG_HDLC, &hdlc, sizeof(int));
+	
+	if (hdlc) {
+		switch (bc->capability) {
+		case INFO_CAPABILITY_DIGITAL_UNRESTRICTED:
+		case INFO_CAPABILITY_DIGITAL_RESTRICTED:
+			chan_misdn_log(1,bc->port," --> CONF HDLC\n");
+			bc->hdlc=1;
+			break;
+		}
+		
+	}
+	
 	
 	int pres, screen;
 			
@@ -1241,7 +1256,19 @@
 
 	misdn_cfg_get( port, MISDN_CFG_NEED_MORE_INFOS, &bc->need_more_infos, sizeof(int));
 	
-
+	int hdlc=0;
+	misdn_cfg_get( port, MISDN_CFG_HDLC, &hdlc, sizeof(int));
+	
+	if (hdlc) {
+		switch (bc->capability) {
+		case INFO_CAPABILITY_DIGITAL_UNRESTRICTED:
+		case INFO_CAPABILITY_DIGITAL_RESTRICTED:
+			chan_misdn_log(1,bc->port," --> CONF HDLC\n");
+			bc->hdlc=1;
+			break;
+		}
+		
+	}
 	/*Initialize new Jitterbuffer*/
 	{
 		misdn_cfg_get( port, MISDN_CFG_JITTERBUFFER, &ch->jb_len, sizeof(int));
@@ -1570,7 +1597,7 @@
 
 		/* update screening and presentation */ 
 		update_config(ch,ORG_AST);
-
+		
 		/* fill in some ies from channel vary*/
 		import_ies(ast, newbc);
 		

Modified: team/crichter/0.3.0/channels/misdn/chan_misdn_config.h
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/misdn/chan_misdn_config.h?rev=13636&r1=13635&r2=13636&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn/chan_misdn_config.h (original)
+++ team/crichter/0.3.0/channels/misdn/chan_misdn_config.h Mon Mar 20 12:03:16 2006
@@ -27,6 +27,7 @@
 	MISDN_CFG_TXGAIN,              /* int */
 	MISDN_CFG_TE_CHOOSE_CHANNEL,   /* int (bool) */
 	MISDN_CFG_PMP_L1_CHECK,        /* int (bool) */
+	MISDN_CFG_HDLC,                /* int (bool) */
 	MISDN_CFG_CONTEXT,             /* char[] */
 	MISDN_CFG_LANGUAGE,            /* char[] */
 	MISDN_CFG_MUSICCLASS,            /* char[] */

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=13636&r1=13635&r2=13636&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn/isdn_lib.c (original)
+++ team/crichter/0.3.0/channels/misdn/isdn_lib.c Mon Mar 20 12:03:16 2006
@@ -818,9 +818,11 @@
 	int channel=bc->channel-1-(bc->channel>16);
 	int b_stid=stack->b_stids[channel>=0?channel:0];
 
+#if 0
 	if (bc->hdlc) {
 		clean_up_bc(bc);
 	}
+#endif
 	
 	if (bc->upset) {
 		cb_log(4, stack->port, "$$$ bc already upsetted stid :%x\n", b_stid);
@@ -946,9 +948,7 @@
 	
 	bc->upset=1;
 	
-	
 	manager_bchannel_deactivate(bc);
-	
 	return 0;
 }
 

Modified: team/crichter/0.3.0/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/misdn_config.c?rev=13636&r1=13635&r2=13636&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn_config.c (original)
+++ team/crichter/0.3.0/channels/misdn_config.c Mon Mar 20 12:03:16 2006
@@ -88,6 +88,7 @@
 	{ "txgain", MISDN_CFG_TXGAIN, MISDN_CTYPE_INT, "0", NONE },
 	{ "te_choose_channel", MISDN_CFG_TE_CHOOSE_CHANNEL, MISDN_CTYPE_BOOL, "no", NONE },
 	{ "pmp_l1_check", MISDN_CFG_PMP_L1_CHECK, MISDN_CTYPE_BOOL, "yes", NONE },
+	{ "hdlc", MISDN_CFG_HDLC, MISDN_CTYPE_BOOL, "no", NONE },
 	{ "context", MISDN_CFG_CONTEXT, MISDN_CTYPE_STR, "default", NONE },
 	{ "language", MISDN_CFG_LANGUAGE, MISDN_CTYPE_STR, "en", NONE },
 	{ "musicclass", MISDN_CFG_MUSICCLASS, MISDN_CTYPE_STR, "default", NONE },

Modified: team/crichter/0.3.0/configs/misdn.conf.sample
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/configs/misdn.conf.sample?rev=13636&r1=13635&r2=13636&view=diff
==============================================================================
--- team/crichter/0.3.0/configs/misdn.conf.sample (original)
+++ team/crichter/0.3.0/configs/misdn.conf.sample Mon Mar 20 12:03:16 2006
@@ -284,6 +284,12 @@
 ;
 jitterbuffer_upper_threshold=0
 
+
+;
+; change this to yes, if you want to bridge a mISDN data channel to 
+; another channel type or to an application.
+;
+hdlc=no
 
 [intern]
 ; define your ports, e.g. 1,2 (depends on mISDN-driver loading order) 



More information about the asterisk-commits mailing list