***

title: enableSipRouting
slug: /reference/typescript/agents/agent-base/enable-sip-routing
description: Enable SIP-based call routing for this agent.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[ref-agentbase]: /docs/server-sdks/reference/typescript/agents/agent-base

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**

<ParamField path="autoMap" type="boolean" default="true" toc={true}>
  When `true`, automatically map SIP usernames to the agent route.
</ParamField>

<ParamField path="path" type="string" default="/sip" toc={true}>
  URL path for the SIP routing endpoint.
</ParamField>

## **Returns**

[`AgentBase`][ref-agentbase] -- Returns `this` for method chaining.

## **Example**

```typescript {5}
import { AgentBase } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'support', route: '/support' });
agent.setPromptText('You are a helpful assistant.');
agent.enableSipRouting();
await agent.serve();
```