X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=extension.c;h=eaaff7d8fbe6ca8fa31907575dcfcf15dd35399d;hp=d8d17b471cc8deeca8719332032457cfb0147230;hb=27b95197734350cc99c29929c2527f2c6d5541d6;hpb=31aff20175a3bc9b4bb41d080452ae1d063e267a diff --git a/extension.c b/extension.c index d8d17b4..eaaff7d 100644 --- a/extension.c +++ b/extension.c @@ -396,24 +396,6 @@ int read_extension(struct extension *ext, char *num) PDEBUG(DEBUG_CONFIG, "unknown parameter given keypad: %s\n", param); } } else - if (!strcmp(option,"centrex")) - { - i=0; - while(ext_yesno[i]) - { - if (!strcasecmp(param,ext_yesno[i])) - break; - i++; - } - if (ext_yesno[i]) - { - ext->centrex = i; - PDEBUG(DEBUG_CONFIG, "use centrex to display name %s\n", ext_yesno[i]); - } else - { - PDEBUG(DEBUG_CONFIG, "unknown parameter given centrex: %s\n", param); - } - } else if (!strcmp(option,"rights")) { i=0; @@ -468,21 +450,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")) { @@ -964,7 +948,7 @@ int write_extension(struct extension *ext, char *number) fprintf(fp,"# Interface(s) to ring on calls to extension (as named in interface.conf)\n"); fprintf(fp,"# Seperate multiple interfaces by using komma without spaces\n"); - fprintf(fp,"# Example: Int would ring on the interface with the name \"Int\""); + fprintf(fp,"# Example: Int would ring on the interface with the name \"Int\"\n"); fprintf(fp,"# Int1,Int2 would ring incoming calls on both interfaces Int1 and Int2.\n"); fprintf(fp,"interfaces %s\n\n",ext->interfaces); @@ -1080,7 +1064,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"); @@ -1092,11 +1076,6 @@ int write_extension(struct extension *ext, char *number) fprintf(fp,"# DTMF tone, but the digit is transmitted via D-channel diaing info.\n"); fprintf(fp,"keypad %s\n\n",(ext->keypad)?"yes":"no"); - fprintf(fp,"# Called Name Identification Presentation (CNIP/CONP)\n"); - fprintf(fp,"# If supported by telephone, special information element on the d-channel are\n"); - fprintf(fp,"# used to show name of caller. It is supported by newer Siemens telephones\n# (Centrex).\n"); - fprintf(fp,"centrex %s #this is currently not working!!!\n\n",(ext->centrex)?"yes":"no"); - fprintf(fp,"# Ignore restriction of COLP and CLIP\n"); fprintf(fp,"# In this case even restricted numbers are presented to this extension.\n"); fprintf(fp,"# This also works for incoming external anonymous calls IF:\n"); @@ -1120,11 +1099,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");