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

import { RelayClient } from '@signalwire/sdk';
const client = new RelayClient({
project: process.env.SIGNALWIRE_PROJECT_ID!,
token: process.env.SIGNALWIRE_API_TOKEN!,
contexts: ['default']
});
client.onCall(async (call) => {
await call.answer();
const action = await call.sendFax('https://example.com/invoice.pdf', {
identity: '+15559876543',
});
const event = await action.wait();
const faxInfo = (event.params.fax ?? {}) as Record<string, unknown>;
console.log(`Fax pages: ${faxInfo.pages}`);
});
await client.run();