***

title: hangup
slug: /reference/typescript/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="string" 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**

`Promise<Record<string, unknown>>` -- Server response confirming the hangup.

## **Example**

```typescript {11}
import { RelayClient } from '@signalwire/sdk';

const client = new RelayClient({
  project: process.env.SIGNALWIRE_PROJECT_ID!,
  token: process.env.SIGNALWIRE_TOKEN!,
  contexts: ['default']
});

client.onCall(async (call) => {
  await call.answer();
  await call.hangup();
  console.log('Call ended');
});

await client.run();
```