RELAYCall

answer

View as MarkdownOpen in Claude

Answer an inbound call. This must be called before performing any media operations on the call. For outbound calls created via client.dial(), the call is already answered when the Call object is returned.

Calling answer() on an already-answered call is safe and returns the server response without error.

Parameters

Returns

dict — Server response confirming the answer operation.

Example

1from signalwire.relay import RelayClient
2
3client = RelayClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7 contexts=["default"],
8)
9
10@client.on_call
11async def handle_call(call):
12 result = await call.answer()
13 print(f"Answered call {call.call_id}: {result}")
14
15client.run()