[asterisk-users] how to allow some extensions to make call outside and some extensions cant call outside

asterisk at opensourcesolution.in asterisk at opensourcesolution.in
Fri Feb 12 14:37:00 CST 2010



i had configured asterisk with a minimum dial plan, made 10 extentions.
below is extensions and sip.conf

i want configure dial plan so
that

Extention 2000-2005 can receive calls from outside and make calls
outside and can dial all ten extentions.
Extention 2006-2010 can only
receive calls from outside but cant call outside and can dial all ten
extentions
thx

vi /etc/asterisk/sip.conf

[root at localhost ~]# vi
/etc/asterisk/sip.conf
[general]
port = 5060
bindaddr = 0.0.0.0
context =
others

[2000]
type=friend
context=my-phones
secret=1234
host=dynamic

[2001]
type=friend
context=my-phones
secret=1234
host=dynamic

[2002]
type=friend
context=my-phones
secret=1234
host=dynamic

[2003]
type=friend
contex=my-phones
secret=1234
host=dynamic

[2004]
type=friend
contex=my-phones
secret=1234
host=dynamic

[2005]
type=friend
contex=myphones
secret=1234
host=dynamic

[2006]
type=friend
contex=my-phones
secret=1234
host=dynamic

[2007]
type=friend
contex=my-phones
secret=1234

[2008]
type=friend
contex=my-phones
secret=1234
host=dynamic

[2009]
type=friend
contex=my-phones
secret=1234
host=dynamic

[2010]
type=friend
contex=my-phones
secret=1234
host=dynamic

##########################
#########################################################

vi
/etc/asterisk/extentions.conf
[from-zaptel]
exten => s,1,wait(2)
exten =>
s,n,dial(sip/2000)
exten => s,n,dial(sip/2001)
exten =>
s,n,Playback(tt-weasels)

[others]
include => my-phones

[my-phones]
exten
=> _20XX,1,Dial(SIP/${EXTEN})
exten =>
_20XX,n,VoiceMail(${EXTEN}@others,u)
exten => _20XX,n,Hangup()

exten =>
2001,1,Dial(Zap/1-1/${EXTEN})
exten => 2001,n,Hangup

exten =>
2002,1,Dial(Zap/1-1/${EXTEN})
exten => 2002,n,Hangup

exten =>
2003,1,Dial(Zap/1-1/${EXTEN})
exten => 2003,n,Hangup

exten =>
2004,1,Dial(Zap/1-1/${EXTEN})
exten => 2004,n,Hangup

exten =>
2005,1,Dial(Zap/1-1/${EXTEN})
exten => 2005,n,Hangup
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100212/3aeaebd2/attachment.htm 


More information about the asterisk-users mailing list