***

title: stop_record_call
slug: /reference/python/agents/function-result/stop-record-call
description: Stop an active background call recording.
max-toc-depth: 3
---------------------

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

[functionresult]: /docs/server-sdks/reference/python/agents/function-result

Stop an active background call recording.

## **Parameters**

<ParamField path="control_id" type="Optional[str]" default="None" toc={true}>
  Identifier of the recording to stop. If not provided, the most recent
  recording is stopped.
</ParamField>

## **Returns**

[`FunctionResult`][functionresult] — self, for chaining.

## **Example**

```python {11}
from signalwire import AgentBase
from signalwire import FunctionResult

agent = AgentBase(name="my-agent", route="/agent")
agent.set_prompt_text("You are a helpful assistant.")

@agent.tool(name="stop_recording", description="Stop recording the call")
def stop_recording(args, raw_data):
    return (
        FunctionResult("Recording stopped.")
        .stop_record_call(control_id="main_recording")
    )

agent.serve()
```