/// <summary> /// Initializes a new instance of the <see cref="ConnectivityAccount" /> class. /// </summary> /// <param name="authRealm">The realm any device in the account will use to authenticate with.</param> /// <param name="callerId">callerId.</param> /// <param name="emergencyCallerId">emergencyCallerId.</param> /// <param name="trunks">The number of two-way trunks this account has purchased.</param> public ConnectivityAccount(string authRealm = default(string), ConnectivityAccountCallerId callerId = default(ConnectivityAccountCallerId), ConnectivityAccountCallerId emergencyCallerId = default(ConnectivityAccountCallerId), int?trunks = default(int?)) { this.AuthRealm = authRealm; this.CallerId = callerId; this.EmergencyCallerId = emergencyCallerId; this.Trunks = trunks; }
/// <summary> /// Initializes a new instance of the <see cref="ConnectivityOptions" /> class. /// </summary> /// <param name="callerId">callerId.</param> /// <param name="delay">The time, in seconds, to wait before attempting to call the server.</param> /// <param name="dynamicFlags">List of function names (or 'zone') that are called on the Call record to populate the 'flags' array sent to the resource(s) for matching.</param> /// <param name="emergencyCallerId">emergencyCallerId.</param> /// <param name="enabled">Is the server ready for sending and receiving calls (default to true).</param> /// <param name="failover">failover.</param> /// <param name="flags">List of flags to use when matching resources to route the call.</param> /// <param name="forceOutbound">If true, will send the call over configured carriers instead of to the server (as opposed to the 'enabled' flag, which will reject the calls) (default to false).</param> /// <param name="huntAccountId">When using local resources, use this account instead of the account making the call (useful for resellers).</param> /// <param name="huntNonReconcilable">Whether to allow routing to continue on a non-reconcilable TO number (default to false).</param> /// <param name="ignoreEarlyMedia">ignoreEarlyMedia.</param> /// <param name="inboundFormat">Determines how the INVITE is sent to the server (default to InboundFormatEnum.Npan).</param> /// <param name="ip">IP (sip) address for this device.</param> /// <param name="mediaHandling">Determine whether the switch should be in the media path or not (default to MediaHandlingEnum.Bypass).</param> /// <param name="port">Port to send SIP traffic for the remote device.</param> /// <param name="progressTimeout">The time, in seconds, to wait for the server to progress in the call, before trying an optionally defined failover route or terminating the call.</param> /// <param name="sipHeaders">List of arbitrary SIP headers to add to the INVITE.</param> /// <param name="timeout">The time, in seconds, to wait for an answer from the server.</param> public ConnectivityOptions(ConnectivityOptionsCallerId callerId = default(ConnectivityOptionsCallerId), int?delay = default(int?), List <string> dynamicFlags = default(List <string>), ConnectivityAccountCallerId emergencyCallerId = default(ConnectivityAccountCallerId), bool?enabled = true, ConnectivityOptionsFailover failover = default(ConnectivityOptionsFailover), List <string> flags = default(List <string>), bool?forceOutbound = false, string huntAccountId = default(string), bool?huntNonReconcilable = false, bool?ignoreEarlyMedia = default(bool?), InboundFormatEnum?inboundFormat = InboundFormatEnum.Npan, string ip = default(string), MediaHandlingEnum?mediaHandling = MediaHandlingEnum.Bypass, int?port = default(int?), int?progressTimeout = default(int?), List <Object> sipHeaders = default(List <Object>), int?timeout = default(int?)) { this.CallerId = callerId; this.Delay = delay; this.DynamicFlags = dynamicFlags; this.EmergencyCallerId = emergencyCallerId; // use default value if no "enabled" provided if (enabled == null) { this.Enabled = true; } else { this.Enabled = enabled; } this.Failover = failover; this.Flags = flags; // use default value if no "forceOutbound" provided if (forceOutbound == null) { this.ForceOutbound = false; } else { this.ForceOutbound = forceOutbound; } this.HuntAccountId = huntAccountId; // use default value if no "huntNonReconcilable" provided if (huntNonReconcilable == null) { this.HuntNonReconcilable = false; } else { this.HuntNonReconcilable = huntNonReconcilable; } this.IgnoreEarlyMedia = ignoreEarlyMedia; // use default value if no "inboundFormat" provided if (inboundFormat == null) { this.InboundFormat = InboundFormatEnum.Npan; } else { this.InboundFormat = inboundFormat; } this.Ip = ip; // use default value if no "mediaHandling" provided if (mediaHandling == null) { this.MediaHandling = MediaHandlingEnum.Bypass; } else { this.MediaHandling = mediaHandling; } this.Port = port; this.ProgressTimeout = progressTimeout; this.SipHeaders = sipHeaders; this.Timeout = timeout; }