I have a new Asterisk system going into production next week and I'm a bit stumped as to the best way to handle the Dialplans for it. The Asterisk system is replacing 4 separate PSTN lines with both SIP & PSTN inputs. The setting up of the dial plan is giving me some design headaches, which probably means I'm missing something obvious and doing this the hard way. I have separate entire phone 'systems' for each incoming DID. For example, this one system will handle 4 separate incoming DIDs. The first (let's call it Company A) takes a call, plays a menu, gets input from the caller, directs them to the appropriate extension (ie. Press 1 for sales, 2 for support, etc.). The second DID has a similar setup with a menu, but its for an entirely different company. The incoming extension number I'm getting for this will be entirely different, therefore will be the definition of this phone menu structure. The others are simply numbers that go through a 'Time of Day' check and then simply forward to an extension. I have it all working fine by using: extern => 2125551111,1,..... extern => 2125551111,2,..... etc. for the first number, and then a second set for the second number like: extern => 2125551112,1,..... extern => 2125551112,2,..... The problem is when I get to the Background() command to play the sound file and get the input from the user for the menu. Since the input from the user becomes the extension, I then have a problem that my multi-faceted dialplan now gets confused with what extension applies to what menu, etc. I need to be able separate these into their own sections so that extensions won't conflict but I'm not sure how to do this. All the calls are coming in from one SIP provider, so I have only one context that I'm using because of that. I'm not sure if there is a way to create separate contexts for this and branch to them? I must be approaching this wrong. Can anyone point me in the right direction so I create something that is manageable for the future and won't have conflicts on user inputs between the systems? Thanks Myles
On 1 Aug 2009, at 08:32, Myles Wakeham wrote:> I have a new Asterisk system going into production next week and I'm a > bit stumped as to the best way to handle the Dialplans for it. > > The Asterisk system is replacing 4 separate PSTN lines with both SIP & > PSTN inputs. The setting up of the dial plan is giving me some design > headaches, which probably means I'm missing something obvious and > doing > this the hard way. > > I have separate entire phone 'systems' for each incoming DID. For > example, this one system will handle 4 separate incoming DIDs. The > first (let's call it Company A) takes a call, plays a menu, gets input > from the caller, directs them to the appropriate extension (ie. > Press 1 > for sales, 2 for support, etc.). > > The second DID has a similar setup with a menu, but its for an > entirely > different company. The incoming extension number I'm getting for this > will be entirely different, therefore will be the definition of this > phone menu structure. > > The others are simply numbers that go through a 'Time of Day' check > and > then simply forward to an extension. > > I have it all working fine by using: > > extern => 2125551111,1,..... > extern => 2125551111,2,..... > > etc. for the first number, and then a second set for the second > number like: > > extern => 2125551112,1,..... > extern => 2125551112,2,..... > > > The problem is when I get to the Background() command to play the > sound > file and get the input from the user for the menu. Since the input > from > the user becomes the extension, I then have a problem that my > multi-faceted dialplan now gets confused with what extension applies > to > what menu, etc. > > I need to be able separate these into their own sections so that > extensions won't conflict but I'm not sure how to do this. All the > calls are coming in from one SIP provider, so I have only one context > that I'm using because of that. I'm not sure if there is a way to > create separate contexts for this and branch to them?Sure, have a top level context that inbound calls from the ITSP go into: [from-ITSP] exten => 2125551112,1,Goto(companya,${EXTEN},1) exten => 2125551111,1,Goto(companyb,${EXTEN},1) ; then separate contexts for each company: [companya] extern => 2125551111,1,..... extern => 2125551111,2,..... [companyb] extern => 2125551112,1,..... extern => 2125551112,2,..... Tim. Tim Panton - Web/VoIP consultant and implementor www.westhawk.co.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2419 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20090801/d7432575/attachment.bin
Tim wrote: >Sure, have a top level context that inbound calls from the ITSP go >into: >[from-ITSP] >exten => 2125551112,1,Goto(companya,${EXTEN},1) >exten => 2125551111,1,Goto(companyb,${EXTEN},1) >; then separate contexts for each company: >[companya] >extern => 2125551111,1,..... >extern => 2125551111,2,..... >[companyb] >extern => 2125551112,1,..... >extern => 2125551112,2,..... Thanks. Yes, that is what I would have thought. But the problem is that my ITSP has one entry in sip.conf and this goes to one context. Should I repeat that entry for each DID that could come in from the ITSP in sip.conf to allow this to work? Myles -- ======================Myles Wakeham Director of Engineering Tech Solutions USA, Inc. Scottsdale, Arizona USA http://www.techsolusa.com Phone +1-480-451-7440
The calls with all come in to one context, in this example from-ITSP. From there you send it to one context per company. As the example shows. I might do: ; All calls from ITSP come to here and you route each number somewhere else [from-ITSP] exten => 2125551112,1,Goto(companya,menu,1) exten => 2125551111,1,Goto(companyb,menu,1) ; then separate contexts for each company: [companya] extern => menu,1,..... extern => menu,n,..... [companyb] extern => menu,1,..... extern => menu,n,..... -- Jim Dickenson mailto:dickenson at cfmc.com CfMC http://www.cfmc.com/> From: Myles Wakeham <myles at techsol.org> > Organization: Tech Solutions USA, Inc. > Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion > <asterisk-users at lists.digium.com> > Date: Sat, 01 Aug 2009 08:51:39 -0700 > To: <asterisk-users at lists.digium.com>, <thp at westhawk.co.uk> > Subject: Re: [asterisk-users] Dialplan strategy suggestions needed > > Tim wrote: > >> Sure, have a top level context that inbound calls from the ITSP go >into: >> [from-ITSP] >> exten => 2125551112,1,Goto(companya,${EXTEN},1) >> exten => 2125551111,1,Goto(companyb,${EXTEN},1) >> ; then separate contexts for each company: >> [companya] >> extern => 2125551111,1,..... >> extern => 2125551111,2,..... >> [companyb] >> extern => 2125551112,1,..... >> extern => 2125551112,2,..... > > Thanks. Yes, that is what I would have thought. But the problem is > that my ITSP has one entry in sip.conf and this goes to one context. > Should I repeat that entry for each DID that could come in from the ITSP > in sip.conf to allow this to work? > > Myles > > -- > ======================> Myles Wakeham > Director of Engineering > Tech Solutions USA, Inc. > Scottsdale, Arizona USA > http://www.techsolusa.com > Phone +1-480-451-7440 > > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > AstriCon 2009 - October 13 - 15 Phoenix, Arizona > Register Now: http://www.astricon.net > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users