PBX Integration

How to connect a DID to Asterisk PBX

Use this guide if you manage Asterisk directly and want raw control over auth, AOR, endpoint definitions, and inbound and outbound dialplan behavior.

View config → Back to connectors
Asterisk
Platform focus
Direct
Setup style
8 min
Guide length
Live
Connector status
Asterisk logo
Direct Asterisk control
Designed for engineers who prefer explicit PJSIP objects and dialplan logic instead of UI abstractions.
🧩
Minimal object set
Start with the auth, AOR, endpoint, and identify objects needed for a clean first implementation.
📋
Dialplan clarity
Keep inbound DID routing and outbound call handling simple before adding more advanced behavior.

Before you begin

Make sure the PBX, network, and DIDfarm credentials are ready before you start the setup.

1
Confirm DIDfarm trunk details
Have the SIP host, username, password, transport choice, and inbound numbers available.
2
Check network reachability
Your Asterisk host must be reachable for SIP signaling and media in the required directions.
3
Prepare a dedicated context
Use a named inbound context for DIDfarm traffic so dialplan behavior stays easy to debug.
4
Know your auth model
Confirm whether the trunk is registration-based, IP-authenticated, or a hybrid design.

Setup flow

1
Create PJSIP objects
Define auth, AOR, endpoint, and identify objects using the values provided for the DIDfarm trunk.
2
Add dialplan handling
Route inbound DID traffic in its own context and configure outbound calls through the DIDfarm endpoint.
3
Reload and validate
Reload PJSIP and confirm registration or endpoint reachability from the CLI.
4
Run test traffic
Place inbound and outbound test calls, validate caller ID, and review logs for any SIP mismatches.

Copy-paste example

Use this as the starter reference for your connector article or portal snippet output.

Example configuration
[didfarm-auth] type=auth auth_type=userpass username={didfarm_auth_id} password={generated_secret} [didfarm-aor] type=aor contact=sip:sip.didfarm.com [didfarm-endpoint] type=endpoint context=from-didfarm outbound_auth=didfarm-auth aors=didfarm-aor
What to verify
  • PJSIP objects load without syntax errors.
  • Inbound context matches the actual DIDfarm call flow.
  • Outbound dialplan targets the expected endpoint.
  • SIP logs show successful registration or matching identify logic.

Operational notes

CheckWhat to confirm
Object namingUse consistent names so future automation and troubleshooting stay easy.
Dialplan contextKeep the DIDfarm inbound context separate from unrelated traffic when possible.
CLI validationUse Asterisk CLI status checks before blaming number routing.
LoggingReview SIP traces and full logs when registration or matching behaves unexpectedly.

Give Asterisk users a guide that respects their workflow

A direct, engineering-friendly Asterisk page makes DIDfarm more credible with advanced telephony teams.

Open PBX Integration →