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

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="release_caller", description="Release the caller from hold")
def release_caller(args, raw_data):
caller_call_id = args.get("original_call_id")
return (
FunctionResult("Returning you to the caller.")
.rpc_ai_message(caller_call_id, "You can take their message now.")
.rpc_ai_unhold(caller_call_id)
)
agent.serve()