pass

View as MarkdownOpen in Claude

Decline control of an inbound call, returning it to the SignalWire routing engine. The call is not ended — it continues to ring and may be delivered to another Relay client or routing rule.

Parameters

None.

Returns

Promise<Record<string, unknown>> — Server response confirming the pass operation.

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) => {
// Only handle calls from a specific context
if (call.context !== 'sales') {
await call.pass();
console.log('Call passed back to routing');
return;
}
await call.answer();
});
await client.run();