rpc_ai_unhold

View as MarkdownOpen in Claude

Release another call from hold. Typically used after injecting a message into the held caller’s AI agent via rpc_ai_message().

Parameters

call_id
strRequired

Call ID of the call to release from hold.

Returns

FunctionResult — self, for chaining.

Example

1from signalwire import AgentBase
2from signalwire import FunctionResult
3
4agent = AgentBase(name="my-agent", route="/agent")
5agent.set_prompt_text("You are a helpful assistant.")
6
7@agent.tool(name="release_caller", description="Release the caller from hold")
8def release_caller(args, raw_data):
9 caller_call_id = args.get("original_call_id")
10 return (
11 FunctionResult("Returning you to the caller.")
12 .rpc_ai_message(caller_call_id, "You can take their message now.")
13 .rpc_ai_unhold(caller_call_id)
14 )
15
16agent.serve()