aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorcrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-20 18:04:05 +0000
committercrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-20 18:04:05 +0000
commit24baf4cf919314e9f63b030f845e63abcb526d7e (patch)
tree91eb71315e168de7dbbf6e042c92898c12168e6a /channels
parent7449fa65a26481ec5dc25b6e87eae4ab0ae35462 (diff)
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
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@13637 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_misdn.c31
-rw-r--r--channels/misdn/chan_misdn_config.h1
-rw-r--r--channels/misdn/isdn_lib.c4
-rw-r--r--channels/misdn_config.c1
4 files changed, 33 insertions, 4 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 4290a30e1..6d517c32c 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -1105,6 +1105,21 @@ static int update_config (struct chan_list *ch, int orig)
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;
@@ -1244,7 +1259,19 @@ static int read_config(struct chan_list *ch, int orig) {
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));
@@ -1573,7 +1600,7 @@ static int misdn_call(struct ast_channel *ast, char *dest, int timeout)
/* update screening and presentation */
update_config(ch,ORG_AST);
-
+
/* fill in some ies from channel vary*/
import_ies(ast, newbc);
diff --git a/channels/misdn/chan_misdn_config.h b/channels/misdn/chan_misdn_config.h
index d30e1482c..9717e7846 100644
--- a/channels/misdn/chan_misdn_config.h
+++ b/channels/misdn/chan_misdn_config.h
@@ -27,6 +27,7 @@ enum misdn_cfg_elements {
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[] */
diff --git a/channels/misdn/isdn_lib.c b/channels/misdn/isdn_lib.c
index a699d7f8a..b0e9477d0 100644
--- a/channels/misdn/isdn_lib.c
+++ b/channels/misdn/isdn_lib.c
@@ -818,9 +818,11 @@ int setup_bc(struct misdn_bchannel *bc)
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 @@ int setup_bc(struct misdn_bchannel *bc)
bc->upset=1;
-
manager_bchannel_deactivate(bc);
-
return 0;
}
diff --git a/channels/misdn_config.c b/channels/misdn_config.c
index fa712d523..ee3144159 100644
--- a/channels/misdn_config.c
+++ b/channels/misdn_config.c
@@ -88,6 +88,7 @@ static const struct misdn_cfg_spec port_spec[] = {
{ "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 },