FaxAction

View as MarkdownOpen in Claude

Returned from call.sendFax() or call.receiveFax(). Tracks an active fax send or receive operation. Terminal states: finished, error.

Inherits all properties and methods from the base Action interface (controlId, isDone, completed, result, wait()).

Properties

No additional properties beyond the base Action interface.

Methods

Example

1import { RelayClient } from '@signalwire/sdk';
2
3const client = new RelayClient({
4 project: process.env.SIGNALWIRE_PROJECT_ID!,
5 token: process.env.SIGNALWIRE_TOKEN!,
6 contexts: ['default']
7});
8
9client.onCall(async (call) => {
10 await call.answer();
11 const action = await call.sendFax('https://example.com/invoice.pdf', {
12 identity: '+15559876543',
13 });
14
15 const event = await action.wait();
16 const faxInfo = (event.params.fax ?? {}) as Record<string, unknown>;
17 console.log(`Fax pages: ${faxInfo.pages}`);
18});
19
20await client.run();