VoIP.info Guide

Plan and configure an Asterisk SIP trunk

Map a carrier contract to PJSIP objects, restricted routes and a repeatable acceptance test.

Reviewed 2026-09-07Asterisk 22 LTSIntermediateDocumentation based · not lab tested

Collect carrier-specific facts

Obtain the provider's current PBX guide and confirm the account type. Record signaling destinations, media networks, authentication method, supported transports, codecs, number format and caller-ID policy. Do not copy a working configuration for a different carrier and assume that changing the password is sufficient.

Choose a noncritical test number and a limited outbound calling allowance. Keep the carrier's escalation contact and a way to suspend service available outside the PBX.

Redundancy needs separate failure paths
A PBX uses a primary provider path and an alternate provider path. Shared PBX, power and internet dependencies remain unless the design also separates them.

New-call recovery and active-call survival are different tests. Inbound number failover needs a provider-side routing plan.

Separate the object responsibilities

An endpoint describes the trunk's call behavior. An AOR can describe a static destination. An auth object can support challenged outbound requests. A registration object is needed only when the carrier's registration flow requires it. Incoming identification and dialplan routing still need their own review.

Place carrier-originated calls in a restricted inbound context. That context should reach known business destinations and should not inherit unrestricted outbound dialing. Authentication proves an identity under configured rules; it does not justify granting every routing privilege.

Route deliberately

Normalize incoming and outgoing numbers according to the carrier's actual format. Start with explicit test destinations instead of a broad catch-all pattern. Record how a forwarded external call uses trunk capacity and caller identity.

Inspect the running endpoint and registration state, then follow a bounded INVITE exchange. A registered trunk can still fail because the chosen route, permitted destination or media negotiation is wrong.

Accept both call legs

Test incoming and outgoing calls, two-way audio, DTMF, hold, transfer, caller identity and recovery after a controlled interruption. Arrange emergency-service configuration and validation directly with the carrier. Keep the provider instructions and your redacted acceptance record with the PBX backup. This guide supplies a configuration process, not an unverified provider-specific recipe.

Sources & applicability

Primary references for the technical details above. Operational examples and planning checklists are VoIP.info editorial guidance.

Examples require adaptation to your topology. No live PBX or hardware testing is claimed.