bayonne-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bayonne-devel] input processing issues


From: David Sugar
Subject: Re: [Bayonne-devel] input processing issues
Date: Thu, 08 Sep 2005 11:32:12 -0400
User-agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711)

I should add "input" normally deals with "line oriented" input; that is, something that expects to have some kind of in effect "newline" character at the end. The default is "#". Collect can also use a exit or terminating character, but in the case of collect, it is part of the input returned, and when a digit count is fixed, it returns after the full count is collected.

David Sugar wrote:
I think "collect" is what you would normally use for this case. Read generally deals with parsing dtmf digits that have already been buffered. You could either use collect in front of read, as in:

    collect count=8
    read %myvar count=8 format="????????"

Or possibly do it in collect itself:

    collect %myvar count=8 format="????????"

Although you do not need the format= for this, either, since you are not transforming the data being read. Format is normally used for things like parsing a date field:

????/??/??

Hence, if the user enters 20050109 the %var will then hold "2005/01/09"...but to just fill a var with digits, format is redundent and unneeded.


Alexandre BOULANGER wrote:

Hi,

I have a working IVR application based on Bayonne2 (0.8.8) with SIP
support. Nice work, congratulations

One annoying thing in my script is input processing. I have a
    string.8 %tel_dtmf
        input %tel_dtmf count=8 format="????????"

statement that retrieves a 8 numbers value; after the 8e value has been
entered, there's a 3-4s blank time before the script continues.
If I use # as a terminating digit, there's no blank, but I don't want to
use such a digit.

I tried
    string.8 %tel_dtmf
    read  %tel_dtmf count=8 format="????????"
    slog "your input: %tel_dtmf"

but read() does not seem to get any input

---- snip ----
sip/0: state=play, event=400, seq=12   <--- my prompt ends
sip/0: state=run, event=100, seq=12
sip/0: state=sleep, event=100, seq=12
sip/0: state=sleep, event=708, seq=13
sip/0: state=run, event=100, seq=13
sip/0: state=read, event=100, seq=13    <-- read begins
sip/0: state=read, event=400, seq=17
sip/0: state=run, event=100, seq=17
sip/0: your input: sip/0: state=wait, event=100, seq=17    <-- :(
---- snip ----


I had a quick look at the source code but I didn't manage to get what's
wrong. Is this a DTMF in/out band issue or a coding one? I know read()
differs from input() by the terminating digit abstraction, that's what I
want to use.

And, by the way, what does 'interdigits' refer to?


TIA

_______________________________________________
Bayonne-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bayonne-devel

Attachment: dyfet.vcf
Description: Vcard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]