/// <summary> /// Initializes a new instance of the <see cref="CallflowsGroup" /> class. /// </summary> /// <param name="endpoints">List of endpoint (device/user/group) IDs.</param> /// <param name="failOnSingleReject">If any leg rejects the call, cancel all other legs.</param> /// <param name="id">Group ID.</param> /// <param name="ignoreForward">Whether to ignore forwarded phones (default to true).</param> /// <param name="repeats">How many times to repeat dialing the group.</param> /// <param name="ringback">Ringback to use.</param> /// <param name="ringtones">ringtones.</param> /// <param name="skipModule">When set to true this callflow action is skipped, advancing to the wildcard branch (if any).</param> /// <param name="strategy">How to ring the endpoints (default to StrategyEnum.Simultaneous).</param> /// <param name="timeout">How long to attempt the group.</param> public CallflowsGroup(List <string> endpoints = default(List <string>), bool?failOnSingleReject = default(bool?), string id = default(string), bool?ignoreForward = true, int?repeats = default(int?), string ringback = default(string), CallflowsGroupRingtones ringtones = default(CallflowsGroupRingtones), bool?skipModule = default(bool?), StrategyEnum?strategy = StrategyEnum.Simultaneous, int?timeout = default(int?)) { this.Endpoints = endpoints; this.FailOnSingleReject = failOnSingleReject; this.Id = id; // use default value if no "ignoreForward" provided if (ignoreForward == null) { this.IgnoreForward = true; } else { this.IgnoreForward = ignoreForward; } this.Repeats = repeats; this.Ringback = ringback; this.Ringtones = ringtones; this.SkipModule = skipModule; // use default value if no "strategy" provided if (strategy == null) { this.Strategy = StrategyEnum.Simultaneous; } else { this.Strategy = strategy; } this.Timeout = timeout; }
/// <summary> /// Initializes a new instance of the <see cref="CallflowsRingGroup" /> class. /// </summary> /// <param name="endpoints">Endpoint IDs (devices, users, etc) included in the ring group (required).</param> /// <param name="failOnSingleReject">If any leg rejects the call, cancel all other legs.</param> /// <param name="ignoreForward">If true, will ignore SIP redirect requests for call-forwarded devices (default to true).</param> /// <param name="repeats">How many times to retry the ring group.</param> /// <param name="ringback">Ringback to use.</param> /// <param name="ringtones">ringtones.</param> /// <param name="skipModule">When set to true this callflow action is skipped, advancing to the wildcard branch (if any).</param> /// <param name="strategy">How to ring the members of the group (default to StrategyEnum.Simultaneous).</param> /// <param name="timeout">How long to ring the ring group before continuing, in seconds.</param> public CallflowsRingGroup(List <CallflowsPageGroupEndpoints> endpoints = default(List <CallflowsPageGroupEndpoints>), bool?failOnSingleReject = default(bool?), bool?ignoreForward = true, int?repeats = default(int?), string ringback = default(string), CallflowsGroupRingtones ringtones = default(CallflowsGroupRingtones), bool?skipModule = default(bool?), StrategyEnum?strategy = StrategyEnum.Simultaneous, int?timeout = default(int?)) { // to ensure "endpoints" is required (not null) if (endpoints == null) { throw new InvalidDataException("endpoints is a required property for CallflowsRingGroup and cannot be null"); } else { this.Endpoints = endpoints; } this.FailOnSingleReject = failOnSingleReject; // use default value if no "ignoreForward" provided if (ignoreForward == null) { this.IgnoreForward = true; } else { this.IgnoreForward = ignoreForward; } this.Repeats = repeats; this.Ringback = ringback; this.Ringtones = ringtones; this.SkipModule = skipModule; // use default value if no "strategy" provided if (strategy == null) { this.Strategy = StrategyEnum.Simultaneous; } else { this.Strategy = strategy; } this.Timeout = timeout; }