Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Devices" /> class.
 /// </summary>
 /// <param name="callForward">callForward.</param>
 /// <param name="callRecording">callRecording.</param>
 /// <param name="callRestriction">Device level call restrictions for each available number classification.</param>
 /// <param name="callWaiting">callWaiting.</param>
 /// <param name="callerId">The device caller ID parameters.</param>
 /// <param name="callerIdOptions">callerIdOptions.</param>
 /// <param name="contactList">contactList.</param>
 /// <param name="deviceType">Arbitrary device type used by the UI and billing system.</param>
 /// <param name="dialPlan">A list of rules used to modify dialed numbers.</param>
 /// <param name="doNotDisturb">doNotDisturb.</param>
 /// <param name="enabled">Determines if the device is currently enabled (default to true).</param>
 /// <param name="excludeFromQueues">Do not ring this device when calling user/agent in queue (default to false).</param>
 /// <param name="flags">Flags set by external applications.</param>
 /// <param name="formatters">formatters.</param>
 /// <param name="hotdesk">hotdesk.</param>
 /// <param name="language">The language for the device.</param>
 /// <param name="macAddress">The MAC Address of the device (if applicable).</param>
 /// <param name="media">Configure audio/video/etc media options for this device.</param>
 /// <param name="metaflows">The device metaflow parameters.</param>
 /// <param name="musicOnHold">musicOnHold.</param>
 /// <param name="mwiUnsolicitedUpdates">When true enables unsolicited mwi notifications (default to true).</param>
 /// <param name="name">A friendly name for the device (required).</param>
 /// <param name="outboundFlags">List of flags (features) this device requires when making outbound calls.</param>
 /// <param name="ownerId">The ID of the user object that &#39;owns&#39; the device.</param>
 /// <param name="presenceId">Static presence ID (used instead of SIP username).</param>
 /// <param name="provision">provision.</param>
 /// <param name="registerOverwriteNotify">When true enables overwrite notifications (default to false).</param>
 /// <param name="ringtones">ringtones.</param>
 /// <param name="sip">sip.</param>
 /// <param name="suppressUnregisterNotifications">When true disables deregister notifications (default to false).</param>
 /// <param name="timezone">Device&#39;s timezone.</param>
 public Devices(DevicesCallForward callForward = default(DevicesCallForward), CallRecording callRecording = default(CallRecording), Dictionary <string, AccountsCallRestriction> callRestriction = default(Dictionary <string, AccountsCallRestriction>), CallWaiting callWaiting = default(CallWaiting), CallerId callerId = default(CallerId), DevicesCallerIdOptions callerIdOptions = default(DevicesCallerIdOptions), DevicesContactList contactList = default(DevicesContactList), string deviceType = default(string), Dialplans dialPlan = default(Dialplans), DevicesDoNotDisturb doNotDisturb = default(DevicesDoNotDisturb), bool?enabled = true, bool?excludeFromQueues = false, List <string> flags = default(List <string>), Formatters formatters = default(Formatters), DevicesHotdesk hotdesk = default(DevicesHotdesk), string language = default(string), string macAddress = default(string), EndpointMedia media = default(EndpointMedia), Metaflows metaflows = default(Metaflows), ClicktocallMusicOnHold musicOnHold = default(ClicktocallMusicOnHold), bool?mwiUnsolicitedUpdates = true, string name = default(string), Object outboundFlags = default(Object), string ownerId = default(string), string presenceId = default(string), DevicesProvision provision = default(DevicesProvision), bool?registerOverwriteNotify = false, AccountsRingtones ringtones = default(AccountsRingtones), DevicesSip sip = default(DevicesSip), bool?suppressUnregisterNotifications = false, string timezone = default(string))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for Devices and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     this.CallForward     = callForward;
     this.CallRecording   = callRecording;
     this.CallRestriction = callRestriction;
     this.CallWaiting     = callWaiting;
     this.CallerId        = callerId;
     this.CallerIdOptions = callerIdOptions;
     this.ContactList     = contactList;
     this.DeviceType      = deviceType;
     this.DialPlan        = dialPlan;
     this.DoNotDisturb    = doNotDisturb;
     // use default value if no "enabled" provided
     if (enabled == null)
     {
         this.Enabled = true;
     }
     else
     {
         this.Enabled = enabled;
     }
     // use default value if no "excludeFromQueues" provided
     if (excludeFromQueues == null)
     {
         this.ExcludeFromQueues = false;
     }
     else
     {
         this.ExcludeFromQueues = excludeFromQueues;
     }
     this.Flags       = flags;
     this.Formatters  = formatters;
     this.Hotdesk     = hotdesk;
     this.Language    = language;
     this.MacAddress  = macAddress;
     this.Media       = media;
     this.Metaflows   = metaflows;
     this.MusicOnHold = musicOnHold;
     // use default value if no "mwiUnsolicitedUpdates" provided
     if (mwiUnsolicitedUpdates == null)
     {
         this.MwiUnsolicitedUpdates = true;
     }
     else
     {
         this.MwiUnsolicitedUpdates = mwiUnsolicitedUpdates;
     }
     this.OutboundFlags = outboundFlags;
     this.OwnerId       = ownerId;
     this.PresenceId    = presenceId;
     this.Provision     = provision;
     // use default value if no "registerOverwriteNotify" provided
     if (registerOverwriteNotify == null)
     {
         this.RegisterOverwriteNotify = false;
     }
     else
     {
         this.RegisterOverwriteNotify = registerOverwriteNotify;
     }
     this.Ringtones = ringtones;
     this.Sip       = sip;
     // use default value if no "suppressUnregisterNotifications" provided
     if (suppressUnregisterNotifications == null)
     {
         this.SuppressUnregisterNotifications = false;
     }
     else
     {
         this.SuppressUnregisterNotifications = suppressUnregisterNotifications;
     }
     this.Timezone = timezone;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Clicktocall" /> class.
 /// </summary>
 /// <param name="authRequired">Determines if this click to call requires valid auth-tokens when invoked (default to true).</param>
 /// <param name="bypassMedia">Default bypass media mode (The string type is deprecated, please use this as a boolean).</param>
 /// <param name="callerIdNumber">Explicitly set caller id number.</param>
 /// <param name="customApplicationVars">Key-value pairs to set as custom_application_vars on the channel.</param>
 /// <param name="customSipHeaders">A property list of SIP headers.</param>
 /// <param name="dialFirst">Determines what will be dialed first: extension or contact.</param>
 /// <param name="extension">The extension to connect to when the click to call is invoked (required).</param>
 /// <param name="media">media.</param>
 /// <param name="musicOnHold">musicOnHold.</param>
 /// <param name="name">A friendly name for the click to call (required).</param>
 /// <param name="outboundCalleeIdName">Callee ID Name of the device calling out to the contact number.</param>
 /// <param name="outboundCalleeIdNumber">Callee ID Number of the device calling out to the contact number.</param>
 /// <param name="presenceId">Static presence ID (used instead of SIP username).</param>
 /// <param name="ringback">Ringback to use.</param>
 /// <param name="throttle">The rate that this click to call can be invoked.</param>
 /// <param name="timeout">How long, in seconds, to wait for the call to progress.</param>
 /// <param name="whitelist">A list of regular expressions that the click to call can dial to.</param>
 public Clicktocall(bool?authRequired = true, Object bypassMedia = default(Object), string callerIdNumber = default(string), Object customApplicationVars = default(Object), Object customSipHeaders = default(Object), DialFirstEnum?dialFirst = default(DialFirstEnum?), string extension = default(string), ClicktocallMedia media = default(ClicktocallMedia), ClicktocallMusicOnHold musicOnHold = default(ClicktocallMusicOnHold), string name = default(string), string outboundCalleeIdName = default(string), string outboundCalleeIdNumber = default(string), string presenceId = default(string), string ringback = default(string), int?throttle = default(int?), int?timeout = default(int?), List <string> whitelist = default(List <string>))
 {
     // to ensure "extension" is required (not null)
     if (extension == null)
     {
         throw new InvalidDataException("extension is a required property for Clicktocall and cannot be null");
     }
     else
     {
         this.Extension = extension;
     }
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for Clicktocall and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     // use default value if no "authRequired" provided
     if (authRequired == null)
     {
         this.AuthRequired = true;
     }
     else
     {
         this.AuthRequired = authRequired;
     }
     this.BypassMedia           = bypassMedia;
     this.CallerIdNumber        = callerIdNumber;
     this.CustomApplicationVars = customApplicationVars;
     this.CustomSipHeaders      = customSipHeaders;
     this.DialFirst             = dialFirst;
     this.Media                  = media;
     this.MusicOnHold            = musicOnHold;
     this.OutboundCalleeIdName   = outboundCalleeIdName;
     this.OutboundCalleeIdNumber = outboundCalleeIdNumber;
     this.PresenceId             = presenceId;
     this.Ringback               = ringback;
     this.Throttle               = throttle;
     this.Timeout                = timeout;
     this.Whitelist              = whitelist;
 }