***

title: connect
slug: /reference/python/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/python/relay/call#events

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

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

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

[play]: /docs/server-sdks/reference/python/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="list[list[dict]]" required={true} toc={true}>
  A list of device groups for serial/parallel dialing. The outer list is tried
  serially (one group at a time). Each inner list is dialed in parallel
  (all devices in the group ring simultaneously).

  Each device dict contains:

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

<ParamField path="ringback" type="Optional[list[dict]]" 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="Optional[str]" toc={true}>
  Correlation tag for the connected call.
</ParamField>

<ParamField path="max_duration" type="Optional[int]" toc={true}>
  Maximum duration of the connected call in seconds.
</ParamField>

<ParamField path="max_price_per_minute" type="Optional[float]" toc={true}>
  Maximum price per minute for the connected call.
</ParamField>

<ParamField path="status_url" type="Optional[str]" toc={true}>
  URL to receive connection status webhooks.
</ParamField>

## **Returns**

`dict` -- Server response confirming the connect operation.

## **Example**

```python {16}
from signalwire.relay import RelayClient

client = RelayClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
    contexts=["default"],
)

@client.on_call
async def handle_call(call):
    await call.answer()
    await call.play([{"type": "tts", "text": "Connecting you now..."}])

    # Serial dialing: try first number, then second if no answer
    result = await call.connect([
        [{"type": "phone", "params": {"to_number": "+15551234567", "from_number": "+15559876543"}}],
        [{"type": "phone", "params": {"to_number": "+15559999999", "from_number": "+15559876543"}}],
    ])
    print(f"Connect result: {result}")

client.run()
```