CallDetect

View as Markdown

SignalWire.Relay.Calling.CallDetect

This object represents a call detection.

Constructor

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

Parameters

None

Examples

Basic Example

1CallDetect detect = new CallDetect
2{
3 Type = CallDetect.DetectType.machine,
4 Parameters = new CallDetect.MachineParams
5 {
6 // Use default machine detection parameters
7 }
8};

Properties

PropertyTypeDescription
TypeSignalWire.Relay.Calling.CallDetect.DetectTypeThis object indicates the type of the configuration object.
ParametersobjectThe configuration object for the operation.

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.CallDetect.DetectType for more information.

Returns

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

Examples

1CallDetect.DigitParams digitParams = detect.ParametersAs<CallDetect.DigitParams>();
2CallDetect.FaxParams faxParams = detect.ParametersAs<CallDetect.FaxParams>();
3CallDetect.MachineParams machineParams = detect.ParametersAs<CallDetect.MachineParams>();

Events

None