summaryrefslogtreecommitdiff
path: root/channels/chan_misdn.c
diff options
context:
space:
mode:
authorChristian Richter <christian.richter@beronet.com>2006-03-20 18:04:05 +0000
committerChristian Richter <christian.richter@beronet.com>2006-03-20 18:04:05 +0000
commit52eb1ad9d14c96df905049d4b3e2193585dbc3e8 (patch)
tree91eb71315e168de7dbbf6e042c92898c12168e6a /channels/chan_misdn.c
parent3cb576801616a22ef57ae3402cab69e33791fd70 (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: https://origsvn.digium.com/svn/asterisk/trunk@13637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r--channels/chan_misdn.c31
1 files changed, 29 insertions, 2 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);