[Asterisk-Users] Extensions / Contexts

Daniel Salama dsalama at user.net
Tue Apr 26 15:04:08 MST 2005


I think, in theory, you could do it.

You should be able to create sip users with different contexts and 
carefully configure the contexts in extensions.conf. The only problem I 
see you will have is that you cannot define the same block in sip.conf 
as in your example.

What you could try doing is:

sip.conf
[a_2000]
username=2000
secret=2000
context=company_a

[b_2000]
username=2000
secret=2000
context=company_b

then, in your extensions.conf you could have something like this:
extensions.conf
[company_a]
exten => 2000, 1, Dial(SIP/a_2000)
...

[company_b]
exten => 2000, 1, Dial(SIP/b_2000)

Note, this is DEFINITELY not tested and is only a suggestion.

- Daniel

On Apr 26, 2005, at 3:01 PM, 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




More information about the asterisk-users mailing list