hold
Put the call on hold. The caller hears hold music until the hold is released or the timeout expires.
Parameters
timeout
Maximum hold duration in seconds. Clamped to the range 0—900 (15 minutes max).
Returns
FunctionResult — self, for chaining.
Put the call on hold. The caller hears hold music until the hold is released or the timeout expires.
Maximum hold duration in seconds. Clamped to the range 0—900 (15 minutes max).
FunctionResult — self, for chaining.
1 from signalwire import AgentBase 2 from signalwire import FunctionResult 3 4 agent = AgentBase(name="my-agent", route="/agent") 5 agent.set_prompt_text("You are a helpful assistant.") 6 7 @agent.tool(name="hold_for_agent", description="Place the caller on hold") 8 def hold_for_agent(args, raw_data): 9 return ( 10 FunctionResult("Please hold while I find an available agent.") 11 .hold(timeout=60) 12 ) 13 14 agent.serve()