add_exit_filler

View as MarkdownOpen in Claude

Add exit fillers for a specific language.

Parameters

language_code
strRequired

Language code (e.g., "en-US", "es") or "default" for a catch-all.

fillers
list[str]Required

List of filler phrases.

Returns

Context — Self for method chaining.

Example

1from signalwire import AgentBase
2
3agent = AgentBase(name="my-agent", route="/agent")
4
5contexts = agent.define_contexts()
6contexts.add_context("default").add_step("menu").set_text("Ask what the caller needs.")
7
8support = contexts.add_context("support")
9support.add_exit_filler("en-US", [
10 "Thank you for contacting support.",
11 "Glad I could help."
12])
13support.add_step("diagnose").set_text("Understand the customer's issue.")
14
15agent.serve()