X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=extension.c;fp=extension.c;h=391bb88ebad86c14e279ed44c8ec01729ca97ca4;hp=d8d17b471cc8deeca8719332032457cfb0147230;hb=14f76f1e81f0a4e7a63e83136d1ac958bf85c8a5;hpb=b1e604969443a400168c98c0a032d3df80307326 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");