Relay.Calling.PromptAction
This object returned from one of asynchronous prompt methods that represents a prompt attempt that is currently active on a call.
Methods
getControlId
Return the UUID to identify the prompt attempt.
Parameters
None
Returns
string - UUID to identify the action.
Examples
Start the attempt and print the controlId.
getPayload
Return the payload sent to Relay to initiate the request. Useful to inspect what you sent to perform this action.
Parameters
None
Returns
Object - Payload sent to Relay.
Examples
Start the attempt and print out the payload.
getResult
Returns the final result of the prompt attempt.
Parameters
None
Returns
Relay.Calling.PromptResult - Final result of the prompt attempt.
Examples
Start the attempt and grab the result when it’s completed.
getState
Return the current state of the prompt attempt.
Parameters
None
Returns
string - Current state of the prompt attempt.
Examples
Start the attempt and print the state.
isCompleted
Return true if the prompt attempt has finished, false otherwise.
Parameters
None
Returns
Boolean - True/False accordingly to the state.
Examples
Start the attempt and check if it has finished.
stop
Stop the action immediately.
Parameters
None
Returns
React\Promise\Promise - Promise object that will be fulfilled with a Relay.Calling.StopResult object.
Examples
Start the attempt and then stop it.
volume
Control the volume of the playback.
Parameters
Returns
React\Promise\Promise - Promise object that will be fulfilled with a Relay.Calling.PromptVolumeResult object.
Examples
Start the prompt and increase the playback volume.