[Asterisk-Users] Extensions / Contexts

Eric Wieling aka ManxPower eric at fnords.org
Tue Apr 26 14:29:20 MST 2005


This is crap.

Contexts are DESIGNED for segmenting Asterisk to provide service to 
multiple companies with overlaping extensions numbering space.

extensions.conf and voicemail.conf both support contexts.

sip.conf, iax.conf, etc do not, but if you are servicing multiple 
companies you don't want to make the sip or iax username the same as the 
extension.

What we do is make the sip username to be the serial number (or MAC 
number) of the device.

Wiley Siler wrote:
> The short answer is No.
> 
> The method you describe is intrinsicly illogical.  
> Assuming there is an IVR, how will I know which extension 2000 I am
> calling if that were possible?
> I might get company A instead of company B.
> 
> You can create two * servers with identical dial plans, link them over
> IAX, and allow users to call each other if they use a rpefix lke 7.
> Example:  Comp-A user 2000 calls comp-B user 2000 by dialing 72000.
> 
> Now if you want to use one server only, then just use 200x for one
> company and 300x for the other and segment the dial plans.
> 
> W
>  
> 
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Sebastian
> Silva
> Sent: Tuesday, April 26, 2005 11:29 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [Asterisk-Users] Extensions / Contexts
> 
> 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.
> 
> I know this is possible with extensions, but I don't know how to
> distinguish when (for example) a sip phone is connecting to the
> extension 2000 from company A or company B.
> 
> It is possible to configure my sip.conf (or iax.conf) like this? If it
> is, how do I need to configure the softphone? Does Asterisk realizes
> which context to use depending on the username? Does asterisk allows two
> extension sections with the same number?:
> 
> [2000]
> username=companyA_2000
> context=contextCompanyA
> 
> [2000]
> username=companyB_2000
> context=contextCompanyB
>



More information about the asterisk-users mailing list