Relay.Calling.FaxAction
This object returned from faxReceiveAsync
and faxSendAsync
methods represents a receiving or sending Fax on the call.
Properties​
Property | Type | Description |
---|---|---|
result | Relay.Calling.FaxResult | Final result for the fax action |
completed | boolean | Whether the action has finished |
payload | object | Payload sent to Relay to start faxing |
controlId | string | UUID 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)