Experimental crypto feature: Support for libvootp
[lcr.git] / extension.c
index 00e5326..7332551 100644 (file)
@@ -755,6 +755,10 @@ 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 {
                        PERROR_RUNTIME("Error in %s (line %d): wrong option keyword %s.\n",filename,line,option);
                }
@@ -967,7 +971,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 +1148,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) {