[Asterisk-Users] Complicated Dialing plan routing

'kristian at netatonce.se' kristian at netatonce.se
Tue Dec 6 12:50:25 MST 2005


On Tue, Dec 06, 2005 at 09:47:49AM -0700, Colin Anderson wrote:
> Don't want to point out the obvious, but seems to me that the lowest common
> denominator here is to dial out the PRI if there's no extension match,
> correct? If this is the case, then you can use the 's' extension. The 's'
> extension is a 'match-none' extension and is invoked when there is not match
> for an extension. So you could add at the end of each relevant context:
I've already accomplished this with
exten => _X.,Dial(Zap/g2/${EXTEN})

but that's not the problem.
I wan't users that are within the same area code
to be able to dial each other using just their
"extension" as well as using area code +
"extension". Users in other area codes are of
course only available through "area code +
extension".

> 
> exten => s,1,Dial(ZAP/g0/${EXTEN})
> 
> and if there's no extension match, it'll go out your PRI. Only problem I see
> there is your PRI might not like it if it is a local call from the caller's
> perspective but a LD call from Asterisk's perspective and vice-versa. That,
> you have to put on your thinking cap to deal with. 
Yes, I have done so and not come up with a clean
solution and thus I asked the list :)

   Kristian.

> 
> -----Original Message-----
> From: Kristian Larsson [mailto:kristian at netatonce.se]
> Sent: Tuesday, December 06, 2005 9:40 AM
> To: asterisk-users at lists.digium.com
> Subject: [Asterisk-Users] Complicated Dialing plan routing
> 
> Hey everyone,
> 
> I'm having a slight problem with my dialplan which
> I was hoping you could help me with.
> 
> First let me explain the scenario;
> I have a few hundred different customers split
> into a few different area codes. What I want to
> allow them to do is to call each other normally,
> ie with area code and if the called party is
> within their own area code they should be able to
> call them without first typing in the area code.
> If the number dialed does not exist in my dialing
> plan it should go out through a PRI extension to
> the PSTN.
> 
> Ie.
> 0470-112233 should be able to call 0470-445566 by
> calling either "0470445566" or "445566" and if the
> extension 0470445566 doesn't exist it should try
> the PRI.
> 
> I have tried using the Goto command to jump
> between different contexts for the different area
> code, but if I use Goto(0470,445566,1) and 445566
> doesn't exist it doesn't go out the PRI which it
> should.
> 
> I've also experimented with using include and
> different contexts which doesn't seem to work
> either.
> 
> So far the only way I've made it work is to
> have two extensions one for 0470445566 and one for
> 445566 and a lot of different contexts... I would
> like to avoid this and just have the extension in
> one place and instead use some smart dialing plan
> to compensate for area codes and the alike.
> 
> I presume someone else is already doing what I
> want to do and perhaps could share their
> knowledge. Let me also mentioned I've searched the
> list archive but came up empty handed.
> 
> Please CC me as I'm not currently on the list and
> thank you.
> 
> Regards,
> Kristian Larsson
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list