engage-engine 1.251.90910019 → 1.251.90910021

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/engage.cpp CHANGED
@@ -502,6 +502,10 @@ ENGAGE_CB_ID_PARAM(groupHealthReportFailed);
502
502
  ENGAGE_CB_ID_PLUS_ONE_STRING_PARAM(groupStatsReport);
503
503
  ENGAGE_CB_ID_PARAM(groupStatsReportFailed);
504
504
 
505
+ ENGAGE_CB_ID_PARAM(bridgeCreated)
506
+ ENGAGE_CB_ID_PARAM(bridgeCreateFailed)
507
+ ENGAGE_CB_ID_PARAM(bridgeDeleted)
508
+
505
509
  void on_groupRxVolumeChanged(const char *id, int16_t leftLevelPerc, int16_t rightLevelPerc, const char * eventExtraJson)
506
510
  {
507
511
  CrossThreadCallbackWorker *cbw = getCallback("groupRxVolumeChanged");
@@ -661,6 +665,10 @@ NAN_METHOD(initialize)
661
665
  ENGAGE_CB_TABLE_ENTRY(PFN_ENGAGE_GROUP_RX_VOLUME_CHANGED, groupRxVolumeChanged);
662
666
  ENGAGE_CB_TABLE_ENTRY(PFN_ENGAGE_GROUP_RX_DTMF, groupRxDtmf);
663
667
 
668
+ ENGAGE_CB_TABLE_ENTRY(PFN_ENGAGE_BRIDGE_CREATED, bridgeCreated);
669
+ ENGAGE_CB_TABLE_ENTRY(PFN_ENGAGE_BRIDGE_CREATE_FAILED, bridgeCreateFailed);
670
+ ENGAGE_CB_TABLE_ENTRY(PFN_ENGAGE_BRIDGE_DELETED, bridgeDeleted);
671
+
664
672
  engageRegisterEventCallbacks(&g_eventCallbacks);
665
673
 
666
674
  NANRETI(engageInitialize(STRVAL(0), STRVAL(1), STRVAL(2)));
@@ -1214,6 +1222,17 @@ NAN_METHOD(endGroupPcmPowerTracking)
1214
1222
  NANRETI(engageEndGroupPcmPowerTracking(STRVAL(0)));
1215
1223
  }
1216
1224
 
1225
+ //--------------------------------------------------------
1226
+ NAN_METHOD(createBridge)
1227
+ {
1228
+ NANRETI(engageCreateBridge(STRVAL(0)));
1229
+ }
1230
+
1231
+ //--------------------------------------------------------
1232
+ NAN_METHOD(deleteBridge)
1233
+ {
1234
+ NANRETI(engageDeleteBridge(STRVAL(0)));
1235
+ }
1217
1236
 
1218
1237
  //--------------------------------------------------------
1219
1238
  NAN_MODULE_INIT(Init)
@@ -1297,6 +1316,9 @@ NAN_MODULE_INIT(Init)
1297
1316
 
1298
1317
  ENGAGE_BINDING(beginGroupPcmPowerTracking);
1299
1318
  ENGAGE_BINDING(endGroupPcmPowerTracking);
1319
+
1320
+ ENGAGE_BINDING(createBridge);
1321
+ ENGAGE_BINDING(deleteBridge);
1300
1322
  }
1301
1323
 
1302
1324
  NODE_MODULE(engage, Init)
@@ -2751,6 +2751,21 @@ namespace AppConfigurationObjects
2751
2751
  IMPLEMENT_JSON_DOCUMENTATION(Rallypoint)
2752
2752
 
2753
2753
  public:
2754
+ /**
2755
+ * @brief RP protocol enum.
2756
+ *
2757
+ */
2758
+ typedef enum
2759
+ {
2760
+ /** @brief [Default] TLS over TCP*/
2761
+ rppTlsTcp = 0,
2762
+
2763
+ /** @brief WebSocket over TLS */
2764
+ rppTlsWs = 1,
2765
+
2766
+ /** @brief Invalid */
2767
+ rppInvalid = -1
2768
+ } RpProtocol_t;
2754
2769
 
2755
2770
  /**
2756
2771
  * @brief This is the host address for the Engine to connect to the RallyPoint service.
@@ -2800,7 +2815,7 @@ namespace AppConfigurationObjects
2800
2815
  std::vector<std::string> caCertificates;
2801
2816
 
2802
2817
  /**
2803
- * @brief [Optional, Default 5000] Number of milliseconds that a transaction may take before the link is considered broken.
2818
+ * @brief [Optional, Default 10000] Number of milliseconds that a transaction may take before the link is considered broken.
2804
2819
  */
2805
2820
  int transactionTimeoutMs;
2806
2821
 
@@ -2815,6 +2830,21 @@ namespace AppConfigurationObjects
2815
2830
  /** @brief [Optional] Tx options for the TCP link */
2816
2831
  TcpNetworkTxOptions tcpTxOptions;
2817
2832
 
2833
+ /**
2834
+ * @brief [Optional] A user-defined string sent as the Server Name Indication (SNI) field in
2835
+ * the TLS setup. Be aware that this data is sent in the clear in the client hello message.
2836
+ *
2837
+ */
2838
+ std::string sni;
2839
+
2840
+
2841
+ /** @brief [Optional, Default: rppTlsTcp] Specifies the protocol to be used for the Rallypoint connection. See @ref RpProtocol_t for all protocol types */
2842
+ RpProtocol_t protocol;
2843
+
2844
+ /** @brief [Optional, Default: ""] Path to use for the RP connection (only used for WebSocket) */
2845
+ std::string path;
2846
+
2847
+
2818
2848
  Rallypoint()
2819
2849
  {
2820
2850
  clear();
@@ -2831,6 +2861,9 @@ namespace AppConfigurationObjects
2831
2861
  disableMessageSigning = false;
2832
2862
  connectionTimeoutSecs = 0;
2833
2863
  tcpTxOptions.clear();
2864
+ sni.clear();
2865
+ protocol = rppTlsTcp;
2866
+ path.clear();
2834
2867
  }
