From 30e3eb8cc3239384fd0c95b7523733a2c42ec022 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Wed, 5 Aug 2020 12:50:50 +0300 Subject: [PATCH] Update 'README.md' --- README.md | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 76 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d274a2b..fab5cec 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,9 @@ declare i INTEGER := 1; declare sipid integer; declare ressql varchar; declare acc_id integer = 1; -declare p_account_name varchar := 'AIRWizard'; -declare number_of_groups INTEGER := 100; -- How many groups we create +declare number_of_groups INTEGER := 50; -- How many groups we create declare dispatcher_name varchar := 'Dispatcher Sergiu'; -declare groups_name varchar := 'sim-test-'; +declare groups_name varchar := 'sergiu-sim-'; BEGIN @@ -42,6 +41,9 @@ BEGIN SELECT get_new_sipid(acc_id) INTO sipid; SELECT insert_update_groups(acc_id, Null, groups_name || i, '1', '1', '0', '0', '0', sipid, 0,'','') INTO ressql; i = i + 1; + raise notice '%', sipid; -- + raise notice '%', i; -- + raise notice '%', ressql; -- end loop; -- Assign dispatcher on the groups @@ -61,13 +63,55 @@ The units will be inserted from the provisioning(**Units -> Import from file**) For the simulation to simulate **in a period**, we must put the **testing_period setting in settings** (the value is in milliseconds).
Example in **config**:
```toml +[mumble] +port = '5668' +host = '10.120.1.169' + +[hub] +address = 'https://10.120.1.169/' + +[elogs] +name = '169' + +[api] +port = '' +host = '10.120.1.169/api' +use_secure = true +accept_untrusted_certs = true + [settings] -max_fails = 3 +max_fails = 20 send_voice = true send_gps = true -gps_report_interval = 10000 +gps_report_interval = 10000 # The interval in which the GPS is sent +gps_lat_start_point = 46.217802 gps_lng_start_point = 24.776126 -testing_period = 7000 // we will simulate all the units in a period of 7 seconds** +testing_period = 1500 + +[assets] +# linx-simulator-1 - linx-simulator-10 +# ids = [15,16,17,18,19,20,21,22,23,24] + +# linx-simulator-1 - linx-simulator-25 +# ids = [ +# 15,16,17,18,19,20,21,22,23,24, +# 25,26,27,28,29,30,31,32,33,34, +# 35,36,37,38,39 +# ] + +# linx-simulator-1 - linx-simulator-50 +ids = [ + 15,16,17,18,19,20,21,22,23,24, + 25,26,27,28,29,30,31,32,33,34, + 35,36,37,38,39,40,41,42,43,44, + 45,46,47,48,49,50,51,52,53,54, + 55,56,57,58,59,60,61,62,63,64 +] + +[sounds] +sound = 'sound.mp3' +#sound = 'file_example_MP3_700KB.mp3' +sounds_total_number = 1 ```
**4. To start the simulator**
@@ -75,3 +119,29 @@ To start the simulator we must specify which config file we want to use. ``` NODE_TLS_REJECT_UNAUTHORIZED='0' node ./index.js --path="./config/169/" ``` + +## Problems you may encounter +
+**1.** If you want to create groups, make sure you have enough free space on that account. If you do not have enough space you can use the following script (you must change the id to match your account) +```sql +set search_path to public; +DO $BODY$ +BEGIN + UPDATE license SET max_assets = 1000, max_dispatch = 1000, max_talk_groups = 1000 + WHERE id = 1; + UPDATE license SET crc = md5(coalesce(max_assets, 0)::text || + coalesce(max_talk_groups, 0)::text || + coalesce(max_dispatch, 0)::text || + coalesce(to_char(expires_on at time zone 'utc','YYYY-MM-DD"T"HH24:MI:SS'), '1970-01-01T00:00:00')::text || + coalesce(to_char(maintenance_end at time zone 'utc','YYYY-MM-DD"T"HH24:MI:SS') , '1970-01-01T00:00:00')::text + )::varchar + WHERE id = 1; +END; +$BODY$; +``` + +**2.** To start the server on a private system the setting is required: +```sh +NODE_TLS_REJECT_UNAUTHORIZED='0' +``` +otherwise you will receive the error: **Error: self signed certificate**