> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# caller

> Add the caller's words to the simulated call.

[ref-sim]: /docs/server-sdks/reference/python/agents/testing/call-simulator

The caller says `text`. It's added to the call log as a `user` turn and clears
`waiting_for_user`. A step that a tool changed is injected before the next
request, so these words count as part of the exchange that entered it.

## Parameters

**`text`** `str` — required

What the caller says, as the recognizer's final text.

---

## Returns

[`CallSimulator`][ref-sim] -- Self, for chaining.

## Example

```python {15-16}
from signalwire import AgentBase, FunctionResult
from signalwire.testing import CallSimulator

agent = AgentBase(name="orders", route="/orders")
agent.prompt_add_section("Role", "You take orders.")
agent.define_tool("review_order", "Read the order back", {"type": "object", "properties": {}},
                  lambda args, raw_data: FunctionResult("Read the order back.").swml_change_step("confirm"))
agent.define_tool("place_order", "Place the order", {"type": "object", "properties": {}},
                  lambda args, raw_data: FunctionResult("Order placed."))
ctx = agent.define_contexts().add_context("default")
ctx.add_step("take").set_text("Take the order.").set_functions(["review_order"])
ctx.add_step("confirm").set_text("Confirm the order.").set_functions(["place_order"]).set_history("isolate")

sim = CallSimulator(agent)
sim.caller("A large tea, please.").agent_says("A large tea. Anything else?")
sim.caller("No, that's all.")
print([entry["role"] for entry in sim.call_log])
# ['system', 'user', 'assistant', 'user']
```