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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041108/92b990a9/attachment.htm
Seth Remington
2004-Nov-08 14:05 UTC
[Asterisk-Users] Same Extensions in Multiple contexts
On Mon, 2004-11-08 at 15:43, Uma S. Pandey wrote:> 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 PandeyThis is certainly possible and in fact quite common. The actual extension that gets used just depends on which context you drop the incoming / outgoing call into. Maybe if you give us some more specifics / config examples we can help you out more. -Seth -- Seth Remington SaberLogic, LLC 661-B Weber Drive Wadsworth, Ohio 44281 Phone: (330)335-6442 Fax: (330)336-8559
On Mon, 8 Nov 2004 15:43:10 -0500, Uma S. Pandey <uma@prgsi.com> wrote:> 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,..Sure you can. You'll need to limit callers abilities based on which company they work for. You could do this by including the contexts of the companies. For instance, lets say you have a phone in sip.conf defined. The context=basic-comp1 [basic-comp1] include => voicemail include => context_company_1 This will only allow the caller to match to extension 200 in company 1 and access to voicemail. More information about extensions.conf can be found at http://www.voip-info.org (the wiki), http://www.asteriskdocs.org (chapter 5) and http://www.google.com. HTH, Leif Madsen. http://www.asteriskdocs.org
Gene Willingham
2004-Nov-08 17:59 UTC
[Asterisk-Users] RE: Same Extensions in Multiple contexts
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@prgsi.com> Subject: [Asterisk-Users] Same Extensions in Multiple contexts To: <asterisk-users@lists.digium.com> Message-ID: <200411081433493.SM02180@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
yes ----- Original Message ----- From: Uma S. Pandey To: asterisk-users@lists.digium.com Sent: Monday, November 08, 2004 3:43 PM Subject: [Asterisk-Users] Same Extensions in Multiple contexts 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 ------------------------------------------------------------------------------ _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041108/cbbdf3f2/attachment.htm
Jason Brown
2005-Feb-04 18:54 UTC
[Asterisk-Users] RE: Same Extensions in Multiple contexts
Revisiting this: I was able to get this to work as well, but voicemail doesn't work as intended. A user in companya-internal cannot get his voicemail when in the office. It gives login incorrect. However if the user dials in from outside through a zap channel the vm login works. Any ideas? Jason 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 <http://lists.digium.com/mailman/listinfo/asterisk-users> > Subject: [Asterisk-Users] Same Extensions in Multiple contexts To: <asterisk-users at lists.digium.com <http://lists.digium.com/mailman/listinfo/asterisk-users> > Message-ID: <200411081433493.SM02180 at UMA <http://lists.digium.com/mailman/listinfo/asterisk-users> > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050204/8ec0d5ba/attachment.htm