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



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
-- 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

Reply via email to