-
Notifications
You must be signed in to change notification settings - Fork 0
Supplying default values to installer
Setup will look for a setup.json
file in the same directory during installation of Fop2DD. If this file is found it will be passed to Fop2DD as default settings file. You can also start Fop2DD with an argument specifying the path to a json file which Fop2DD will use to read settings from.
Simply put: setup will always pass {src}*setup.json* to Fop2DD (where {src} is the path of the installer). When you launch Fop2DD specifying a .json file, Fop2DD will try to read the specified file and extract settings from it.
The JSON file can contain any of the following settings (shown below with their default values):
/* Sample setup config file */
{
"Host": "127.0.0.1",
"Port": 4445,
"PingInterval": 20,
"Username": "101",
"PBXContext": "mycontext",
"Password": "mysecret",
"FOP2Url": "http://192.168.1.10/fop2/?context=%CONTEXT%&exten=%USER%&pass=%PASS%",
"GrabMinLength": 6,
"ConnectTimeout": 10,
"GlobalDialHotkey": "Control + F8",
"DialCmd_File": "https://www.google.com/search?q=%PHONENUMBER%",
"DialCmd_Args": "",
"DialCmd_WorkDir": "",
"DialCmd_MinLength": 6,
"FOP2UserPortal": "https://192.168.1.10:10000/session_login.cgi?user=%CONTEXT%-%USER%&pass=%PASS%"
}
If you are rolling out Fop2DD in an environment with many users it can become tedious to change the settings for each user; so you could create a setup.json file in the same directory as the setup with the following contents:
{
"Host": "foo.bar.com",
"Port": 4445,
"PingInterval": 60,
"PBXContext": "foocontext",
"FOP2Url": "http://foo.bar.com/fop2/?context=%CONTEXT%&exten=%USER%&pass=%PASS%",
"FOP2UserPortal": "https://foo.bar.com:10000/session_login.cgi?user=%CONTEXT%-%USER%&pass=%PASS%",
"GlobalDialHotkey": "Control + F3"
}
Each time the installer is run the above values will be used as defaults. You can also launch Fop2DD passing a JSON file as argument:
fop2dd.exe "D:\corporate settings\fop2dd\oursettings.json"
This will have the same effect; Fop2DD will try to read these settings and use these.
NOTE Make sure the file is a VALID JSON file; invalid files will not be read/imported. Also not that single-line comments (e.g. "//this is a comment") are not supported.