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

# set_cxml_webhook

> Route inbound calls to a cXML (LAML) webhook.

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

Route inbound calls on this phone number to a cXML (Twilio-compat / LAML) webhook.
Despite the wire value `laml_webhooks` being plural, this creates a single
`cxml_webhook` Fabric resource on the server.

This is a typed wrapper over [`update`][update] that sets `call_handler` to
`laml_webhooks` and populates the URL fields for you.

<Note>
  For SWML webhooks, use
  [`set_swml_webhook`](/docs/server-sdks/reference/python/rest/phone-numbers/set-swml-webhook)
  instead.
</Note>

## **Parameters**

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

<ParamField path="url" type="str" required={true} toc={true}>
  Primary cXML webhook URL.
</ParamField>

<ParamField path="fallback_url" type="Optional[str]" toc={true}>
  URL invoked when the primary URL fails.
</ParamField>

<ParamField path="status_callback_url" type="Optional[str]" toc={true}>
  URL that receives call-status updates.
</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_cxml_webhook(
    "phone-number-id",
    "https://example.com/cxml",
    fallback_url="https://example.com/cxml-fallback",
    status_callback_url="https://example.com/status",
)
```