[Asterisk-Users] Complicated Dialing plan routing

Kristian Larsson kristian at netatonce.se
Tue Dec 6 09:40:04 MST 2005


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



More information about the asterisk-users mailing list