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

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