Skip to main content

Relay.Calling.FaxAction

This object returned from faxReceiveAsync and faxSendAsync methods represents a receiving or sending Fax on the call.

Properties​

PropertyTypeDescription
resultRelay.Calling.FaxResultFinal result for the fax action
completedbooleanWhether the action has finished
payloadobjectPayload sent to Relay to start faxing
controlIdstringUUID to identify the fax action

Methods​

stop​

Stop the action immediately.

Parameters

None

Returns

Promise<StopResult> - Promise object that will be fulfilled with a Relay.Calling.StopResult object.

Examples

Start sending fax and stop it after 5 seconds.

async function main() {
const faxAction = await call.faxSendAsync('https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf')

// For demonstration purposes only..
setTimeout(async () => {
const stopResult = await faxAction.stop()
}, 5000)
}

main().catch(console.error)