Hey, not sure if you figured it out yet or not but this is what I came up with.

You could create a local context, an international contex and an internal pbx-users context

make the default context of extens 300 and 301 part of the internal pbx-users context in sip.conf or iax.conf

[local]
include => pbx-users
exten => _9xxxxxxx,1,Dial(Zap/g1/${EXTEN})

[international]
include => pbx-users
exten => _900.,1,Dial(Zap/g1/${EXTEN})

[pbx-users]
exten => 300,1,Dial(SIP/300)

exten => 301,1,Dial(SIP/301)




On the subject of includes(I can't find much documentation on them)
What happens when you do something like this

[context-1]
include => context-2

exten => 100,1,Dial(Zap/1)

[context-2]
include => context-1

exten => 101,1,Dial(Zap/1)

does that create an infinite loop or when you include another context does it stop inheriting the includes inside. (Confusing huh?)

Thanks


On May 31, 2005, at 3:51 AM, asterisk asterisk wrote:

I have a very simple question .

I have 2 internal extension 301 and 300 sip phone . I want to these extesion can call each other, and ext 300 can call outside to pstn, and ext 301 to call internatonal.

How can I do that ?


[x1]
exten => 300,1,Dial(SIP/300)

include => pstnlocal

[x2]
exten => 301,1,Dial(SIP/301)

include =>international

[pstnlocal]

exten => _9xxxxxxx,1,Dial(Zap/g1/${EXTEN})

[international]

exten => _900.,1,Dial(Zap/g1/${EXTEN})



So it is good but in this case I cann t call the local phone .And if I include context x1 in x2 and x2 in x1 the ext 300 will be able to call international no.


Can anyone help me ?


Thanks.


Do You Yahoo!?
Yahoo! Small Business - Try our new Resources site!
_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to