summaryrefslogtreecommitdiffstats
path: root/extension.c
diff options
context:
space:
mode:
authorSuper User2008-01-19 18:10:46 +0100
committerSuper User2008-01-19 18:10:46 +0100
commit14f76f1e81f0a4e7a63e83136d1ac958bf85c8a5 (patch)
tree981f17ede49ca63cc87eef0fddfcc0f08761d21c /extension.c
parentnew sounds for EFI (diff)
downloadlcr-14f76f1e81f0a4e7a63e83136d1ac958bf85c8a5.tar.gz
lcr-14f76f1e81f0a4e7a63e83136d1ac958bf85c8a5.tar.xz
lcr-14f76f1e81f0a4e7a63e83136d1ac958bf85c8a5.zip
work on unfinished asterisk channel driver (bchannel handling)
modified: Makefile modified: README modified: action.cpp modified: admin_server.c modified: apppbx.cpp modified: apppbx.h new file: bchannel.c new file: bchannel.h renamed: asterisk_client.c -> chan_lcr.c renamed: asterisk_client.h -> chan_lcr.h deleted: channel.c modified: dss1.cpp modified: extension.c modified: extension.h modified: interface.c modified: interface.h modified: joinremote.cpp modified: joinremote.h modified: mISDN.cpp modified: mISDN.h modified: main.h modified: message.h modified: route.c modified: todo.txt
Diffstat (limited to 'extension.c')
-rw-r--r--extension.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/extension.c b/extension.c
index d8d17b4..391bb88 100644
--- a/extension.c
+++ b/extension.c
@@ -468,21 +468,23 @@ int read_extension(struct extension *ext, char *num)
PDEBUG(DEBUG_CONFIG, "given noknocking param unknown: %s\n", param);
}
} else
- if (!strcmp(option,"rxvol"))
+ if (!strcmp(option,"rx_gain")
+ || !strcmp(option,"rxvol"))
{
- ext->rxvol = atoi(param);
- if (ext->rxvol<-8 || ext->rxvol>8)
- ext->rxvol = 0;
+ ext->rx_gain = atoi(param);
+ if (ext->rx_gain<-8 || ext->rx_gain>8)
+ ext->rx_gain = 0;
- PDEBUG(DEBUG_CONFIG, "receive volume: %d\n",ext->rxvol);
+ PDEBUG(DEBUG_CONFIG, "receive volume: %d\n",ext->rx_gain);
} else
- if (!strcmp(option,"txvol"))
+ if (!strcmp(option,"tx_gain")
+ || !strcmp(option,"txvol"))
{
- ext->txvol = atoi(param);
- if (ext->txvol<-8 || ext->txvol>8)
- ext->txvol = 0;
+ ext->tx_gain = atoi(param);
+ if (ext->tx_gain<-8 || ext->tx_gain>8)
+ ext->tx_gain = 0;
- PDEBUG(DEBUG_CONFIG, "transmit volume: %d\n",ext->txvol);
+ PDEBUG(DEBUG_CONFIG, "transmit volume: %d\n",ext->tx_gain);
} else
if (!strcmp(option,"own_setup"))
{
@@ -1080,7 +1082,7 @@ int write_extension(struct extension *ext, char *number)
}
fprintf(fp,"# CLIP Prefix\n");
- fprintf(fp,"# Adds a prefix to incomming caller IDs, so telephones will be able to respond\n");
+ fprintf(fp,"# Adds a prefix to incoming caller IDs, so telephones will be able to respond\n");
fprintf(fp,"# to unanswered calls from their list. The prefix must be the digit(s) to get\n");
fprintf(fp,"# an external line. The caller ID will then be extendet so that they can be\n");
fprintf(fp,"# dialed from internal telephones. Many telephones have this feature, but some\n");
@@ -1120,11 +1122,11 @@ int write_extension(struct extension *ext, char *number)
fprintf(fp,"# 1 = double, 2 = quadrupel, 8 = 256 times (amplitude)\n");
fprintf(fp,"# -1 = half, -2 = quarter, 8 = 1/256th (amplitude)\n");
fprintf(fp,"# Audio data is limited to the maximum value when exceeds limit.\n");
- fprintf(fp,"txvol %d\n\n",ext->txvol);
+ fprintf(fp,"tx_gain %d\n\n",ext->tx_gain);
fprintf(fp,"# Receive volume (-8 .. 8)\n");
- fprintf(fp,"# (see txvol)\n");
- fprintf(fp,"rxvol %d\n\n",ext->rxvol);
+ fprintf(fp,"# (see tx_gain)\n");
+ fprintf(fp,"rx_gain %d\n\n",ext->rx_gain);
fprintf(fp,"# Force to use tones and announcements generated by the pbx.\n");