***

title: hangup
slug: /reference/python/relay/call/hangup
description: End a RELAY call.
max-toc-depth: 3
---------------------

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

End the call. The call transitions through the `ending` state and then to
`ended`. Any active operations (play, record, etc.) are stopped automatically
when the call ends.

## **Parameters**

<ParamField path="reason" type="str" default="hangup" toc={true}>
  The end reason string sent to the server. Valid values:

  * `"hangup"` -- normal hangup (default)
  * `"cancel"` -- cancel the call
  * `"busy"` -- signal busy
  * `"decline"` -- decline the call
</ParamField>

## **Returns**

`dict` -- Server response confirming the hangup.

## **Example**

```python {13}
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.hangup()
    print("Call ended")

client.run()
```