;--------------------------------------------------------------------------------
; Context for allow ext-100 to call only ext-200,201,202,203,204
; and any extension begins with number 3 and contains 3 digits.
;If he get a call to any other number, it will hangup by the context.
[from-restricted]
exten => _200,1,Goto(from-internal,${EXTEN},1)
exten => _201,1,Goto(from-internal,${EXTEN},1)
exten => _202,1,Goto(from-internal,${EXTEN},1)
exten => _203,1,Goto(from-internal,${EXTEN},1)
exten => _204,1,Goto(from-internal,${EXTEN},1)
exten => _3XX,1,Goto(from-internal,${EXTEN},1)
;--------------------------------------------------------------------------------
- You have to include above context inextension.conf file(in CentOS file location is /etc/asterisk/extension.conf).
- Then you can change the context ofextension 100 to from-restricted. (in Asterisk 1.6 file location is /etc/asterisk/user.conf)