[Asterisk-Users] Extension Matching.

Jay Milk jay at skimmilk.net
Wed Jun 29 15:40:11 MST 2005


Fun stuff... I did something similar a while back for a company with two
offices in Boston and one in LA.  The setup was:

21xxx - Boston A
22xxx - Boston B
31xxx - LA

All three * systems shared a script which would translate possible DIDs
to internal extensions, something like...

616-qqq-8xxx -> 21xxx (xxx in 000, 100-299)
616-rrr-3xxx -> 22xxx (xxx in 100-199, 800-899)
213-sss-9xxx -> 31xxx (xxx in 000..999, except 700-899)

7-digit numbers were "expanded" with the local area-code by dialplan
before getting to this script.  The script then spit out dial_exten,
which was either a local extension or a full 10-digit number, ready to
be dialed.

It's a cinch to set up in PHP (my preference) or Perl.

-----Original Message-----
From: Chris Modesitt [mailto:chris at octelecom.net] 
Sent: Wednesday, June 29, 2005 4:47 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: RE: [Asterisk-Users] Extension Matching.


Well in short I am trying to fix a loop error.
 
Basically this is what I have setup:
 
AMP à PROXY à PSTN Gateway.
 
In amp you setup your extensions, ours are typically 4 digit, then you
assign DIDS to each extension. AKA 8014445454 points to 5454.  Well the
first thing my users try to do is dial their DIDS from inside the PBX.
Because of the way AMP’s internals work it dose not try to match an
outbound number with it’s own DID database before forwarding to the
proxy.  The proxy realizes that the destination and source IP addresses
are the same and reports “482 Loop Detected” and destroys the call.  So
my options are to 1.) Use a pattern for the DID to match.  2.) Program
every variation they might try (with the 9 without etc).  3.) Or tell
the users to quite complaining (which they won’t).
 
I know that their has been talk of rebuilding the pattern matcher in the
past I was wonder if this has changed or if anybody has a real nifty
macro they would be willing to shareJ
 
Chris
 
 
 



From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Alexander
Lopez
Sent: Wednesday, June 29, 2005 3:13 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: RE: [Asterisk-Users] Extension Matching.
 
What are you trying to do???
 
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Chris
Modesitt
Sent: Wednesday, June 29, 2005 4:54 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: RE: [Asterisk-Users] Extension Matching.
 
Okay I take that back it kinda works, but the behavior is erratic.
Sometimes it matches just the 7 digits and sometimes it matches every
number that enters the context  J
 
Chris
 



From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Alexander
Lopez
Sent: Wednesday, June 29, 2005 2:30 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: RE: [Asterisk-Users] Extension Matching.
 
Try _.4445454
 
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Chris
Modesitt
Sent: Wednesday, June 29, 2005 4:17 PM
To: asterisk-users at lists.digium.com
Subject: [Asterisk-Users] Extension Matching.
 
Is there a way to match the last 7 digits of an extension?
 
So that 1008014445454
            8014445454
            4445454 
 
Would all match?
 
I have looked at extension matching and I can’t figure out how to do
thisJ
 
Thanks in advance!
 
Chris




More information about the asterisk-users mailing list