AgentsAgentBase

enable_sip_routing

View as MarkdownOpen in Claude

Enable SIP-based routing for this agent. When enabled, a routing callback endpoint is registered at the specified path. Incoming SIP calls are matched against registered usernames and directed to this agent.

When auto_map is True, common SIP usernames are automatically registered based on the agent’s name and route path.

Parameters

auto_map
boolDefaults to True

Automatically register SIP usernames derived from the agent name and route.

path
strDefaults to /sip

URL path for the SIP routing endpoint.

Returns

AgentBase — Returns self for method chaining.

Example

1from signalwire import AgentBase
2
3agent = AgentBase(name="support", route="/support")
4agent.set_prompt_text("You are a helpful assistant.")
5agent.enable_sip_routing()
6agent.serve()