Skip to main content

SignalWire.Relay.Calling.TapAction

This object returned from TapAsync method that represents a tap operation that is currently active on a call.

Properties​

PropertyTypeDescription
ControlIDstringThe identifier used to control the operation.
ResultSignalWire.Relay.Calling.TapResultFinal result of tapping.
StateSignalWire.Relay.Calling.CallTapStateCurrent state of the tap operation.
CompletedboolWhether the tap operation has completed.
PayloadSignalWire.Relay.Calling.CallTapPayload sent to Relay to start the tap operation.
SourceDeviceSignalWire.Relay.Calling.CallTapDeviceThe source device of the tap operation.

Methods​

Stop​

Stop the action immediately.

Parameters

None

Returns

SignalWire.Relay.Calling.StopResult - The result object to interact with.

Examples

Start tapping and stop it if agent is not available in 3 seconds.

TapAction actionTap = call.TapAsync(
new CallTap
{
Audio = new CallTap.AudioParams
{
Direction = CallTap.AudioParams.AudioDirection.both,
}
},
new CallTapDevice
{
Type = CallTapDevice.DeviceType.rtp,
Parameters = new CallTapDevice.RTPParams
{
Address = "1.2.3.4",
Port = 12345,
}
});

Thread.Sleep(3000);

if (!agent.IsAvailable)
{
StopResult resultStop = actionTap.Stop();
}