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

# PSTN trunk provisioning for a new tenant

> Sales hands over a new business customer. Reserve a DID block, configure the SBC trunk, provision in 3CX, validate inbound and outbound, and email the tenant their go-live details — all in one session.

Sales hands over a new tenant: 25-user PBX, four DIDs, mainline number on a port-in from the previous carrier scheduled in two weeks. Until the port completes, the tenant gets temporary DIDs from the carrier so they can start using the system today. The provisioning team executes the full setup inside Studio.

## Systems involved

| System                           | Role                                           |
| -------------------------------- | ---------------------------------------------- |
| HubSpot / Salesforce             | Sales handoff record with tenant details.      |
| Bandwidth / Telnyx / Inteliquent | Carrier API for DID reservation and SIP trunk. |
| Studio terminal                  | SSH to the SBC for trunk configuration.        |
| 3CX / FreePBX / Cisco CUCM       | PBX where extensions and call routing live.    |
| Stripe                           | Billing setup for the tenant.                  |
| Gmail                            | Welcome email with credentials and dial plan.  |
| Studio Procedures                | `Tenant onboarding` runbook.                   |

## Walkthrough

<Steps>
  <Step title="Pull the sales handoff">
    Copilot reads the HubSpot record: tenant name, billing contact, technical contact, requested number count, location, port-in details, target go-live date.
  </Step>

  <Step title="Reserve DIDs from the carrier">
    Through the Bandwidth connector, search and reserve four DIDs in the tenant's local rate centre, plus one toll-free for the mainline. The reservation IDs come back and get stored on the tenant record.
  </Step>

  <Step title="Pre-stage the SBC trunk">
    SSH to the SBC. Copilot drafts a tenant trunk: registration credentials, codec list, DTMF mode, allowed source IPs (the tenant's PBX), call-admission control limits matching the contracted concurrent calls. Stages, you review, push.
  </Step>

  <Step title="Provision in the PBX">
    Through the 3CX connector, create the tenant, add the four DIDs and the toll-free, configure inbound call routing to a placeholder receptionist extension, configure outbound rules through the new trunk.
  </Step>

  <Step title="Inbound test">
    From a Studio softphone (or via TestCallin), dial each DID. Copilot watches the SBC and the PBX logs to confirm the call routes correctly, audio is bidirectional, and the CDR captures clean.
  </Step>

  <Step title="Outbound test">
    Place a test outbound call to a verified test number. Confirm the carrier accepts, the caller ID presents correctly, and the call connects.
  </Step>

  <Step title="Set up billing">
    Through the Stripe connector, create the tenant subscription with the agreed tier, attach the billing contact, and set the first invoice date.
  </Step>

  <Step title="Schedule the port-in">
    File the port-in request through the carrier connector for the mainline number, with the LOA the customer signed. The port FOC date lands in the tenant record.
  </Step>

  <Step title="Welcome email">
    Copilot drafts a Gmail welcome: temporary DIDs, port-in expected date, PBX admin URL and credentials, dial plan, support contact, escalation path. Reviewed and sent.
  </Step>
</Steps>

## Where Studio earns its keep

* The carrier API, the SBC, the PBX, and the billing system are touched from the same workspace — there is no spreadsheet of "did we remember to do this step yet."
* The test calls happen against the live trunk before anyone tells the customer it's ready.
* The port-in date is captured on the tenant record where the welcome email pulls from, so the customer email and the operations record never disagree.
* The procedure takes the next tenant from sales-handoff to go-live in about 30 minutes instead of half a day.

## Related

<CardGroup cols={2}>
  <Card title="Connectors and MCP" icon="plug" href="../../connectors-and-mcp" arrow="true" cta="Wire carriers">
    Bandwidth, Telnyx, 3CX, Stripe, and Gmail as Copilot tools.
  </Card>

  <Card title="Procedures" icon="workflow" href="../../procedures" arrow="true" cta="Save it">
    `Tenant onboarding` runbook with the tenant ID as the argument.
  </Card>
</CardGroup>
