[asterisk-dev] Re: [svn-commits] murf: trunk r41283 - /trunk/main/pbx.c

Steven Critchfield critch at basesys.com
Wed Aug 30 09:58:11 MST 2006


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 at basesys.com>




More information about the asterisk-dev mailing list