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

# echo

> Echo call audio back to the caller for testing.

[calling-call-echo]: /docs/server-sdks/reference/typescript/relay/call#events

[call-events]: /docs/server-sdks/reference/typescript/relay/call#events

Echo audio back to the caller. This is primarily useful for testing audio
quality, latency, and connectivity. The caller hears their own voice repeated
back to them.

This method emits [`calling.call.echo`][calling-call-echo] events. See [Call Events][call-events] for payload details.

## **Parameters**

**`timeout`** `number | undefined`

Maximum duration of the echo in seconds. The echo stops automatically after
this timeout.

---

**`statusUrl`** `string | undefined`

URL to receive echo status webhooks.

---

## **Returns**

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

## **Example**

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

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

client.onCall(async (call) => {
  await call.answer();
  await call.play([{ type: 'tts', text: 'Starting echo test. You should hear yourself.' }]);

  const result = await call.echo({ timeout: 30 });
  console.log(`Echo completed: ${JSON.stringify(result)}`);

  await call.play([{ type: 'tts', text: 'Echo test complete.' }]);
  await call.hangup();
});

await client.run();
```