[VoIP] Asterisk Programming Technique

Lee Spenadel lee at spenadel.com
Wed Sep 5 06:36:08 CDT 2007


So it looks like I'm back to my original *x dialing plan for connection to
other services.  Hey, life could be worse. Thanks for your help guys.

Lee

-----Original Message-----
From: voip-bounces at ckts.info [mailto:voip-bounces at ckts.info] On Behalf Of
Shane Young
Sent: Wednesday, September 05, 2007 12:13 AM
To: voip at ckts.info
Subject: Re: [VoIP] Asterisk Programming Technique

Yup, my way won't work if you have overlapping numbers of the same  
length.  You *must* distinguish them somehow.

This is why I use the 200 prefix for CNET.  This also works the other  
way (from the step switch back to the network.)  By dialing 1+200+ the  
CNET number, I can send a call out the network correctly for CNET and   
1+ some real NANP number will go out to the real PSTN.

In Minneapolis, MN we can (normally) dial

7 digits for a phone number in your own NPA OR
10 digits for a phone number in your own NPA
10 digits for a phone number outside your NPA (but still local)

1+10 digits for toll calls.

Obviously, if I want to call my neighbor using 7 digit dialing, who  
might have the same number as a CNET switch, I have to distinguish it  
somehow, and I chose to prefix an unused NPA for CNET.

An unused *xx code might be a good way to go for routing calls via FWD  
or other services.  Maybe *FWD  :)








Quoting Mark Rudholm <mark at rudholm.com>:

> Oh, one more note, the way one friend of mine with a lot of
> various services and direct connections to various other
> Asterisk boxes is to set up fake FGD-style 10XXX codes
> to direct routing.
>
> I find that a bit cumbersome myself, so I just use
> *X codes for stuff like that.  Then again, I've abandoned
> 1+ dialing too (it's all 10D now) so YMMV.
>
> Mark Rudholm wrote:
>> The problem is that FWD numbers don't all start with 7, so when
>> Lee says FWD numbers are five or six digits, he'll be dialing
>> 7+5D or 7+6D, so it's impossible to distinguish between a
>> 7+6D FWD call and a 7XX-XXXX CNET call.
>>
>> I think he should use _*7XXXXX. for FWD calls, and
>> _NXXXXXX for CNET calls (which is what he's already doing, I
>> imagine)
>>
>> -Mark
>>
>> Shane Young wrote:
>>> Oh, that's easy then.
>>>
>>> exten => _7xxxx,1,macro(dial-fwd)
>>> exten => _7xxxxx,1,macro(dial-fwd)
>>> exten => _7xxxxxx,1,macro(dial-cnet)
>>>
>>> This should dial immediately when you dial a 7-digit CNET number
>>> starting with "7".  If you dial a 5 or 6 digit number starting with
>>> "7" it will wait for a bit to see if you are done  dialing.  If no
>>> more digits are entered, then it will fire off the macro for fwd.
>>>
>>>
>>> Quoting Lee Spenadel <lee at spenadel.com>:
>>>
>>>> Shane,
>>>>
>>>> I'm trying to avoid implementing an NPA to my dialing plan.  FWD   
>>>> numbers are
>>>> 5 - 6 digits.
>>>>
>>>> Lee
>>>>
>>>> -----Original Message-----
>>>> From: voip-bounces at ckts.info [mailto:voip-bounces at ckts.info] On Behalf
Of
>>>> Shane Young
>>>> Sent: Tuesday, September 04, 2007 10:35 PM
>>>> To: voip at ckts.info
>>>> Subject: Re: [VoIP] Asterisk Programming Technique
>>>>
>>>> My asterisk box is my home PBX first and CNET tandem second.
>>>>
>>>> What I do is assign the generic area code "200" to north american CNET.
>>>>
>>>> If I want to call a CNET number, I dial 1-200-NXX-XXXX.  200 isn't
>>>> assigned in north america, so it works good for me.
>>>>
>>>> How many digits are in yoru free world dialup numbers? (I haven't used
>>>> FWD in many years)
>>>>
>>>>
>>>>
>>>> Quoting Lee Spenadel <lee at spenadel.com>:
>>>>
>>>>> To you savvy Asterisk programmers out there, I have a question.   What
is
>>>> a
>>>>> good way to branch out a call to a particular SIP service, like FWD in
a
>>>>> dial plan?  What I mean by this is that I want to be able to dial 7 in
my
>>>>> PBX so that I can send out calls to FWD via that route, yet still
reach
>>>> CNET
>>>>> members whose office codes are 7XX.  I know I can wild card a   
>>>>> command such
>>>>> as
>>>>>
>>>>>
>>>>>
>>>>> _71.,
>>>>>
>>>>>
>>>>>
>>>>> so that FWD calls go out that way, but I'm wondering if there's a way
to
>>>> use
>>>>> some sort of delay with the ignorepat command so that if I dial 7 and
>>>> wait,
>>>>> say 1 second, those calls go out via FWD, yet if there is no delay in
>>>>> dialing the digits the call goes out via CNET.  I know that the
ignorepat
>>>>> command only disables the cancellation of dial tone for that   
>>>>> dialed digit,
>>>>> but I'm looking to emulate a PBX where you dial, say 9, to get an
outside
>>>>> line to reach the PSTN, which is how I had my FWD access setup.  But
now
>>>>> there are 7XX CNET numbers that I need to contend with. I'm thinking
that
>>>>> I'll have to have a unique code like *9, *8, etc for each SIP   
>>>>> service that
>>>> I
>>>>> want to send calls out on.  Constructive comments welcome.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>> Lee
> _______________________________________________
> VoIP mailing list
> VoIP at ckts.info
> http://lists.ckts.info/mailman/listinfo/voip
> Project Web Page: http://www.ckts.info/
>

--Shane
+1-821-7311 CNET


_______________________________________________
VoIP mailing list
VoIP at ckts.info
http://lists.ckts.info/mailman/listinfo/voip
Project Web Page: http://www.ckts.info/



More information about the VoIP mailing list