2835
2868
 
2836
2869
  bool matches(const Rallypoint& other)
@@ -2840,6 +2873,16 @@ namespace AppConfigurationObjects
2840
2873
  return false;
2841
2874
  }
2842
2875
 
2876
+ if(protocol != other.protocol)
2877
+ {
2878
+ return false;
2879
+ }
2880
+
2881
+ if(path.compare(other.path) != 0)
2882
+ {
2883
+ return false;
2884
+ }
2885
+
2843
2886
  if(certificate.compare(other.certificate) != 0)
2844
2887
  {
2845
2888
  return false;
@@ -2893,6 +2936,18 @@ namespace AppConfigurationObjects
2893
2936
  {
2894
2937
  return false;
2895
2938
  }
2939
+ if(connectionTimeoutSecs != other.connectionTimeoutSecs)
2940
+ {
2941
+ return false;
2942
+ }
2943
+ if(tcpTxOptions.priority != other.tcpTxOptions.priority)
2944
+ {
2945
+ return false;
2946
+ }
2947
+ if(sni.compare(other.sni) != 0)
2948
+ {
2949
+ return false;
2950
+ }
2896
2951
 
2897
2952
  return true;
2898
2953
  }
@@ -2910,7 +2965,10 @@ namespace AppConfigurationObjects
2910
2965
  TOJSON_IMPL(transactionTimeoutMs),
2911
2966
  TOJSON_IMPL(disableMessageSigning),
2912
2967
  TOJSON_IMPL(connectionTimeoutSecs),
2913
- TOJSON_IMPL(tcpTxOptions)
2968
+ TOJSON_IMPL(tcpTxOptions),
2969
+ TOJSON_IMPL(sni),
2970
+ TOJSON_IMPL(protocol),
2971
+ TOJSON_IMPL(path)
2914
2972
  };
2915
2973
  }
2916
2974
 
@@ -2927,6 +2985,9 @@ namespace AppConfigurationObjects
2927
2985
  getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
2928
2986
  getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
2929
2987
  getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
2988
+ getOptional<std::string>("sni", p.sni, j);
2989
+ getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
2990
+ getOptional<std::string>("path", p.path, j);
2930
2991
  }
2931
2992
 
2932
2993
  //-----------------------------------------------------------
@@ -2970,10 +3031,10 @@ namespace AppConfigurationObjects
2970
3031
  /** @brief Seconds between switching to a new target */
2971
3032
  int rolloverSecs;
2972
3033
 
2973
- /** @brief [Optional, Default: 0] Default connection timeout in seconds to any RP in the cluster */
3034
+ /** @brief [Optional, Default: 5] Default connection timeout in seconds to any RP in the cluster */
2974
3035
  int connectionTimeoutSecs;
2975
3036
 
2976
- /** @brief [Optional, Default: 0] Default transaction time in milliseconds to any RP in the cluster */
3037
+ /** @brief [Optional, Default: 10000] Default transaction time in milliseconds to any RP in the cluster */
2977
3038
  int transactionTimeoutMs;
2978
3039
 
2979
3040
  RallypointCluster()
@@ -2986,8 +3047,8 @@ namespace AppConfigurationObjects
2986
3047
  connectionStrategy = csRoundRobin;
2987
3048
  rallypoints.clear();
2988
3049
  rolloverSecs = 10;
2989
- connectionTimeoutSecs = 0;
2990
- transactionTimeoutMs = 0;
3050
+ connectionTimeoutSecs = 5;
3051
+ transactionTimeoutMs = 10000;
2991
3052
  }
2992
3053
  };
2993
3054
 
@@ -3007,8 +3068,8 @@ namespace AppConfigurationObjects
3007
3068
  getOptional<RallypointCluster::ConnectionStrategy_t>("connectionStrategy", p.connectionStrategy, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
3008
3069
  getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
3009
3070
  getOptional<int>("rolloverSecs", p.rolloverSecs, j, 10);
3010
- getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
3011
- getOptional<int>("transactionTimeoutMs", p.connectionTimeoutSecs, j, 0);
3071
+ getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 5);
3072
+ getOptional<int>("transactionTimeoutMs", p.transactionTimeoutMs, j, 10000);
3012
3073
  }
3013
3074
 
3014
3075
 
@@ -3512,6 +3573,164 @@ namespace AppConfigurationObjects
3512
3573
  // internalKey is not serialized
3513
3574
  }
3514
3575
 
