Posted: Wed Jun 29, 2005 12:44 pm Post subject: [Asterisk-Users] Extension Matching.
That worked perfectly, this behavior must have changed recently because I
tried that 6 months ago and it did not work:-)
_____
From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@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.
Posted: Wed Jun 29, 2005 12:46 pm Post subject: [Asterisk-Users] Extension Matching.
My suggestion would be to basically strip the first digits down until
you get to the 7 digit extension. Unless someone else has a better
idea, that's how we do it, storing the first part in a variable in case
we need it.
Aaron Daniel
Chris Modesitt wrote:
Quote:
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
Posted: Wed Jun 29, 2005 12:59 pm Post subject: [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 :-)
Chris
_____
From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@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.
Posted: Wed Jun 29, 2005 1:04 pm Post subject: [Asterisk-Users] Extension Matching.
Glad I could help
-----Original Message-----
From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Chris
Modesitt
Sent: Wednesday, June 29, 2005 4:44 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: RE: [Asterisk-Users] Extension Matching.
That worked perfectly, this behavior must have changed recently because
I tried that 6 months ago and it did not work:-)
________________________________
From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@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.
Posted: Wed Jun 29, 2005 1:13 pm Post subject: [Asterisk-Users] Extension Matching.
What are you trying to do???
-----Original Message-----
From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@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 :-)
Chris
________________________________
From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@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.
Posted: Wed Jun 29, 2005 1:53 pm Post subject: [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 share:-)
Chris
_____
From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@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@lists.digium.com
[mailto:asterisk-users-bounces@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 :-)
Chris
_____
From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@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.
Posted: Wed Jun 29, 2005 2:39 pm Post subject: [Asterisk-Users] Extension Matching.
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@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@lists.digium.com
[mailto:asterisk-users-bounces@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@lists.digium.com
[mailto:asterisk-users-bounces@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@lists.digium.com
[mailto:asterisk-users-bounces@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.
Posted: Thu Jun 30, 2005 2:27 am Post subject: [Asterisk-Users] Extension Matching.
*nod* For a long time "." had to be the last item in a pattern match
(if it was used at all)
Chris Modesitt wrote:
Quote:
That worked perfectly, this behavior must have changed recently because I
tried that 6 months ago and it did not work:-)
_____
From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@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
--
Eric Wieling * BTEL Consulting * 504-210-3699 x2120
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum