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

# set_relay_topic

> Route inbound calls to a RELAY topic.

[update]: /docs/server-sdks/reference/python/rest/phone-numbers/update

Route inbound calls on this phone number to a RELAY topic. RELAY clients subscribed
to the topic will receive the inbound call event.

This is a typed wrapper over [`update`][update] that sets `call_handler` to
`relay_topic` and populates `call_relay_topic` for you.

## **Parameters**

<ParamField path="resource_id" type="str" required={true} toc={true}>
  ID of the phone number to bind.
</ParamField>

<ParamField path="topic" type="str" required={true} toc={true}>
  RELAY topic name.
</ParamField>

<ParamField path="status_callback_url" type="Optional[str]" toc={true}>
  URL that receives status updates for calls routed via this topic.
</ParamField>

<ParamField path="**extra" type="Any" toc={true}>
  Additional fields forwarded to `update`.
</ParamField>

## **Returns**

`dict` -- The updated phone number resource.

## **Example**

```python {9}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

client.phone_numbers.set_relay_topic(
    "phone-number-id",
    "office",
    status_callback_url="https://example.com/status",
)
```