|
List Info
Thread: murf: trunk r41283 - /trunk/main/pbx.c
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-30 13:38:05 |
|
On 8/29/06, lists.digium.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">svn-commits lists.digium.com <lists.digium.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
svn-commits lists.digium.com> wrote:
URL:
http://svn.digium.com/view/asterisk?rev=41283&view=rev
Log: This change fixes bug 7820. Way back in April this bug was reintroduced, it appears, when a bunch of restructuring was done. This code was basically left out during the restructuring. In the case of the failure in 7820, it is trying to match the extension _x. with _x., and failing, because the 'x' should only match 0 thru 9. I **could** upgrade the code so that that N,Z, and X match not only their intended number ranges, but also N,Z,and X respectively. And, moreover, X could also match N and Z, and Z could also match N. I have no idea why this bug took so long to turn up. I have no idea what a more thorough treatment of the code would do to working code, either. So I left it as it ***was***.
Or, make it so that we could somehow escape the characters, so that the parser would know that we're really trying to match on the letter. I'm not sure the best way to do this -- using the backslash as an escape character might look a little funny, like this:
exten => _\Noob.,1,Verbose(3, Yup, you're a noob!)
I'm just throwing out ideas here, there's probably a much more elegant solution that I just haven't seen. It would be nice to be able to do more advanced matching. (I know what you're thinking -- I'd like to be able to use regex matches too -- but that's probably overkill at this stage.)
-Jared -Jared
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-30 14:06:52 |
On Wednesday 30 August 2006 09:38, Jarenessto wrote:
> exten => _\Noob.,1,Verbose(3, Yup, you're a noob!)
If you're matching the exact string "noob" why
are you using _?
-A.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-30 14:18:35 |
Also "." means "1 or more" so it
would still not match Noob
Andrew Kohlsmith wrote:
> On Wednesday 30 August 2006 09:38, Jarenessto wrote:
>> exten => _\Noob.,1,Verbose(3, Yup, you're a
noob!)
>
> If you're matching the exact string "noob"
why are you using _?
>
> -A.
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-30 14:35:44 |
On Wed, Aug 30, 2006 at 10:06:52AM -0400, Andrew Kohlsmith
wrote:
> On Wednesday 30 August 2006 09:38, Jarenessto wrote:
> > exten => _\Noob.,1,Verbose(3, Yup, you're a
noob!)
>
> If you're matching the exact string "noob"
why are you using _?
To also match "Noob!" and "Noob."
(are those vald SIP/IAX dial
strings?)
--
Tzafrir Cohen sip:tzafrir local.xorcom.com
icq#16849755 iax:tzafrir local.xorcom.com
+972-50-7952406 jabber:tzafrir jabber.org
tzafrir.cohen xorcom.com http://www.xorcom.com
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-30 15:10:35 |
30 aug 2006 kl. 16.35 skrev Tzafrir Cohen:
> On Wed, Aug 30, 2006 at 10:06:52AM -0400, Andrew
Kohlsmith wrote:
>> On Wednesday 30 August 2006 09:38, Jarenessto
wrote:
>>> exten => _\Noob.,1,Verbose(3, Yup, you're
a noob!)
>>
>> If you're matching the exact string
"noob" why are you using _?
>
> To also match "Noob!" and
"Noob." (are those vald SIP/IAX dial
> strings?)
In the IAX2 spec the extension is now UTF8. However, the
Asterisk
implementation is not up to date with the specs.
I don't remember if there's a valid character
specification and how you
mark reserved characters.
Example: How do I dial extension "arp sksk!!" in context
"klasdfj## " since the separates extension from
context?
/O
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-30 15:10:59 |
On Wed, 2006-08-30 at 09:38 -0400, Jarenessto wrote:
> (I know what you're thinking -- I'd like to be able
to use regex
> matches too -- but that's probably overkill at this
stage.)
Its inevitable that Asterisk will need regex matching at
some point. The
current matching system is heavily tilted toward numeric
usernames and
extensions but more and more we will begin to see email
style address.
Already the existing system has some limitations; for
example it can not
match a variable number of digits. I had a friend who was
trying to
implement an ISDN lookup for library books (ISDNs are
variable length)
but had problems because of the limitations on the matching.
If I can throw my 2c in; I think the existing system should
be preserved
for backwards compatibility so any new system should have a
different
prefix. The natural choice for regext would seem to be
"/"
exten => /[1-9][0-9]....
--
John Lange
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-30 15:24:56 |
30 aug 2006 kl. 17.10 skrev John Lange:
> On Wed, 2006-08-30 at 09:38 -0400, Jarenessto wrote:
>> (I know what you're thinking -- I'd like to be
able to use regex
>> matches too -- but that's probably overkill at
this stage.)
>
> Its inevitable that Asterisk will need regex matching
at some
> point. The
> current matching system is heavily tilted toward
numeric usernames and
> extensions but more and more we will begin to see email
style address.
>
> Already the existing system has some limitations; for
example it
> can not
> match a variable number of digits. I had a friend who
was trying to
> implement an ISDN lookup for library books (ISDNs are
variable length)
> but had problems because of the limitations on the
matching.
>
> If I can throw my 2c in; I think the existing system
should be
> preserved
> for backwards compatibility so any new system should
have a different
> prefix. The natural choice for regext would seem to be
"/"
>
> exten => /[1-9][0-9]....
>
This is a proposal I came up with in May 2005:
http://edvina.net/asterisk/alphanumericextensions.pdf
The big change is that we now have two channels being utf8
and that means that Asterisk will have to become utf8...
/Olle
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-30 15:31:26 |
On Wed, 2006-08-30 at 10:10 -0500, John Lange wrote:
> On Wed, 2006-08-30 at 09:38 -0400, Jarenessto wrote:
> > (I know what you're thinking -- I'd like to be
able to use regex
> > matches too -- but that's probably overkill at
this stage.)
>
> Its inevitable that Asterisk will need regex matching
at some point. The
> current matching system is heavily tilted toward
numeric usernames and
> extensions but more and more we will begin to see email
style address.
>
> Already the existing system has some limitations; for
example it can not
> match a variable number of digits. I had a friend who
was trying to
> implement an ISDN lookup for library books (ISDNs are
variable length)
> but had problems because of the limitations on the
matching.
I think you meant ISBN. And variable number of digits is
supported. You
just need to know how to determine when it is shorter or
longer and
write your dialplan as such.
Think about it, in dialplans, most people have short
internal extensions
that can be dialed, and longer PSTN local and even longer
PSTN LD
numbers that can all be handled just fine.
> If I can throw my 2c in; I think the existing system
should be preserved
> for backwards compatibility so any new system should
have a different
> prefix. The natural choice for regext would seem to be
"/"
>
> exten => /[1-9][0-9]....
--
Steven Critchfield <critch basesys.com>
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-30 15:57:05 |
On Wed, 2006-08-30 at 10:31 -0500, Steven Critchfield wrote:
> > Already the existing system has some limitations;
for example it can not
> > match a variable number of digits. I had a friend
who was trying to
> > implement an ISDN lookup for library books (ISDNs
are variable length)
> > but had problems because of the limitations on the
matching.
>
> I think you meant ISBN. And variable number of digits
is supported. You
> just need to know how to determine when it is shorter
or longer and
> write your dialplan as such.
LOL, ya, ISBN. Apparently I've exceeded the maximum acronym
storage
limit of my brain.
> Think about it, in dialplans, most people have short
internal extensions
> that can be dialed, and longer PSTN local and even
longer PSTN LD
> numbers that can all be handled just fine.
I'll ask for the specific example. I think it had to do
with terminating
with a "#". So:
exten => _X.#,1,....
Does not work. Everything after the "." is
ignored and you are forced to
rely on the digit timeout for asterisk to start doing
anything. This is
exceptionally annoying in this case because the timeouts are
long to
allow people to enter a difficult number.
--
John Lange
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-30 16:58:11 |
On Wed, 2006-08-30 at 10:57 -0500, John Lange wrote:
> On Wed, 2006-08-30 at 10:31 -0500, Steven Critchfield
wrote:
> > > Already the existing system has some
limitations; for example it can not
> > > match a variable number of digits. I had a
friend who was trying to
> > > implement an ISDN lookup for library books
(ISDNs are variable length)
> > > but had problems because of the limitations
on the matching.
> >
> > I think you meant ISBN. And variable number of
digits is supported. You
> > just need to know how to determine when it is
shorter or longer and
> > write your dialplan as such.
>
> LOL, ya, ISBN. Apparently I've exceeded the maximum
acronym storage
> limit of my brain.
>
> > Think about it, in dialplans, most people have
short internal extensions
> > that can be dialed, and longer PSTN local and even
longer PSTN LD
> > numbers that can all be handled just fine.
>
> I'll ask for the specific example. I think it had to
do with terminating
> with a "#". So:
>
> exten => _X.#,1,....
>
> Does not work. Everything after the "." is
ignored and you are forced to
> rely on the digit timeout for asterisk to start doing
anything. This is
> exceptionally annoying in this case because the
timeouts are long to
> allow people to enter a difficult number.
That _may_ be considered a bug. I hadn't thought of useing
the #
terminater in the dialplan.
Of course it could have been implemented in a loop. loose
idea below,
not sure it would work exactly as written.
[isbn-input]
exten => s,1,Playback instructions.
exten => _X,1,do something to set/add this collected
digit into a var.
exten => _X,2,Goto(isbn-input,noop)
exten => noop,1,noop()
exten => #,1,validate the number
exten => #,2,goto(somewhere else)
Defiantely jumping through a little hoop, but otherwise not
bad. I would
like to see the example you mentioned be able to work
though.
--
Steven Critchfield <critch basesys.com>
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-30 17:40:07 |
----- Steven Critchfield <critch basesys.com> wrote:
> On Wed, 2006-08-30 at 10:57 -0500, John Lange wrote:
> > On Wed, 2006-08-30 at 10:31 -0500, Steven
Critchfield wrote:
> > > > Already the existing system has some
limitations; for example it
> can not
> > > > match a variable number of digits. I had
a friend who was trying
> to
> > > > implement an ISDN lookup for library
books (ISDNs are variable
> length)
> > > > but had problems because of the
limitations on the matching.
> > >
> > > I think you meant ISBN. And variable number
of digits is
> supported. You
> > > just need to know how to determine when it is
shorter or longer
> and
> > > write your dialplan as such.
> >
> > LOL, ya, ISBN. Apparently I've exceeded the
maximum acronym storage
> > limit of my brain.
> >
> > > Think about it, in dialplans, most people
have short internal
> extensions
> > > that can be dialed, and longer PSTN local and
even longer PSTN LD
> > > numbers that can all be handled just fine.
> >
> > I'll ask for the specific example. I think it had
to do with
> terminating
> > with a "#". So:
> >
> > exten => _X.#,1,....
> >
> > Does not work. Everything after the
"." is ignored and you are
> forced to
> > rely on the digit timeout for asterisk to start
doing anything. This
> is
> > exceptionally annoying in this case because the
timeouts are long
> to
> > allow people to enter a difficult number.
>
> That _may_ be considered a bug. I hadn't thought of
useing the #
> terminater in the dialplan.
>
> Of course it could have been implemented in a loop.
loose idea below,
> not sure it would work exactly as written.
>
> [isbn-input]
> exten => s,1,Playback instructions.
> exten => _X,1,do something to set/add this collected
digit into a
> var.
> exten => _X,2,Goto(isbn-input,noop)
>
> exten => noop,1,noop()
>
> exten => #,1,validate the number
> exten => #,2,goto(somewhere else)
>
> Defiantely jumping through a little hoop, but otherwise
not bad. I
> would
> like to see the example you mentioned be able to work
though.
>
> --
> Steven Critchfield <critch basesys.com>
>
The problem with using # in a dialplan, is that many SIP
(and probably other) devices silently eat #. # is often the
"send the call with the previously dialed
digits" button.
--
Jason Parker
Digium
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-30 18:39:32 |
On Wed, 2006-08-30 at 12:40 -0500, Jason Parker wrote:
> ----- Steven Critchfield <critch basesys.com> wrote:
> > On Wed, 2006-08-30 at 10:57 -0500, John Lange
wrote:
> > > On Wed, 2006-08-30 at 10:31 -0500, Steven
Critchfield wrote:
> > > > > Already the existing system has
some limitations; for example it
> > can not
> > > > > match a variable number of digits.
I had a friend who was trying
> > to
> > > > > implement an ISDN lookup for
library books (ISDNs are variable
> > length)
> > > > > but had problems because of the
limitations on the matching.
> > > >
> > > > I think you meant ISBN. And variable
number of digits is
> > supported. You
> > > > just need to know how to determine when
it is shorter or longer
> > and
> > > > write your dialplan as such.
> > >
> > > LOL, ya, ISBN. Apparently I've exceeded the
maximum acronym storage
> > > limit of my brain.
> > >
> > > > Think about it, in dialplans, most
people have short internal
> > extensions
> > > > that can be dialed, and longer PSTN
local and even longer PSTN LD
> > > > numbers that can all be handled just
fine.
> > >
> > > I'll ask for the specific example. I think
it had to do with
> > terminating
> > > with a "#". So:
> > >
> > > exten => _X.#,1,....
> > >
> > > Does not work. Everything after the
"." is ignored and you are
> > forced to
> > > rely on the digit timeout for asterisk to
start doing anything. This
> > is
> > > exceptionally annoying in this case because
the timeouts are long
> > to
> > > allow people to enter a difficult number.
> >
> > That _may_ be considered a bug. I hadn't thought
of useing the #
> > terminater in the dialplan.
> >
> > Of course it could have been implemented in a
loop. loose idea below,
> > not sure it would work exactly as written.
> >
> > [isbn-input]
> > exten => s,1,Playback instructions.
> > exten => _X,1,do something to set/add this
collected digit into a
> > var.
> > exten => _X,2,Goto(isbn-input,noop)
> >
> > exten => noop,1,noop()
> >
> > exten => #,1,validate the number
> > exten => #,2,goto(somewhere else)
> >
> > Defiantely jumping through a little hoop, but
otherwise not bad. I
> > would
> > like to see the example you mentioned be able to
work though.
> >
>
> The problem with using # in a dialplan, is that many
SIP (and probably
> other) devices silently eat #. # is often the
"send the call with the
> previously dialed digits" button.
I could see that being a problem if you where trying to dial
all this at
the begining, but should sip eat any DTMF at all once the
call is
established? Would make many IVRs unhappy then.
--
Steven Critchfield <critch basesys.com>
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-30 20:04:35 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Lange wrote:
> On Wed, 2006-08-30 at 10:31 -0500, Steven Critchfield
wrote:
>>> Already the existing system has some
limitations; for example it can not
>>> match a variable number of digits. I had a
friend who was trying to
>>> implement an ISDN lookup for library books
(ISDNs are variable length)
>>> but had problems because of the limitations on
the matching.
>> I think you meant ISBN. And variable number of
digits is supported. You
>> just need to know how to determine when it is
shorter or longer and
>> write your dialplan as such.
>
> LOL, ya, ISBN. Apparently I've exceeded the maximum
acronym storage
> limit of my brain.
>
>> Think about it, in dialplans, most people have
short internal extensions
>> that can be dialed, and longer PSTN local and even
longer PSTN LD
>> numbers that can all be handled just fine.
>
> I'll ask for the specific example. I think it had to
do with terminating
> with a "#". So:
>
> exten => _X.#,1,....
>
> Does not work. Everything after the "." is
ignored and you are forced to
> rely on the digit timeout for asterisk to start doing
anything. This is
> exceptionally annoying in this case because the
timeouts are long to
> allow people to enter a difficult number.
Or even:
-= Info about application 'Read' =-
[Synopsis]
Read a variable
[Description]
Read(variable[|filename][|maxdigits][|option][|attempts][|ti
meout])
Reads a #-terminated string of digits a certain number of
times from the
user in to the given variable.
and the Goto app maybe?
- --
Cheers,
Matt Riddell
_______________________________________________
http://www.sineapps.
com/news.php (Daily Asterisk News - html)
http://freevoip.gedam
europe.com (Free Asterisk Voip Community)
http://www.sineap
ps.com/rssfeed.php (Daily Asterisk News - rss)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE9e9TS6d5vy0jeVcRAtcdAJ4kkkGTRxUxvPFrKmsrhBNlr/KkLQCg
hUfc
I9EVR6fgtShgGGdFVzFxXAw=
=ZsJD
-----END PGP SIGNATURE-----
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-31 14:38:10 |
On Wed, 2006-08-30 at 12:40 -0500, Jason Parker wrote:
> The problem with using # in a dialplan, is that many
SIP (and probably
> other) devices silently eat #. # is often the
"send the call with the
> previously dialed digits" button.
These are calls from the PSTN so that is not a factor.
--
John Lange
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-31 17:41:33 |
On Wed, 2006-08-30 at 11:58 -0500, Steven Critchfield wrote:
> > exten => _X.#,1,....
> >
> > Does not work. Everything after the
"." is ignored and you are forced to
> > rely on the digit timeout for asterisk to start
doing anything. This is
> > exceptionally annoying in this case because the
timeouts are long to
> > allow people to enter a difficult number.
>
> That _may_ be considered a bug. I hadn't thought of
useing the #
> terminater in the dialplan.
>
> I would
> like to see the example you mentioned be able to work
though.
The above example I gave turns out to be exactly what was
tried. Instead
an AGI script was used.
So basically all they want to do is capture a variable
length of digits
and use the "#" to indicate they are done
entering.
exten => _X.#,1,<action>
Is naturally what you would think would work but it
doesn't. In fact, it
does violate the pattern match because if you don't enter a
"#" at the
end and just let it time-out Asterisk still considers it a
match. Again,
it seems as though it just ignores everything after the
"."
I reserve the right to be wrong here because we really did
not do any
in-depth analysis of exactly what was going on. Once they
used an AGI to
solve it I didn't return to the issue.
The loop idea you suggested was one we hadn't thought of
and the
existing AGI works fine but both require many lines of
"code" to do what
really should be a single line.
--
John Lange
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| murf: trunk r41283 - /trunk/main/pbx.c |

|
2006-08-31 19:56:08 |
On Thursday 31 August 2006 12:41, John Lange wrote:
> exten => _X.#,1,<action>
>
> Is naturally what you would think would work but it
doesn't. In fact,
> it does violate the pattern match because if you don't
enter a "#" at
> the end and just let it time-out Asterisk still
considers it a match.
> Again, it seems as though it just ignores everything
after the "."
It actually does ignore everything after the period. A
period is
implemented as a short-circuit to a pattern match. Asterisk
does
not consider any character after the period when evaluating
a match.
--
Tilghman
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
[1-16]
|
|