Hi everyone,
I’ve been running an Asterisk setup using PJSIP for a while now. It’s been working fine with a SIP trunk that currently has around 30 channels and 200 caller IDs inbound and outbound both are stable.
Recently, my provider added another 30 channels and around 200 more caller IDs, so now I have about 60 channels and 400 DIDs in total.
I’m trying to figure out the right way to add these new DIDs into my existing setup without breaking what’s already working.
Note: All IPs, Caller IDs, and passwords below are masked for security. This is just a reference version of the configuration.
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
[transport-ws]
type=transport
protocol=ws
bind=0.0.0.0:8088
[transport-wss]
type=transport
protocol=wss
bind=0.0.0.0:8089
cert_file=/etc/asterisk/keys/asterisk.pem
priv_key_file=/etc/asterisk/keys/asterisk.key
method=tlsv1_2
[mytrunk-identify]
type=identify
endpoint=mytrunk-endpoint
match=10.X.X.X/24
[mytrunk-registration]
type=registration
outbound_proxy=sip:10.X.X.X:5060
server_uri=sip:trunkXXXX@example.sip.provider
client_uri=sip:trunkXXXX@example.sip.provider
retry_interval=30
[mytrunk-endpoint]
type = endpoint
context = inbound
transport=transport-udp
disallow = all
allow = ulaw,alaw
aors = mytrunk-aors
direct_media=no
outbound_proxy=sip:10.X.X.X:5060
force_rport=yes
rtp_symmetric=yes
rewrite_contact=yes
dtmf_mode=auto
qualify=yes
qualify_frequency=30
[mytrunk-aors]
type = aor
contact = sip:trunkXXXX@example.sip.provider
max_contacts=1
remove_existing = yes
[065XXXXX]
type=endpoint
context=vozcare
transport=transport-ws
allow=ulaw
webrtc=yes
auth=auth065XXXXX
aors=065XXXXX
direct_media=no
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
rtptimeout=30
rtpholdtimeout=60
rtp_keepalive=15
[auth065XXXXX]
type=auth
auth_type=userpass
password=XXXX
username=065XXXXX
What I’m trying to figure out:
-
For the new DID range and additional 30 channels — should I create a new endpoint/identify section, or just extend everything in the same trunk and handle it in
extensions.conf? -
Any best practices for handling 400+ DIDs efficiently in PJSIP?
-
Since I’m using PostgreSQL RealTime (ARA), is there an ideal structure to store or manage large DID pools?
-
Asterisk version: 20.x
-
Database: PostgreSQL RealTime (ARA)
-
Using WebRTC + UDP endpoints
-
Provider: Enterprise SIP trunk
Goal:
I want to integrate all the new DIDs smoothly without affecting the current inbound/outbound call flow or registration stability.
Also, if anyone can share relevant documentation, example configurations, or even community projects/tutorials that explain how large-scale DID setups are usually handled in Asterisk, I’d really appreciate it
Thanks a lot for your time and guidance!
MJ