DISA with Security Warnings

Security -- Last reviewed 2026-08-02 disa security toll-fraud dialplan pin Found this useful? Upvote it. ×

DISA with Security Warnings

DISA gives a caller dialtone inside your PBX after they authenticate. It is powerful and dangerous. If an attacker guesses the access number or PIN, they can place outbound calls through your system.

Use DISA only when you have a clear operational need. For most users, a VPN softphone, authenticated SIP endpoint, or callback workflow is safer.

Safer DISA pattern

[from-trunk]
; Route only a private DID to DISA. Do not publish this number.
exten => 15551234567,1,NoOp(Restricted DISA access from ${CALLERID(all)})
 same => n,GotoIf($["${CALLERID(num)}" = "15557654321"]?allowed)
 same => n,Playback(ss-noservice)
 same => n,Hangup()
 same => n(allowed),Answer()
 ; Caller ID is only a secondary filter, not strong authentication.
 same => n,Authenticate(/etc/asterisk/disa.pin,,32)
 same => n,Set(CDR(userfield)=disa-access:${UNIQUEID})
 same => n,Set(CALLERID(num)=15551230000)
 same => n,DISA(no-password,disa-outbound)
 same => n,Hangup()

[disa-outbound]
; Emergency calls should use a normal endpoint with registered location.
; Do not route emergency calls through anonymous DISA dialtone.
exten => 911,1,Playback(ss-noservice)
 same => n,Hangup()

; North America example, restrict to domestic calls only.
exten => _NXXNXXXXXX,1,Dial(PJSIP/1${EXTEN}@trunk,60)
 same => n,Hangup()

exten => _1NXXNXXXXXX,1,Dial(PJSIP/${EXTEN}@trunk,60)
 same => n,Hangup()

; Explicitly reject international and operator prefixes.
exten => _011.,1,Hangup(21)
exten => _00.,1,Hangup(21)
exten => _0.,1,Hangup(21)

PIN file

Authenticate() can read the PIN from a file. Keep it owned by root or the Asterisk user and readable only by Asterisk.

install -o asterisk -g asterisk -m 0640 /dev/null /etc/asterisk/disa.pin
printf '%s\n' 'change-this-long-pin' > /etc/asterisk/disa.pin

Use a long PIN. Do not use a four-digit extension-style password for DISA.

Required controls

Better alternatives

See Also

User Notes

Know a tip or gotcha for this topic? Share it below and help others.

Contribute a note

Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.

Moderated before publishing. Email never shown.
Related Snippets