Phone Numbers November 18, 2025 12 min read

Getting Local Phone Numbers for Your Asterisk PBX

A complete guide to purchasing local DID numbers, configuring inbound routing in Asterisk, and managing multiple numbers on a single SIP trunk.

What Are DID Numbers?

A DID (Direct Inward Dialing) number is a phone number that routes directly to your SIP trunk. Unlike traditional PRI lines where you get a block of sequential numbers, DIDs let you pick individual numbers from any available area code.

With a SIP trunk provider like IPComms, you can have local numbers from hundreds of area codes all routing to the same Asterisk system.

$1.50

Per number/month

300+

Area codes available

Instant

Activation time

Choosing Your Local Numbers

Area Code Strategy

Choose area codes where your customers are located. Local numbers get answered more often than toll-free or out-of-area numbers.

Number Types Available

TypeBest ForPricing
Local (geographic)Local presence, higher answer rates$1.50/mo + usage
Toll-free (800/888/877)National presence, customer service$2.00/mo + usage
Vanity (ported)Brand recognition, marketing$1.50/mo + port fee

Ordering DIDs from IPComms

  1. Log into the portal at portal.ipcomms.net
  2. Navigate to Phone Numbers > Order New Numbers
  3. Select your area code or search by city/state
  4. Browse available numbers and add to cart
  5. Configure routing - assign to your SIP trunk
  6. Complete the order - numbers activate instantly

Bulk Orders: Need 10+ numbers? Contact our sales team for volume pricing. We can provision blocks of sequential numbers if needed.

Inbound DID Routing in Asterisk

When a call comes in, Asterisk receives the called number in ${EXTEN}. Use this to route calls to the right destination:

Basic DID Routing

extensions.conf
[from-ipcomms]
; Main office number - route to IVR
exten => 2125551000,1,NoOp(Main number)
 same => n,Goto(ivr-main,s,1)

; Sales line - route to ring group
exten => 2125551001,1,NoOp(Sales DID)
 same => n,Goto(ring-group-sales,s,1)

; Support line - route to queue
exten => 2125551002,1,NoOp(Support DID)
 same => n,Queue(support)

; Direct extension for CEO
exten => 2125551003,1,NoOp(CEO direct line)
 same => n,Dial(PJSIP/101,30)
 same => n,VoiceMail(101@default,u)

; Catch-all for unconfigured DIDs
exten => _X.,1,NoOp(Unknown DID: ${EXTEN})
 same => n,Answer()
 same => n,Playback(ss-noservice)
 same => n,Hangup()

Outbound Caller ID Configuration

Set any of your DIDs as the outbound caller ID for different departments or users:

extensions.conf
[outbound-ipcomms]
; Set caller ID based on calling extension
exten => _1NXXNXXXXXX,1,NoOp(Outbound from ${CALLERID(num)})
 same => n,ExecIf($[${CALLERID(num)}=101]?Set(CALLERID(num)=2125551003))
 same => n,ExecIf($[${CALLERID(num)}=102]?Set(CALLERID(num)=2125551001))
 same => n,Set(CALLERID(name)=Your Company)
 same => n,Dial(PJSIP/${EXTEN}@ipcomms)

Important: Only use numbers you own as outbound caller ID. Spoofing with numbers you do not own violates FCC regulations and STIR/SHAKEN will mark your calls as spam.

Common Use Cases for Local DIDs

Multi-Location Business

Get a local number for each office or city. All calls route to your central Asterisk system, but customers see a local number.

Department Direct Lines

Give each department its own DID: sales, support, billing. Route each to the appropriate queue or ring group.

Remote Workers

Assign direct DIDs to remote employees. They register their softphone and receive calls on their personal DID from anywhere.

Marketing Tracking

Use different DIDs in different ad campaigns. Track which number receives calls to measure campaign effectiveness.

Get Local Numbers Today

IPComms offers local numbers from 300+ area codes across the US and Canada. Numbers activate instantly.

Related Articles