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

# Phone

```bash theme={null}
telnyx-acp add phone +15550001234
```

```text {2,5,16,20,21,24} theme={null}
support-agent/
├── agent.json                                         ◀
├── instructions.md
└── .telnyx/                        written by deploy
    ├── index.ts                                       ◀
    ├── telnyx.toml
    ├── telnyx-env.d.ts
    └── package.json

@telnyx/acp/                      the package
├── managed/
│   ├── index.ts
│   ├── agent.ts
│   ├── model.ts
│   ├── memory.ts
│   ├── tools.ts
│   ├── mcp.ts
│   ├── voice.ts                                       ◀
│   ├── direct-turn.ts
│   └── filler.ts
├── channels/
│   ├── index.ts                                       ◀
│   ├── phone.ts                                       ◀
│   ├── email.ts
│   ├── web.ts
│   └── wire.ts                                        ◀
├── synth/
│   ├── index.ts
│   ├── code-entry.ts
│   └── vendor.ts
└── spec/
    ├── schema.ts
    ├── model.ts
    ├── phone.ts
    ├── project.ts
    └── io.ts
```

`add phone <number>` appends the number to `phone`. Before anything ships, `checkNumbers` in `channels/phone.ts` looks each number up in the account, and a missing or inactive number stops the `deploy`. At `deploy` three things follow from it.

* `provisionPhones` in `channels/phone.ts` puts the number on a Call Control application for calls and a messaging profile for texts, created and named `<agent> (telnyx-acp)` when the number is bare. `wireChannels` in `channels/wire.ts` points each artifact's webhook at the function, with the previous webhook remembered in `agent.json` so that `remove phone` and `delete` can restore it. They delete only the artifacts `deploy` created.
* Two routes, one per artifact type with `*` for the id, go into the list passed to `channelRoutes` in `.telnyx/index.ts`, because the artifacts are created after the function is built. `channels/index.ts` serves them at `/webhooks/call_control_application/<id>` and `/webhooks/messaging_profile/<id>`.
* The base class becomes `defineManagedVoiceAgent(spec)` from `managed/voice.ts`, because the agent now answers calls. It wraps the managed class in the `voice()` mixin from [`@telnyx/edge-runtime/voice`](/docs/agent-sdk/runtime-sdk).

[The Messaging Webhook](/docs/agent-sdk/inside/request-handling/messaging-webhook) and [The Call Webhook](/docs/agent-sdk/inside/request-handling/call-webhook) follow a text and a call from there.