3576
+ //-----------------------------------------------------------
3577
+ JSON_SERIALIZED_CLASS(AudioRegistryDevice)
3578
+ /**
3579
+ * @brief Describes an audio device that is available on the system
3580
+ *
3581
+ * Helper C++ class to serialize and de-serialize AudioRegistryDevice
3582
+ *
3583
+ * Example: @include[doc] examples/AudioRegistryDevice.json
3584
+ *
3585
+ * @see AudioRegistryDevice
3586
+ */
3587
+ class AudioRegistryDevice : public ConfigurationObjectBase
3588
+ {
3589
+ IMPLEMENT_JSON_SERIALIZATION()
3590
+ IMPLEMENT_JSON_DOCUMENTATION(AudioRegistryDevice)
3591
+
3592
+ public:
3593
+ /** @brief The string identifier used to identify the hardware. */
3594
+ std::string hardwareId;
3595
+
3596
+ /** @brief True if this is the default device */
3597
+ bool isDefault;
3598
+
3599
+ /** @brief Name of the device */
3600
+ std::string name;
3601
+
3602
+ /** @brief [Optional] Manufacturer */
3603
+ std::string manufacturer;
3604
+
3605
+ /** @brief [Optional] Model */
3606
+ std::string model;
3607
+
3608
+ /** @brief [Optional] Serial number */
3609
+ std::string serialNumber;
3610
+
3611
+
3612
+ /** @brief [Optional] Type */
3613
+ std::string type;
3614
+
3615
+ /** @brief [Optional] Extra */
3616
+ std::string extra;
3617
+
3618
+ AudioRegistryDevice()
3619
+ {
3620
+ clear();
3621
+ }
3622
+
3623
+ void clear()
3624
+ {
3625
+ hardwareId.clear();
3626
+ isDefault = false;
3627
+ name.clear();
3628
+ manufacturer.clear();
3629
+ model.clear();
3630
+ serialNumber.clear();
3631
+ type.clear();
3632
+ extra.clear();
3633
+ }
3634
+
3635
+ virtual std::string toString()
3636
+ {
3637
+ char buff[2048];
3638
+
3639
+ snprintf(buff, sizeof(buff), "hardwareId=%s, isDefault=%d, name=%s, manufacturer=%s, model=%s, serialNumber=%s, type=%s, extra=%s",
3640
+ hardwareId.c_str(),
3641
+ (int)isDefault,
3642
+ name.c_str(),
3643
+ manufacturer.c_str(),
3644
+ model.c_str(),
3645
+ serialNumber.c_str(),
3646
+ type.c_str(),
3647
+ extra.c_str());
3648
+
3649
+ return std::string(buff);
3650
+ }
3651
+ };
3652
+
3653
+ static void to_json(nlohmann::json& j, const AudioRegistryDevice& p)
3654
+ {
3655
+ j = nlohmann::json{
3656
+ TOJSON_IMPL(hardwareId),
3657
+ TOJSON_IMPL(isDefault),
3658
+ TOJSON_IMPL(name),
3659
+ TOJSON_IMPL(manufacturer),
3660
+ TOJSON_IMPL(model),
3661
+ TOJSON_IMPL(serialNumber),
3662
+ TOJSON_IMPL(type),
3663
+ TOJSON_IMPL(extra)
3664
+ };
3665
+ }
3666
+ static void from_json(const nlohmann::json& j, AudioRegistryDevice& p)
3667
+ {
3668
+ p.clear();
3669
+ getOptional<std::string>("hardwareId", p.hardwareId, j, EMPTY_STRING);
3670
+ getOptional<bool>("isDefault", p.isDefault, j, false);
3671
+ getOptional("name", p.name, j);
3672
+ getOptional("manufacturer", p.manufacturer, j);
3673
+ getOptional("model", p.model, j);
3674
+ getOptional("serialNumber", p.serialNumber, j);
3675
+ getOptional("type", p.type, j);
3676
+ getOptional("extra", p.extra, j);
3677
+ }
3678
+
3679
+
3680
+ //-----------------------------------------------------------
3681
+ JSON_SERIALIZED_CLASS(AudioRegistry)
3682
+ /**
3683
+ * @brief Describes an audio registry
3684
+ *
3685
+ * Helper C++ class to serialize and de-serialize AudioRegistry
3686
+ *
3687
+ * Example: @include[doc] examples/AudioRegistry.json
3688
+ *
3689
+ * @see AudioRegistry
3690
+ */
3691
+ class AudioRegistry : public ConfigurationObjectBase
3692
+ {
3693
+ IMPLEMENT_JSON_SERIALIZATION()
3694
+ IMPLEMENT_JSON_DOCUMENTATION(AudioRegistry)
3695
+
3696
+ public:
3697
+ /** @brief [Optional] List of input devices to use for the registry. */
3698
+ std::vector<AudioRegistryDevice> inputs;
3699
+
3700
+ /** @brief [Optional] List of output devices to use for the registry. */
3701
+ std::vector<AudioRegistryDevice> outputs;
3702
+
3703
+ AudioRegistry()
3704
+ {
3705
+ clear();
3706
+ }
3707
+
3708
+ void clear()
3709
+ {
3710
+ inputs.clear();
3711
+ outputs.clear();
3712
+ }
3713
+
3714
+ virtual std::string toString()
3715
+ {
3716
+ return std::string("");
3717
+ }
3718
+ };
3719
+
3720
+ static void to_json(nlohmann::json& j, const AudioRegistry& p)
3721
+ {
3722
+ j = nlohmann::json{
3723
+ TOJSON_IMPL(inputs),
3724
+ TOJSON_IMPL(outputs)
3725
+ };
3726
+ }
3727
+ static void from_json(const nlohmann::json& j, AudioRegistry& p)
3728
+ {
3729
+ p.clear();
3730
+ getOptional<std::vector<AudioRegistryDevice>>("inputs", p.inputs, j);
3731
+ getOptional<std::vector<AudioRegistryDevice>>("outputs", p.outputs, j);
3732
+ }
3733
+
3515
3734
  //-----------------------------------------------------------
3516
3735
  JSON_SERIALIZED_CLASS(AudioDeviceDescriptor)
3517
3736
  /**
@@ -3755,12 +3974,18 @@ namespace AppConfigurationObjects
3755
3974
  /** @brief [Optional, Default: first audio device] Id for the input audio device to use for this group. */
3756
3975
  int inputId;
3757
3976
 
3977
+ /** @brief [Optional] Hardware ID of the input audio device to use for this group. If empty, inputId is used. */
3978
+ std::string inputHardwareId;
3979
+
3758
3980
  /** @brief [Optional, Default: 0] The percentage at which to gain the input audio. */
3759
3981
  int inputGain;
3760
3982
 
3761
3983
  /** @brief [Optional, Default: first audio device] Id for the output audio device to use for this group. */
3762
3984
  int outputId;
3763
3985
 
3986
+ /** @brief [Optional] Hardware ID of the output audio device to use for this group. If empty, outputId is used. */
3987
+ std::string outputHardwareId;
3988
+
3764
3989
  /** @brief [Optional, Default: 0] The percentage at which to gain the output audio. */
3765
3990
  int outputGain;
3766
3991
 
