> ## Documentation Index
> Fetch the complete documentation index at: https://docs.serval.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Phone agent

> Set up a phone help desk, verify callers, and resolve requests with Serval.

The phone agent gives employees a number to call for help. It answers questions, follows your skills, runs workflows, and records the conversation on a ticket. It uses the same knowledge, permissions, and approval requirements as your workspace's other help desk channels.

## How a call works

1. An employee calls the number connected to your workspace. Serval matches the calling number to a user in your organization.
2. If caller verification is configured, the agent verifies the caller before providing support.
3. The agent handles the request using the skills and actions available to that requester. The AI conversation is saved on a ticket; each new call creates a new ticket.
4. If the caller needs a person, the configured escalation workflow handles live transfer or ticket follow-up.

The dialed number determines which workspace handles the call.

## Before you begin

You need:

* Phone support enabled for your organization.
* A [Twilio integration](https://docs.serval.com/sections/integrations/twilio.md) connected to the account that owns your incoming, voice-capable number, with its **Account SID** and **Auth Token**.
* Permission to manage that integration and the workspace's settings.
* Employee phone numbers on Serval user profiles, or verification workflows that can identify callers from unregistered numbers.

Each workspace can connect one phone number, and each number can belong to only one Serval workspace. You can use the same Twilio integration for phone and WhatsApp.

## Connect your phone number

> [!WARNING]
>
> Adding a number takes effect immediately. Serval replaces its existing incoming-call routing, including any TwiML App or SIP trunk. Use a number whose incoming calls should go to Serval.
>
> Serval does not overwrite a call-status callback used by another system. Use a different number, or work with that system's owner to migrate the integration before clearing the callback in Twilio.

1. In the workspace that will receive calls, go to **Integrations → All integrations → Twilio** and select **Connect**, or open its existing connection for the account that owns the number. A connection shared from another workspace cannot host phone setup here.
2. For a new connection, enter the **Account SID** and **Auth Token** from the [Twilio Console](https://console.twilio.com/).
3. Configure **Browser calling**:
   * To retain an existing configuration, select **Keep current settings (editing only)**. You do not need to re-enter the API key secret.
   * To enable laptop pickup or replace its credentials, select **Set API key**. Enter the **Voice API Key SID** and **Voice API Key secret** for a Standard API key from the same Twilio account in the US1 region.
   * If you do not use laptop pickup, select **Disable browser calling**. Finish active calls before replacing or disabling a key.
4. Finish connecting, then open the integration's **Help Desk** tab.
5. Under **Phone number**, select **Add number** and choose the number.
6. Configure **Caller verification** and **Voice and routing** as described below, then select **Save changes**.

Open **Settings → Channels** to confirm that the Phone channel shows the expected number. If Serval displays a routing warning, select **Restore routing** to restore its incoming-call webhook.

## Identify and verify callers

Phone-number recognition identifies a user record; it does not prove who is calling. Caller verification checks identity before the agent provides support.

### Choose who can call

| **Allow calls from unregistered numbers** | What happens |
| - | - |
| Off | Registered callers proceed, subject to verification and workspace access. Unknown numbers follow the authentication failure workflow, if configured; otherwise the call ends with an explanation. |
| On | Unknown callers can start verification. They must verify an active user in your organization who can access the workspace before receiving support. |

Deactivated users cannot proceed to support. Verifying an unregistered caller does not add the calling number to their profile.

### Choose a verification method

In the integration's **Help Desk** tab, configure **Caller identity verification**:

| Method | Workflows to select | Use when |
| - | - | - |
| **Verify only** | **Verify identity workflow** | Your workflow checks evidence the caller already has. |
| **Challenge and verify** | **Send challenge workflow** and **Verify identity workflow** | You send an authenticator push or one-time code, then check the result or response. |
| **None** | None; unregistered callers must remain disabled. | You accept recognized phone numbers without an additional identity check. |

Select published, enabled workflows in the same workspace. Verification workflows cannot require confirmation forms. Use the workflow guidance below to build or adapt them.

Set **Maximum verification attempts** from 1 to 5 (default: 3 failed checks per call), then select **Save changes**. During verification, the agent can discuss and run only the selected verification workflows. Verification lasts for the current call; it does not sign the caller in to Serval.

### Allow unregistered callers

Use this for employees calling from shared or personal numbers that are not on their profiles:

1. Build workflows that can identify and verify a caller without a recognized number.
2. Select **Verify only** or **Challenge and verify**, then select those workflows.
3. Turn on **Allow calls from unregistered numbers**.
4. Select **Save changes**, review the confirmation, and select **Allow**.

To change verification to **None**, first turn off unregistered calls.

## Configure what the agent can do

Use your help desk settings, knowledge sources, skills, and workflows to define the support experience. User-scoped actions use the identified requester's context and remain subject to permissions and approvals.

Skills can apply to **Chat and voice**, **Chat only**, or **Voice only**. Use a voice-specific skill for spoken instructions, such as explaining one troubleshooting step and waiting for the caller to try it.

### Choose the voice and language

Under **Agent voice**, choose **Male** or **Female**, then save. New configurations default to Male.

#### Supported languages

The agent supports English, Spanish, French, German, Hindi, Russian, Brazilian Portuguese (`pt-BR`), Japanese, Italian, and Dutch. It responds in the caller's detected language; callers can also ask it to switch to a supported language, for example, “Please speak Spanish.” Test names, terminology, and the languages your employees use, since speech recognition can mishear them.

### Tickets, forms, and follow-up

* **Introduction and transcript:** The agent introduces itself as an AI assistant and tells the caller the conversation will be transcribed. The AI conversation is saved on the ticket.
* **Ticket links:** Recognized callers receive a link when the ticket opens. Unidentified callers are not sent personal ticket information. After an unregistered caller verifies, direct them to the ticket in Serval or use an available email action; do not assume an earlier receipt was sent.
* **Forms:** The agent can add a form to the ticket for the caller to complete there. It does not collect each form field by voice or bypass approvals.
* **Links and documents:** The agent can use an available email action to send content that is difficult to communicate aloud, or explain where to find it.
* **Unresolved requests:** Your escalation workflow determines assignment and follow-up. Ending the call does not resolve the ticket.

## Configure escalation and failed verification

Custom voice routing is enabled separately from phone support. If the two settings below are missing, ask your Serval contact about availability.

Under **Voice and routing**, select published, enabled workflows in the same workspace that do not require confirmation forms, then save:

| Setting | When it runs | What it handles |
| - | - | - |
| **Voice escalation workflow** | The agent escalates a support request. | Assignment, ticket status, notifications, and any live call routing. Leaving it unset uses the workspace's escalation settings. |
| **Authentication failure workflow** | An unknown caller cannot enter verification, or verification attempts are exhausted. | Restricted intake or human assistance for an unverified caller. |

Escalating a ticket does not transfer the call by itself. A live handoff requires a workflow that queues or offers the current call.

> [!NOTE]
>
> An authentication failure workflow does not verify the caller. Even if it completes or changes the ticket requester, ordinary AI assistance remains locked. Use it only for your approved intake or human verification process.

## Build caller verification workflows

Use the Catalyst controls beside the verification workflow fields. The selected workflows must handle each caller type you allow:

| Caller | User context | Workflow requirement |
| - | - | - |
| Registered number | `ctx.targetUser` is the matched user. | Verify that user; the caller cannot switch accounts. |
| Unregistered number | `ctx.targetUser` is absent. | Find the claimed account, verify ownership, and return the verified Serval user ID. |

An employee ID, email, or phone number can locate an account, but finding a matching identifier is not proof of ownership. For challenge-based verification, send to the account's enrolled device or contact details and bind the result to that account and challenge. A new destination supplied by the caller does not establish account ownership.

A registered caller's Send workflow can start automatically when it has no required inputs. Otherwise, the agent collects the required inputs first. Keep them short and suitable for speech.

### Return the verification result

After confirming identity, the **Verify identity workflow** must return:

```json theme={null}
{ "verified": true, "userId": "<verified Serval user ID>" }
```

* `verified` must be the boolean `true`.
* `userId` must identify an active person in the same Serval organization. For registered callers, it must match `ctx.targetUser.id`.
* Use the Serval user ID, not the identity provider's account ID.

Return `{ "verified": false }` for a rejected check. Workflow completion alone, or success without a user ID, does not verify a caller.

Failed, canceled, or invalid Verify results count toward the attempt limit. Pending checks leave the caller unverified; sending or resending a challenge does not consume an attempt. A denied Send or Verify run for an unregistered caller ends verification and follows the authentication failure path.

### Use the Okta starters

The installable [Okta](https://docs.serval.com/sections/integrations/okta.md) **MFA Push** and **SMS OTP** workflows are starting points for recognized callers. They require `ctx.targetUser`; adapt them before enabling unregistered callers, and review existing workflow selections when changing that policy.

## Test your setup

Before sharing the number with employees:

1. Call from a registered number. Check the greeting, requester, workspace, and transcript.
2. Test successful verification, a rejected or expired challenge, and the attempt limit.
3. Test unregistered callers if enabled. Confirm that registered callers cannot verify as another account.
4. Run a support request, including a workflow or form if used.
5. Request human help and confirm ticket escalation. If custom voice routing and live handoff are configured, test an answered call and the no-agent fallback.
6. Hang up and review the ticket and follow-up experience.

## Change or disconnect the number

Use **Change number** to replace the number, or **Remove → Remove number** to disconnect it. Disconnecting stops calls from reaching Serval and removes the workspace's phone settings. Serval does not restore the number's previous Twilio routing; configure that routing before reusing the number elsewhere.

Voice, verification, caller policy, and workflow edits require **Save changes**. If another administrator changed the settings while you were editing, select **Reload settings**, review them, and reapply your changes.

## Troubleshooting

| Symptom | What to check |
| - | - |
| Phone settings are missing | Open the connection in the workspace that owns it. If settings are still missing, ask your Serval contact to confirm phone support is enabled for your organization. |
| No numbers appear | Check that the connected Twilio account owns a voice-capable incoming number. The integration's **List Twilio Phone Numbers** health check tests access; it does not place a call. |
| Routing warning or calls do not reach Serval | Select **Restore routing**. Check the connection and whether another system changed the number's Twilio routing. |
| Adding a number or restoring routing fails | Check for a call-status callback used by another system. Serval will not overwrite it; follow the callback guidance under **Connect your phone number**. |
| Number is not recognized | Add it to the correct user profile, or configure verification for unregistered callers. |
| Verification completes but support stays locked | Check for boolean `verified: true` and a valid Serval `userId`. A registered caller's ID must match the recognized user. |
| Workflow fails because `ctx.targetUser` is missing | Adapt it for unregistered callers, or disable unregistered calls. |
| Settings cannot be saved | Check required workflows and the attempt limit. Reload if another administrator changed the settings. |
| Ticket escalates but nobody receives the call | Check custom voice routing availability. For a configured live handoff, ensure the workflow queues or offers the call, then check agent readiness. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.