[asterisk-users] Dialplan strategy suggestions needed
Tim Panton
thp at westhawk.co.uk
Sat Aug 1 03:06:12 CDT 2009
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
More information about the asterisk-users
mailing list