Skip to main content

SignalWire.Relay.Calling.PromptAction

This object returned from one of asynchronous Prompt methods that represent a prompt operation that is currently active on a call.

Properties

PropertyTypeDescription
ControlIDstringThe identifier used to control the operation.
ResultSignalWire.Relay.Calling.PromptResultFinal result of this prompt.
StateSignalWire.Relay.Calling.CallPlayStateCurrent state of the play operation.
CompletedboolWhether the prompt operation has completed.
PlayPayloadList<SignalWire.Relay.Calling.CallMedia>Payload sent to Relay to start playing.
CollectPayloadSignalWire.Relay.Calling.CallCollectPayload sent to Relay to collect input.

Methods

Stop

Stop the action immediately.

Parameters

None

Returns

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

Examples

Ask user to enter a PIN and stop the action after 5 seconds.

PromptAction actionPrompt = call.PromptTTSAsync(
"Welcome to SignalWire! Please enter your PIN",
new CallCollect
{
InitialTimeout = 10,
Digits = new CallCollect.DigitsParams
{
Max = 4,
DigitTimeout = 5,
}
});

Thread.Sleep(5000);

StopResult resultStop = actionPrompt.Stop();

Volume

Change the volume of the action immediately.

Parameters

ParameterTypeRequiredDescription
volumedoubleThe volume from -40dB to +40dB where 0 is unchanged.

Returns

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

Examples

Ask user to enter a PIN and change the volume after 1 second.

PromptAction actionPrompt = call.PromptTTSAsync(
"Welcome to SignalWire! Please enter your PIN",
new CallCollect
{
InitialTimeout = 10,
Digits = new CallCollect.DigitsParams
{
Max = 4,
DigitTimeout = 5,
}
});

Thread.Sleep(1000);

actionPrompt.Volume(4.0);