***

title: hangup
slug: /reference/python/agents/swml-builder/hangup
description: Add a hangup verb to end the current call.
max-toc-depth: 3
---------------------

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

Add a `hangup` verb to the main section. Ends the current call.

## **Parameters**

<ParamField path="reason" type="Optional[str]" toc={true}>
  Reason for the hangup. Valid values: `"hangup"`, `"busy"`, `"decline"`.
</ParamField>

## **Returns**

`Self` -- The builder instance for method chaining.

## **Example**

```python {10}
from signalwire import SWMLService, SWMLBuilder

service = SWMLService(name="ivr")
builder = SWMLBuilder(service)

doc = (
    builder
    .answer()
    .play(url="https://example.com/goodbye.mp3")
    .hangup(reason="Call completed")
    .build()
)
print(doc)
```