@@ -3782,8 +4007,10 @@ namespace AppConfigurationObjects
3782
4007
  {
3783
4008
  enabled = true;
3784
4009
  inputId = 0;
4010
+ inputHardwareId.clear();
3785
4011
  inputGain = 0;
3786
4012
  outputId = 0;
4013
+ outputHardwareId.clear();
3787
4014
  outputGain = 0;
3788
4015
  outputLevelLeft = 100;
3789
4016
  outputLevelRight = 100;
@@ -3796,8 +4023,10 @@ namespace AppConfigurationObjects
3796
4023
  j = nlohmann::json{
3797
4024
  TOJSON_IMPL(enabled),
3798
4025
  TOJSON_IMPL(inputId),
4026
+ TOJSON_IMPL(inputHardwareId),
3799
4027
  TOJSON_IMPL(inputGain),
3800
4028
  TOJSON_IMPL(outputId),
4029
+ TOJSON_IMPL(outputHardwareId),
3801
4030
  TOJSON_IMPL(outputLevelLeft),
3802
4031
  TOJSON_IMPL(outputLevelRight),
3803
4032
  TOJSON_IMPL(outputMuted)
@@ -3808,8 +4037,10 @@ namespace AppConfigurationObjects
3808
4037
  p.clear();
3809
4038
  getOptional<bool>("enabled", p.enabled, j, true);
3810
4039
  getOptional<int>("inputId", p.inputId, j, 0);
4040
+ getOptional<std::string>("inputHardwareId", p.inputHardwareId, j, EMPTY_STRING);
3811
4041
  getOptional<int>("inputGain", p.inputGain, j, 0);
3812
4042
  getOptional<int>("outputId", p.outputId, j, 0);
4043
+ getOptional<std::string>("outputHardwareId", p.outputHardwareId, j, EMPTY_STRING);
3813
4044
  getOptional<int>("outputGain", p.outputGain, j, 0);
3814
4045
  getOptional<int>("outputLevelLeft", p.outputLevelLeft, j, 100);
3815
4046
  getOptional<int>("outputLevelRight", p.outputLevelRight, j, 100);
@@ -4022,6 +4253,9 @@ namespace AppConfigurationObjects
4022
4253
  /** @brief [Optional, Default: 5] The minimum interval to send at to prevent network flooding */
4023
4254
  int minIntervalSecs;
4024
4255
 
4256
+ /** @brief [Optional, Default: false] Instructs the Engage Engine reduce the immediacy of presence announcements wherever possible */
4257
+ bool reduceImmediacy;
4258
+
4025
4259
  Presence()
4026
4260
  {
4027
4261
  clear();
@@ -4033,6 +4267,7 @@ namespace AppConfigurationObjects
4033
4267
  intervalSecs = 30;
4034
4268
  listenOnly = false;
4035
4269
  minIntervalSecs = 5;
4270
+ reduceImmediacy = false;
4036
4271
  }
4037
4272
  };
4038
4273
 
@@ -4042,7 +4277,8 @@ namespace AppConfigurationObjects
4042
4277
  TOJSON_IMPL(format),
4043
4278
  TOJSON_IMPL(intervalSecs),
4044
4279
  TOJSON_IMPL(listenOnly),
4045
- TOJSON_IMPL(minIntervalSecs)
4280
+ TOJSON_IMPL(minIntervalSecs),
4281
+ TOJSON_IMPL(reduceImmediacy)
4046
4282
  };
4047
4283
  }
4048
4284
  static void from_json(const nlohmann::json& j, Presence& p)
@@ -4052,6 +4288,7 @@ namespace AppConfigurationObjects
4052
4288
  getOptional<int>("intervalSecs", p.intervalSecs, j, 30);
4053
4289
  getOptional<bool>("listenOnly", p.listenOnly, j, false);
4054
4290
  getOptional<int>("minIntervalSecs", p.minIntervalSecs, j, 5);
4291
+ getOptional<bool>("reduceImmediacy", p.reduceImmediacy, j, false);
4055
4292
  }
4056
4293
 
4057
4294
 
@@ -4706,6 +4943,82 @@ namespace AppConfigurationObjects
4706
4943
  FROMJSON_IMPL_SIMPLE(alias);
4707
4944
  }
4708
4945
 
4946
+ //-----------------------------------------------------------
4947
+ JSON_SERIALIZED_CLASS(GroupBridgeTargetOutputDetail)
4948
+ /**
4949
+ * @brief Options for Source
4950
+ *
4951
+ * Helper C++ class to serialize and de-serialize GroupBridgeTargetOutputDetail JSON
4952
+ *
4953
+ * TODO: Complete this Class
4954
+ *
4955
+ * Example: @include[doc] examples/GroupBridgeTargetOutputDetail.json
4956
+ *
4957
+ * @see Group
4958
+ */
4959
+ class GroupBridgeTargetOutputDetail : public ConfigurationObjectBase
4960
+ {
4961
+ IMPLEMENT_JSON_SERIALIZATION()
4962
+ IMPLEMENT_JSON_DOCUMENTATION(GroupBridgeTargetOutputDetail)
4963
+
4964
+ public:
4965
+ /** @brief Enum describing bridging operation mode types where applicable. */
4966
+ typedef enum
4967
+ {
4968
+ /** @brief Raw mode (default) - packet payloads are not accessed or modified and forwarded as raw packets. The
4969
+ * group must have a type of @ref gtRaw.
4970
+ */
4971
+ bomRaw = 0,
4972
+
4973
+ /** @brief Audio payloads are transformed, headers are preserved, multiple parallel output streams are
4974
+ * possible/expected. The group must be gtAudio (type = 1).*/
4975
+ bomMultistream = 1,
4976
+
4977
+ /** @brief Audio payloads are mixed - output is anonymous (i.e. no metadata) if if the target group(s)
4978
+ * allow header extensions. The group must be gtAudio (type = 1)*/
4979
+ bomMixedStream = 2,
4980
+
4981
+ /** @brief No output will be made to the group regardless of type.*/
4982
+ bomNone = 3
4983
+ } BridgingOpMode_t;
4984
+
4985
+ /** @brief [Optional] The output mode */
4986
+ BridgingOpMode_t mode;
4987
+
4988
+ /** @brief [Optional] Parameters to be applied when output is mixed (bomMixedStream) */
4989
+ AdvancedTxParams mixedStreamTxParams;
4990
+
4991
+ GroupBridgeTargetOutputDetail()
4992
+ {
4993
+ clear();
4994
+ }
4995
+
4996
+ void clear()
4997
+ {
4998
+ mode = BridgingOpMode_t::bomRaw;
4999
+ mixedStreamTxParams.clear();
5000
+ }
5001
+
5002
+ virtual void initForDocumenting()
5003
+ {
5004
+ clear();
5005
+ }
5006
+ };
5007
+
5008
+ static void to_json(nlohmann::json& j, const GroupBridgeTargetOutputDetail& p)
5009
+ {
5010
+ j = nlohmann::json{
5011
+ TOJSON_IMPL(mode),
5012
+ TOJSON_IMPL(mixedStreamTxParams)
5013
+ };
5014
+ }
5015
+ static void from_json(const nlohmann::json& j, GroupBridgeTargetOutputDetail& p)
5016
+ {
5017
+ p.clear();
5018
+ FROMJSON_IMPL_SIMPLE(mode);
5019
+ FROMJSON_IMPL_SIMPLE(mixedStreamTxParams);
5020
+ }
5021
+
4709
5022
  //-----------------------------------------------------------
