CallDevice

View as Markdown

SignalWire.Relay.Calling.CallDevice

This object represents a call device.

Constructor

The only constructor is the default constructor, properties should all be assigned by initializer or after construction.

Parameters

None

Examples

Basic Example

1CallDevice device = new CallDevice
2{
3 Type = CallDevice.DeviceType.phone,
4 Parameters = new CallDevice.PhoneParams
5 {
6 ToNumber = "+1XXXXXXXXXX",
7 FromNumber = "+1YYYYYYYYYY",
8 }
9};

Properties

PropertyTypeDescription
TypeSignalWire.Relay.Calling.CallDevice.DeviceTypeThis object indicates the type of the configuration object.
ParametersobjectThe configuration object for the device.

Methods

ParametersAs<T>()

This is a helper method to convert the Parameters to the real type.

Parameters

ParameterTypeRequiredDescription
TTyperequiredThis is the data type for the conversion, see SignalWire.Relay.Calling.CallDevice.DeviceType for more information.

Returns

T - This is an instance of the data type resulting from the conversion, see SignalWire.Relay.Calling.CallDevice.DeviceType for more information.

Examples

1CallDevice.PhoneParams phoneParams = device.ParametersAs<CallDevice.PhoneParams>();

Events

None