[Asterisk-Users] RE: Same Extensions in Multiple contexts

Gene Willingham gwillingham at comcast.net
Mon Nov 8 17:59:40 MST 2004


I was able to get this to work.  Not sure if it is the best way or the only
way, but this is how I did it.  Including contexts do not give you the
desired result.  You must keep the contexts separate and use the goto to get
it to work.

Use the internal context in sip.conf.  If you don't people calling into the
system will be allowed to dial an out bound line as if it were an extension.

You also must take care with voicemail. Notice the @context, if the @ symbol
is missing it will match any context with that extension.  You will get very
unpredictable results.

Call Parking does not appear to work.  It does not support contexts.
 

Extensions.conf
----------------

[incoming-calls]
exten => _2125551212,1,Goto,companya|${EXTEN}|1
exten => _2025551212,1,Goto,companyb|${EXTEN}|1


[companya]
exten => _2125551212,1,Macro(auto-attendant)

exten => _202,1,Dial(device)
exten => _203,1,Dial(device)

exten => _8500,1,VoicemailMain(@companya)

[companya-internal]
include => companya
include => outgoing

[companyb]
exten => _2025551212,1,Macro(auto-attendant)

exten => _202,1,Dial(device)
exten => _203,1,Dial(device)

exten => _8500,1,VoicemailMain(@companyb) 

[companyb-internal]
include => companyb
include => outgoing


sip.conf
[phone1]
context=companya-internal
....



------------------------------

Message: 9
Date: Mon, 8 Nov 2004 15:43:10 -0500
From: "Uma S. Pandey" <uma at prgsi.com>
Subject: [Asterisk-Users] Same Extensions in Multiple contexts
To: <asterisk-users at lists.digium.com>
Message-ID: <200411081433493.SM02180 at UMA>
Content-Type: text/plain; charset="us-ascii"

Hi

 

For a customer, I am trying to setup 3 different companies on one asterisk
box, and I need to assign extension 200 in three different companies. I was
using different contexts, but was unable to get it to work. So, my basic
question is - 

 

In Asterisk, Can we have same extension number in different contexts? 

 

For example:

 

[Context_company_1]

exten => 200,1,,,

 
[context_company_2]

Exten =>200,1,..


[context_company_3]

Exten =>200,1,..

 

Thanks
 

Uma Pandey






More information about the asterisk-users mailing list