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

# set_relay_application

> Route inbound calls to a named RELAY application.

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

Route inbound calls on this phone number to a named RELAY application. The server
auto-creates a `relay_application` Fabric resource referencing the application name.

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

## **Parameters**

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

<ParamField path="name" type="str" required={true} toc={true}>
  Name of the RELAY application to route calls to.
</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_application(
    "phone-number-id",
    "my-relay-app",
)
```