[asterisk-dev] [design] Matching algorithm

Jay R. Ashworth jra at baylink.com
Tue Jun 3 15:27:29 CDT 2008


On Tue, Jun 03, 2008 at 10:54:20PM +0300, Tzafrir Cohen wrote:
> On Tue, Jun 03, 2008 at 12:23:32PM -0600, Steve Murphy wrote:
> > IIrc, I'm pretty sure my fast pattern matcher does a pass over the
> > string and upcases all the NXZ's. This is in trunk and 1.6.0 at the
> > moment. If you guys decide that lowercase is not a matching pattern,
> > this will have ramifications on *that* code, and I'll have to mod it
> > to duplicate the old behavior.
> >
> > I'm willing to abide by whatever's decided, tho. It's a pretty minor
> > tweak to the code. (I believe/think/hope)
>
> I believe X, [123], N and such are used in many places besides
> Astersik. Are they usually case-sensitive?

Do you mean "in the writing of dialling patterns"? (Dialling patterns
being the extension of a directory number to a specific sending
context, and not specific to Asterisk...)

If so, my answer is that my percerption of "case sensitive" is that
it's an adjective phrase that applies to *parsers*, be they eyeballs
or computers.

NPA-NXX-XXXX is usually written in caps, for instance, for hysterical
raisins, and since no one seems to feel the need to use lower case
versions of the letters to denote something special, it's acceptable to
parse such strings in a case-insensitive manner.

And the common characters in that specific subdomain have traditionally
been N, X, and 0/1, IME.

That doesn't mean that some specific sub-domain might not do so -- as
indeed, we're discussing about the writing of Asterisk dialplan code.

Cheers,
-- jra
-- 
Jay R. Ashworth                   Baylink                      jra at baylink.com
Designer                     The Things I Think                       RFC 2100
Ashworth & Associates     http://baylink.pitas.com                     '87 e24
St Petersburg FL USA      http://photo.imageinc.us             +1 727 647 1274

	     Those who cast the vote decide nothing.
	     Those who count the vote decide everything.
	       -- (Joseph Stalin)



More information about the asterisk-dev mailing list