I have subsequently been informed that the ${EXTEN} variable cannot be be used out side of extensions.conf. How can I achieve the result that I am looking for. I want to minimize clutter in the configuration file, minimize the effort needed to code a script to generate the extensions as well as keeping things as simple as possible.
Few things, I don’t think you can set up variables in the way you want. You can try to put them into a common context and set the variables there. For example:
Now, for the secret variable, it is VERY bad practice to have the extension being the same as the password. It preferably should be a long password with alpha, numeric, and some special characters. If your setup allowed external connections, it would be trivial to gain access to those extensions and make calls on your dime if they were the same.