4710
5023
  JSON_SERIALIZED_CLASS(Group)
4711
5024
  /**
@@ -4740,23 +5053,6 @@ namespace AppConfigurationObjects
4740
5053
  gtRaw = 3
4741
5054
  } Type_t;
4742
5055
 
4743
-
4744
- /** @brief Enum describing bridging operation mode types where applicable. */
4745
- typedef enum
4746
- {
4747
- /** @brief Raw mode (default) - packet payloads are not accessed or modified and forwarded as raw packets */
4748
- bomRaw = 0,
4749
-
4750
- /** @brief Audio payloads are transformed, headers are preserved, multiple parallel output streams are possible/expected */
4751
- bomPayloadTransformation = 1,
4752
-
4753
- /** @brief Audio payloads are mixed - output is anonymous (i.e. no metadata) if if the target group(s) allow header extensions */
4754
- bomAnonymousMixing = 2,
4755
-
4756
- /** @brief The bridge performs language translations between groups */
4757
- bomLanguageTranslation = 3
4758
- } BridgingOpMode_t;
4759
-
4760
5056
  /** @brief Enum describing the alias generation policy. */
4761
5057
  typedef enum
4762
5058
  {
@@ -4770,8 +5066,8 @@ namespace AppConfigurationObjects
4770
5066
  /** @brief Specifies the group type (see @ref Type_t). */
4771
5067
  Type_t type;
4772
5068
 
4773
- /** @brief Specifies the bridging operation mode if applicable (see @ref BridgingOpMode_t). */
4774
- BridgingOpMode_t bom;
5069
+ /** @brief Output details for when the group is a target in a bridge (see @ref GroupBridgeTargetOutputDetail). */
5070
+ GroupBridgeTargetOutputDetail bridgeTargetOutputDetail;
4775
5071
 
4776
5072
  /**
4777
5073
  * @brief Unique identity for the group.
@@ -4937,7 +5233,7 @@ namespace AppConfigurationObjects
4937
5233
  void clear()
4938
5234
  {
4939
5235
  type = gtUnknown;
4940
- bom = bomRaw;
5236
+ bridgeTargetOutputDetail.clear();
4941
5237
  id.clear();
4942
5238
  name.clear();
4943
5239
  spokenName.clear();
@@ -5014,7 +5310,7 @@ namespace AppConfigurationObjects
5014
5310
  {
5015
5311
  j = nlohmann::json{
5016
5312
  TOJSON_IMPL(type),
5017
- TOJSON_IMPL(bom),
5313
+ TOJSON_IMPL(bridgeTargetOutputDetail),
5018
5314
  TOJSON_IMPL(id),
5019
5315
  TOJSON_IMPL(name),
5020
5316
  TOJSON_IMPL(spokenName),
@@ -5106,7 +5402,7 @@ namespace AppConfigurationObjects
5106
5402
  {
5107
5403
  p.clear();
5108
5404
  j.at("type").get_to(p.type);
5109
- getOptional<Group::BridgingOpMode_t>("bom", p.bom, j, Group::BridgingOpMode_t::bomRaw);
5405
+ getOptional<GroupBridgeTargetOutputDetail>("bridgeTargetOutputDetail", p.bridgeTargetOutputDetail, j);
5110
5406
  j.at("id").get_to(p.id);
5111
5407
  getOptional<std::string>("name", p.name, j);
5112
5408
  getOptional<std::string>("spokenName", p.spokenName, j);
@@ -5724,7 +6020,9 @@ namespace AppConfigurationObjects
5724
6020
  /** @brief List of group IDs to be included in the session */
5725
6021
  std::vector<std::string> groups;
5726
6022
 
5727
- /** @brief [Optional, Default: true] Enable the bridge */
6023
+ /** @brief [Optional, Default: true] Enable the bridge
6024
+ * NOTE: this is only used bt EBS and is ignored when calling engageCreateBridge() is called
6025
+ */
5728
6026
  bool enabled;
5729
6027
 
5730
6028
  Bridge()
@@ -5931,6 +6229,9 @@ namespace AppConfigurationObjects
5931
6229
  /** @brief [Optional, Default: false] If true, input audio is written to a PCM file in the data directory */
5932
6230
  bool saveOutputPcm;
5933
6231
 
6232
+ /** @brief [Optional] If specified, this registry will be used to discover the input and output devices */
6233
+ AudioRegistry registry;
6234
+
5934
6235
 
5935
6236
  EnginePolicyAudio()
5936
6237
  {
@@ -5953,6 +6254,7 @@ namespace AppConfigurationObjects
5953
6254
  denoiseOutput = false;
5954
6255
  saveInputPcm = false;
5955
6256
  saveOutputPcm = false;
6257
+ registry.clear();
5956
6258
  }
5957
6259
  };
