Question : Dial Plan Manipulation

i had configured asterisk with a minimum dial plan, made 10 extentions  plz find extentions.conf and sip.con in attachment
i want configure dial plan so that

Extention 2000-2005  can receive make calls and can dial all ten extentions.
Extention 2006-2010 can only receive calls and can dial all the extentions

thx


Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
######################################################################################################## 
vi /etc/asterisk/extensions.conf 
[others] 
exten => 2000,1,Dial(SIP/2000)
exten => 2001,1,Dial(SIP/2001)
exten => 2002,1,Dial(SIP/2002)
exten => 2003,1,Dial(SIP/2003)
exten => 2004,1,Dial(SIP/2004)
exten => 2005,1,Dial(SIP/2005)
exten => 2006,1,Dial(SIP/2006)
exten => 2007,1,Dial(SIP/2007)
exten => 2008,1,Dial(SIP/2008)
exten => 2009,1,Dial(SIP/2009)
exten => 2010,1,Dial(SIP/2010) 
 
######################################################################################################## 

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 
[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=my-phones
secret=1234
host=dynamic 

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

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

[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 
####################################################################################################

Answer : Dial Plan Manipulation

No this should be all you need.
Dialplan entries for internal calls go within [internal]. Dialplan for any external calls if you have any go within [external].
The permitall context includes the internal and external dialplan entries so any phones in this context can dial other phones.
The denyexternal context is blank apart from one which just signals a congestion tone back for all attempted calls.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
[internal] 
; this is the section for internal calls every phone can dial
exten => 2000,1,Dial(SIP/2000)
exten => 2001,1,Dial(SIP/2001)
exten => 2002,1,Dial(SIP/2002)
exten => 2003,1,Dial(SIP/2003)
exten => 2004,1,Dial(SIP/2004)
exten => 2005,1,Dial(SIP/2005)
exten => 2006,1,Dial(SIP/2006)
exten => 2007,1,Dial(SIP/2007)
exten => 2008,1,Dial(SIP/2008)
exten => 2009,1,Dial(SIP/2009)
exten => 2010,1,Dial(SIP/2010) 
 
[external]
; place your dialplan entries to make external calls here.
 
[permitall]
; put phones in this context to enable them to make any phone call
include => internal
include => external
 
[denyexternal]
; put phones in this context to permit only internal calls
exten => s,1,congestion
Random Solutions  
 
programming4us programming4us