[Asterisk-Users] Extensions / Contexts

Matt Riddell matt.riddell at sineapps.com
Tue Apr 26 15:02:28 MST 2005


Sebastian Silva wrote:
> Hi everybody,
> 
> I am writing here because I can't find the solution to my problem (my 
> asterisk configuration). I hope somebody can give me a hand with it:
> 
> I need to provide a PBX service to several companies (extensions with 
> softphones and Digium hardware to manage the analog lines), my problem 
> is that I don't know how to configure the contexts to have, for 
> instance, the following scenario:
> 
> Company A
> ext 2000
> ext 2001
> ext 2002
> 
> Company B
> ext 2000
> ext 2001
> ext 2002
> 
> Company A must not to see extensions of company B and viceversa.

ok.

So, use:

extension.conf

[incomingline1]
include => companya
exten => s,1,Answer()
exten => s,2,Background(welcome_to_companya)

[incomingline2]
include => companyb
exten => s,1,Answer()
exten => s,2,Background(welcome_to_companyb)

[internalcompanya]
include => company_a
include => voicemail_a
include => utils_a
include => dialout_a
...

[internalcompanya]
include => company_b
include => voicemail_b
include => utils_b
include => dialout_b
...


[companya]
exten => 2000,1,Dial(SIP/2000a)
exten => 2001,1,Dial(SIP/2001a)
exten => 2002,1,Dial(SIP/2002a)

[companyb]
exten => 2000,1,Dial(SIP/2000b)
exten => 2001,1,Dial(SIP/2001b)
exten => 2002,1,Dial(SIP/2002b)

sip.conf

[2000a]
username=companyA_2000
context=Companya

[2000b]
username=companyB_2000
context=Companyb

-- 
Cheers,

Matt Riddell
_______________________________________________

http://www.sineapps.com/news.php (Daily Asterisk News - html)
http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)



More information about the asterisk-users mailing list