***

title: connect
slug: /reference/typescript/relay/call/connect
description: Bridge a call to one or more destinations.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[calling-call-connect]: /docs/server-sdks/reference/typescript/relay/call#events

[call-events]: /docs/server-sdks/reference/typescript/relay/call#events

[connect]: /docs/swml/reference/connect

[swml-connect-reference]: /docs/swml/reference/connect

[play]: /docs/server-sdks/reference/typescript/relay/call/play

Bridge the call to one or more destinations. The `devices` parameter supports
both serial (try one at a time) and parallel (ring simultaneously) dialing
strategies.

<Info>
  This method emits [`calling.call.connect`][calling-call-connect] events. See [Call Events][call-events] for payload details.
</Info>

<Info>
  This method corresponds to the SWML [`connect`][connect] verb. See the
  [SWML connect reference][swml-connect-reference] for the full specification.
</Info>

## **Parameters**

<ParamField path="devices" type={"Record<string, unknown>[][]"} required={true} toc={true}>
  An array of device groups for serial/parallel dialing. The outer array is tried
  serially (one group at a time). Each inner array is dialed in parallel
  (all devices in the group ring simultaneously).

  Each device object contains:

  * `"type"` -- Device type (`"phone"`, `"sip"`)
  * `"params"` -- Type-specific parameters (`to_number`, `from_number`, etc.)
</ParamField>

<ParamField path="ringback" type={"Record<string, unknown>[] | undefined"} toc={true}>
  Media items to play to the caller while the destination is ringing. Same
  format as [`play()`][play] media items.
</ParamField>

<ParamField path="tag" type="string | undefined" toc={true}>
  Correlation tag for the connected call.
</ParamField>

<ParamField path="maxDuration" type="number | undefined" toc={true}>
  Maximum duration of the connected call in seconds.
</ParamField>

<ParamField path="maxPricePerMinute" type="number | undefined" toc={true}>
  Maximum price per minute for the connected call.
</ParamField>

<ParamField path="statusUrl" type="string | undefined" toc={true}>
  URL to receive connection status webhooks.
</ParamField>

## **Returns**

`Promise<Record<string, unknown>>` -- Server response confirming the connect operation.

## **Example**

```typescript {14}
import { RelayClient } from '@signalwire/sdk';

const client = new RelayClient({
  project: process.env.SIGNALWIRE_PROJECT_ID!,
  token: process.env.SIGNALWIRE_TOKEN!,
  contexts: ['default']
});

client.onCall(async (call) => {
  await call.answer();
  await call.play([{ type: 'tts', text: 'Connecting you now...' }]);

  // Serial dialing: try first number, then second if no answer
  const result = await call.connect([
    [{ type: 'phone', params: { to_number: '+15551234567', from_number: '+15559876543' } }],
    [{ type: 'phone', params: { to_number: '+15559999999', from_number: '+15559876543' } }],
  ]);
  console.log(`Connect result: ${JSON.stringify(result)}`);
});

await client.run();
```