5958
6260
 
@@ -5972,7 +6274,8 @@ namespace AppConfigurationObjects
5972
6274
  TOJSON_IMPL(denoiseInput),
5973
6275
  TOJSON_IMPL(denoiseOutput),
5974
6276
  TOJSON_IMPL(saveInputPcm),
5975
- TOJSON_IMPL(saveOutputPcm)
6277
+ TOJSON_IMPL(saveOutputPcm),
6278
+ TOJSON_IMPL(registry)
5976
6279
  };
5977
6280
  }
5978
6281
  static void from_json(const nlohmann::json& j, EnginePolicyAudio& p)
@@ -5993,6 +6296,7 @@ namespace AppConfigurationObjects
5993
6296
  FROMJSON_IMPL(denoiseOutput, bool, false);
5994
6297
  FROMJSON_IMPL(saveInputPcm, bool, false);
5995
6298
  FROMJSON_IMPL(saveOutputPcm, bool, false);
6299
+ getOptional<AudioRegistry>("registry", p.registry, j);
5996
6300
  }
5997
6301
 
5998
6302
  //-----------------------------------------------------------
@@ -7655,6 +7959,12 @@ namespace AppConfigurationObjects
7655
7959
 
7656
7960
  OutboundLeafPolicy_t outboundLeafPolicy;
7657
7961
 
7962
+ /** @brief [Optional, Default: Rallypoint::RpProtocol_t::rppTlsTcp] Protocol to use for the peer */
7963
+ Rallypoint::RpProtocol_t protocol;
7964
+
7965
+ /** @brief [Optional, Default: ""] Path to use for the peer (only used for WebSocket) */
7966
+ std::string path;
7967
+
7658
7968
  RallypointPeer()
7659
7969
  {
7660
7970
  clear();
@@ -7669,6 +7979,8 @@ namespace AppConfigurationObjects
7669
7979
  connectionTimeoutSecs = 0;
7670
7980
  forceIsMeshLeaf = false;
7671
7981
  outboundLeafPolicy = OutboundLeafPolicy_t::olpUseRpConfiguration;
7982
+ protocol = Rallypoint::RpProtocol_t::rppTlsTcp;
7983
+ path.clear();
7672
7984
  }
7673
7985
  };
7674
7986
 
@@ -7681,7 +7993,9 @@ namespace AppConfigurationObjects
7681
7993
  TOJSON_IMPL(certificate),
7682
7994
  TOJSON_IMPL(connectionTimeoutSecs),
7683
7995
  TOJSON_IMPL(forceIsMeshLeaf),
7684
- TOJSON_IMPL(outboundLeafPolicy)
7996
+ TOJSON_IMPL(outboundLeafPolicy),
7997
+ TOJSON_IMPL(protocol),
7998
+ TOJSON_IMPL(path)
7685
7999
  };
7686
8000
  }
7687
8001
  static void from_json(const nlohmann::json& j, RallypointPeer& p)
@@ -7694,6 +8008,8 @@ namespace AppConfigurationObjects
7694
8008
  getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
7695
8009
  getOptional<bool>("forceIsMeshLeaf", p.forceIsMeshLeaf, j, false);
7696
8010
  getOptional<RallypointPeer::OutboundLeafPolicy_t>("outboundLeafPolicy", p.outboundLeafPolicy, j, RallypointPeer::OutboundLeafPolicy_t::olpUseRpConfiguration);
8011
+ getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
8012
+ getOptional<std::string>("path", p.path, j);
7697
8013
  }
7698
8014
 
7699
8015
  //-----------------------------------------------------------
@@ -8537,6 +8853,9 @@ namespace AppConfigurationObjects
8537
8853
  /** @brief [Default: false] Indicates whether the client is required to present a certificate */
8538
8854
  bool requireClientCertificate;
8539
8855
 
8856
+ /** @brief [Default: false] Indicates whether TLS is required */
8857
+ bool requireTls;
8858
+
8540
8859
  RallypointWebsocketSettings()
8541
8860
  {
8542
8861
  clear();
@@ -8548,6 +8867,7 @@ namespace AppConfigurationObjects
8548
8867
  listenPort = 8443;
8549
8868
  certificate.clear();
8550
8869
  requireClientCertificate = false;
8870
+ requireTls = true;
8551
8871
  }
8552
8872
  };
8553
8873
 
@@ -8557,7 +8877,8 @@ namespace AppConfigurationObjects
8557
8877
  TOJSON_IMPL(enabled),
8558
8878
  TOJSON_IMPL(listenPort),
8559
8879
  TOJSON_IMPL(certificate),
8560
- TOJSON_IMPL(requireClientCertificate)
8880
+ TOJSON_IMPL(requireClientCertificate),
8881
+ TOJSON_IMPL(requireTls)
8561
8882
  };
8562
8883
  }
8563
8884
  static void from_json(const nlohmann::json& j, RallypointWebsocketSettings& p)
@@ -8567,6 +8888,7 @@ namespace AppConfigurationObjects
8567
8888
  getOptional<int>("listenPort", p.listenPort, j, 8443);
8568
8889
  getOptional<SecurityCertificate>("certificate", p.certificate, j);
8569
8890
  getOptional<bool>("requireClientCertificate", p.requireClientCertificate, j, false);
8891
+ getOptional<bool>("requireTls", p.requireTls, j, true);
8570
8892
  }
8571
8893
 
8572
8894
 
@@ -8643,6 +8965,54 @@ namespace AppConfigurationObjects
8643
8965
  }
8644
8966
 
8645
8967
 
