enableSipRouting

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 autoMap is true, SIP usernames are automatically mapped to the agent route.

Parameters

autoMap
booleanDefaults to true

When true, automatically map SIP usernames to the agent route.

path
stringDefaults to /sip

URL path for the SIP routing endpoint.

Returns

AgentBase — Returns this for method chaining.

Example

1import { AgentBase } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'support', route: '/support' });
4agent.setPromptText('You are a helpful assistant.');
5agent.enableSipRouting();
6await agent.serve();