X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=extension.c;h=72ca1aa8c8947c6fba39342f7324546f5eaf9ff5;hp=00e53264feacc453d5af9b53709481bf463a4150;hb=79bd731c0db3e3202cfeed2af3fb217ae744b70f;hpb=b987a1bbbcabbf183ebe009903778671a1591337 diff --git a/extension.c b/extension.c index 00e5326..72ca1aa 100644 --- a/extension.c +++ b/extension.c @@ -755,6 +755,35 @@ int read_extension(struct extension *ext, char *num) } else { PDEBUG(DEBUG_CONFIG, "unknown param for seconds: %s\n", param); } + } else + if (!strcmp(option,"otp-ident")) { + SCPY(ext->otp_ident, param); + PDEBUG(DEBUG_CONFIG, "otp-ident: %s\n",param); + } else + if (!strcmp(option,"dov_ident")) { + if (param[0]) { + SCPY(ext->dov_ident, param); + PDEBUG(DEBUG_CONFIG, "dov_ident string: %s\n",param); + } + } else + if (!strcmp(option,"dov_log")) { + if (param[0]) { + SCPY(ext->dov_log, param); + PDEBUG(DEBUG_CONFIG, "dov_log filename: %s\n",param); + } + } else + if (!strcmp(option,"dov_type")) { + if (!strcasecmp(param, "pcm")) + ext->dov_type = DOV_TYPE_PCM; + else + ext->dov_type = DOV_TYPE_PWM; + PDEBUG(DEBUG_CONFIG, "given dov type: %s\n", param); + } else + if (!strcmp(option,"dov_level")) { + if (atoi(param)) { + ext->dov_level = atoi(param); + PDEBUG(DEBUG_CONFIG, "dov_level: %s\n",param); + } } else { PERROR_RUNTIME("Error in %s (line %d): wrong option keyword %s.\n",filename,line,option); } @@ -967,7 +996,7 @@ int write_extension(struct extension *ext, char *number) fprintf(fp,"own_cause %s\n\n",ext_yesno[ext->own_cause]); fprintf(fp,"# Allow facility information to be transfered to the telephone.\n"); - fprintf(fp,"# This is equired to receive advice of charge.\n"); + fprintf(fp,"# This is required to receive advice of charge.\n"); fprintf(fp,"facility %s\n\n",ext_yesno[ext->facility]); fprintf(fp,"# Display clear causes using display messages (Q.850)\n# This must be one of the following:\n"); @@ -1144,6 +1173,9 @@ int write_extension(struct extension *ext, char *number) fprintf(fp,"# Include seconds (time) in the connect message. (Should be always enabled.)\n"); fprintf(fp,"seconds %s\n\n",ext_yesno[1-ext->no_seconds]); + fprintf(fp,"# Identity string for VoOTP encryption\n"); + fprintf(fp,"otp-ident %s\n\n", ext->otp_ident); + fprintf(fp,"# Last outgoing and incoming numbers (including prefix)\n"); i = 0; while(i < MAX_REMEMBER) { @@ -1159,6 +1191,18 @@ int write_extension(struct extension *ext, char *number) } fprintf(fp,"\n"); + fprintf(fp,"# Identify to/from remove via Data-Over-Voice feature.\n"); + fprintf(fp,"dov_ident %s\n", ext->dov_ident); + fprintf(fp,"dov_log %s\n", ext->dov_log); + switch(ext->dov_type) { + case DOV_TYPE_PWM: + fprintf(fp,"dov_type pwm\n"); + break; + case DOV_TYPE_PCM: + fprintf(fp,"dov_type pcm\n"); + break; + } + fprintf(fp,"dov_level %d\n\n", ext->dov_level); if (fp) fclose(fp); return(1);