8968
+
8969
+
8970
+ //-----------------------------------------------------------
8971
+ JSON_SERIALIZED_CLASS(NamedIdentity)
8972
+ /**
8973
+ * @brief Defines settings for a named identity
8974
+ *
8975
+ * Example: @include[doc] examples/NamedIdentity.json
8976
+ *
8977
+ */
8978
+ class NamedIdentity : public ConfigurationObjectBase
8979
+ {
8980
+ IMPLEMENT_JSON_SERIALIZATION()
8981
+ IMPLEMENT_JSON_DOCUMENTATION(NamedIdentity)
8982
+
8983
+ public:
8984
+ /** @brief The identity name */
8985
+ std::string name;
8986
+
8987
+ /** @brief The identity certificate */
8988
+ SecurityCertificate certificate;
8989
+
8990
+ NamedIdentity()
8991
+ {
8992
+ clear();
8993
+ }
8994
+
8995
+ void clear()
8996
+ {
8997
+ name.clear();
8998
+ certificate.clear();
8999
+ }
9000
+ };
9001
+
9002
+ static void to_json(nlohmann::json& j, const NamedIdentity& p)
9003
+ {
9004
+ j = nlohmann::json{
9005
+ TOJSON_IMPL(name),
9006
+ TOJSON_IMPL(certificate)
9007
+ };
9008
+ }
9009
+ static void from_json(const nlohmann::json& j, NamedIdentity& p)
9010
+ {
9011
+ p.clear();
9012
+ getOptional<std::string>("name", p.name, j);
9013
+ getOptional<SecurityCertificate>("certificate", p.certificate, j);
9014
+ }
9015
+
8646
9016
  //-----------------------------------------------------------
8647
9017
  JSON_SERIALIZED_CLASS(RallypointExtendedGroupRestriction)
8648
9018
  /**
@@ -8706,6 +9076,32 @@ namespace AppConfigurationObjects
8706
9076
  IMPLEMENT_JSON_DOCUMENTATION(RallypointServer)
8707
9077
 
8708
9078
  public:
9079
+ typedef enum
9080
+ {
9081
+ sptDefault = 0,
9082
+ sptCertificate = 1,
9083
+ sptCertPublicKey = 2,
9084
+ sptCertSubject = 3,
9085
+ sptCertIssuer = 4,
9086
+ sptCertFingerprint = 5,
9087
+ sptCertSerial = 6,
9088
+ sptSubjectC = 7,
9089
+ sptSubjectST = 8,
9090
+ sptSubjectL = 9,
9091
+ sptSubjectO = 10,
9092
+ sptSubjectOU = 11,
9093
+ sptSubjectCN = 12,
9094
+ sptIssuerC = 13,
9095
+ sptIssuerST = 14,
9096
+ sptIssuerL = 15,
9097
+ sptIssuerO = 16,
9098
+ sptIssuerOU = 17,
9099
+ sptIssuerCN = 18
9100
+ } StreamIdPrivacyType_t;
9101
+
9102
+ /** @brief [Optional, default sptDefault] Modes for stream ID transformation. */
9103
+ StreamIdPrivacyType_t streamIdPrivacyType;
9104
+
8709
9105
  /** @brief [Optional] Settings for the FIPS crypto. */
8710
9106
  FipsCryptoSettings fipsCrypto;
8711
9107
 
@@ -8880,6 +9276,9 @@ namespace AppConfigurationObjects
8880
9276
  /** @brief [Optional] Low-level tuning */
8881
9277
  TuningSettings tuning;
8882
9278
 
9279
+ /** @brief [Optional] List of additional named identities */
9280
+ std::vector<NamedIdentity> additionalIdentities;
9281
+
8883
9282
  RallypointServer()
8884
9283
  {
8885
9284
  clear();
@@ -8945,6 +9344,8 @@ namespace AppConfigurationObjects
8945
9344
  blockedDomains.clear();
8946
9345
  extraDomains.clear();
8947
9346
  tuning.clear();
9347
+ additionalIdentities.clear();
9348
+ streamIdPrivacyType = StreamIdPrivacyType_t::sptDefault;
8948
9349
  }
8949
9350
  };
8950
9351
 
@@ -9008,7 +9409,9 @@ namespace AppConfigurationObjects
9008
9409
  TOJSON_IMPL(allowedDomains),
9009
9410
  TOJSON_IMPL(blockedDomains),
9010
9411
  TOJSON_IMPL(extraDomains),
9011
- TOJSON_IMPL(tuning)
9412
+ TOJSON_IMPL(tuning),
9413
+ TOJSON_IMPL(additionalIdentities),
9414
+ TOJSON_IMPL(streamIdPrivacyType)
9012
9415
  };
9013
9416
  }
9014
9417
  static void from_json(const nlohmann::json& j, RallypointServer& p)
@@ -9072,6 +9475,8 @@ namespace AppConfigurationObjects
9072
9475
  getOptional<std::vector<std::string>>("blockedDomains", p.blockedDomains, j);
9073
9476
  getOptional<std::vector<std::string>>("extraDomains", p.extraDomains, j);
9074
9477
  getOptional<TuningSettings>("tuning", p.tuning, j);
9478
+ getOptional<std::vector<NamedIdentity>>("additionalIdentities", p.additionalIdentities, j);
9479
+ getOptional<RallypointServer::StreamIdPrivacyType_t>("streamIdPrivacyType", p.streamIdPrivacyType, j, RallypointServer::StreamIdPrivacyType_t::sptDefault);
9075
9480
  }
9076
9481
 
9077
9482
  //-----------------------------------------------------------
@@ -9609,6 +10014,9 @@ namespace AppConfigurationObjects
9609
10014
  /** @brief Array of subject elements */
9610
10015
  std::vector<CertificateSubjectElement> subjectElements;
9611
10016
 
10017
+ /** @brief Array of issuer elements */
10018
+ std::vector<CertificateSubjectElement> issuerElements;
10019
+
9612
10020
  /** @brief PEM version of the certificate */
9613
10021
  std::string certificatePem;
9614
10022
 
@@ -9631,6 +10039,7 @@ namespace AppConfigurationObjects
9631
10039
  serial.clear();
9632
10040
  fingerprint.clear();
9633
10041
  subjectElements.clear();
10042
+ issuerElements.clear();
9634
10043
  certificatePem.clear();
9635
10044
  publicKeyPem.clear();
9636
10045
  }
@@ -9648,6 +10057,7 @@ namespace AppConfigurationObjects
9648
10057
  TOJSON_IMPL(serial),
9649
10058
  TOJSON_IMPL(fingerprint),
9650
10059
  TOJSON_IMPL(subjectElements),
10060
+ TOJSON_IMPL(issuerElements),
9651
10061
  TOJSON_IMPL(certificatePem),
9652
10062
  TOJSON_IMPL(publicKeyPem)
9653
10063
  };
@@ -9666,6 +10076,7 @@ namespace AppConfigurationObjects
9666
10076
  getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
9667
10077
  getOptional<std::string>("publicKeyPem", p.publicKeyPem, j, EMPTY_STRING);
9668
10078
  getOptional<std::vector<CertificateSubjectElement>>("subjectElements", p.subjectElements, j);
10079
+ getOptional<std::vector<CertificateSubjectElement>>("issuerElements", p.issuerElements, j);
9669
10080
  }
9670
10081
 
9671
10082
 
@@ -9975,6 +10386,12 @@ namespace AppConfigurationObjects
9975
10386
 
9976
10387
  /** @brief TX has ended with a failure */
9977
10388
  txsTxEndedWithFailure = -10,
10389
+
10390
+ /** @brief Attempt to transmit on a bridged group that is not bomMultistream */
10391
+ txsBridgedButNotMultistream = -11,
10392
+
10393
+ /** @brief Transmission was automatically ended because the group became bridged on a non-multistream configuration */
10394
+ txsAutoEndedDueToNonMultistreamBridge = -12
9978
10395
  } TxStatus_t;
9979
10396
 
9980
10397
  /** @brief ID of the group */
@@ -10097,6 +10514,12 @@ namespace AppConfigurationObjects
10097
10514
 
10098
10515
  /** @brief The transport type is invalid */
10099
10516
  csInvalidTransport = -11,
10517
+
10518
+ /** @brief Audio input device not found in registry */
10519
+ csAudioInputDeviceNotFound = -12,
10520
+
10521
+ /** @brief Audio output device not found in registry */
10522
+ csAudioOutputDeviceNotFound = -13
10100
10523
  } CreationStatus_t;
10101
10524
 
10102
10525
  /** @brief ID of the group */
@@ -11250,26 +11673,33 @@ namespace AppConfigurationObjects
11250
11673
  IMPLEMENT_JSON_DOCUMENTATION(BridgingServerConfiguration)
11251
11674
 
11252
11675
  public:
11253
- /** @brief Enum describing the modes the briging service runs in. */
11676
+ /** @brief Enum describing the default mode the bridging service runs in. Values of omRaw,
11677
+ * omMultistream, omAnonymousMixedStream all cause the service to force the
11678
+ * groups in a bridge to the appropriate type. A value of omADictatedByGroup prevents
11679
+ * the service from forcing the individual groups' "type" and "bom" values and
11680
+ * instead relies on the individual groups to be correctly defined in the configuration.
11681
+ */
11254
11682
  typedef enum
11255
11683
  {
11256
- /** @brief Raw mode (default) - packet payloads are not accessed or modified and forwarded as raw packets */
11684
+ /** @brief Raw mode (default) - packet payloads are not accessed or modified and forwarded as raw packets. */
11257
11685
  omRaw = 0,
11258
11686
 
11259
- /** @brief Audio payloads are transformed, headers are preserved, multiple parallel output streams are possible/expected */
11260
- omPayloadTransformation = 1,
11687
+ /** @brief Audio payloads are transformed, headers are preserved, multiple parallel output streams are
11688
+ * possible/expected. In this mode all groups must be gtAudio (type = 1).*/
11689
+ omMultistream = 1,
11261
11690
 
11262
- /** @brief Audio payloads are mixed - output is anonymous (i.e. no metadata) if if the target group(s) allow header extensions */
11263
- omAnonymousMixing = 2,
11691
+ /** @brief Audio payloads are mixed - output is anonymous (i.e. no metadata) even if the target group(s)
11692
+ * allow header extensions. In this mode all groups must be gtAudio (type = 1). */
11693
+ omMixedStream = 2,
11264
11694
 
11265
- /** @brief Audio payloads are translated between group-specific languages */
11266
- omLanguageTranslation = 3
11695
+ /** @brief Operation is dictated by the individual groups in the bridge */
11696
+ omADictatedByGroup = 3,
11267
11697
  } OpMode_t;
11268
11698
 
11269
11699
  /** @brief A unqiue identifier for the bridge server */
11270
11700
  std::string id;
11271
11701
 
11272
- /** @brief Specifies the operation mode (see @ref OpMode_t). */
11702
+ /** @brief Specifies the default operation mode (see @ref OpMode_t). */
11273
11703
  OpMode_t mode;
11274
11704
 
11275
11705
  /** @brief Number of seconds between checks to see if the service configuration has been updated. Default is 60.*/
@@ -24,10 +24,11 @@
24
24
  #endif
25
25
 
26
26
  static const size_t ENGAGE_MAX_CRYPTO_PASSWORD_BYTES = 256;
27
+ static const uint64_t ENGAGE_ROOT_CA_CERTIFICATE_CACHE_EXPIRATION_MS = (60 * 1000);
27
28
 
28
29
  static const int ENGAGE_INVALID_IP_ADDRESS_FAMILY = -1;
29
30
 
30
- static const size_t ENGAGE_MAX_RTP_OUTPUT_QUEUE_PACKETS = 100;
31
+ static const size_t ENGAGE_MAX_OUTPUT_QUEUED_UDP_PACKETS = 1024;
31
32
 
32
33
  static const size_t ENGAGE_MAX_IP_ADDR_SIZE = sizeof(struct sockaddr_in6);
33
34
  static const size_t ENGAGE_MAX_ALIAS_SIZE = 16;
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "engage-engine",
3
- "version": "1.251.90910019",
3
+ "version": "1.251.90910021",
4
4
  "description": "Use Engage to communicate with everyone, everywhere, from any device",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"