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
begin:vcard
fn:David Sugar
n:Sugar;David
org:GNU Telephony
adr:;;;;;;USA
email;internet:[EMAIL PROTECTED]
x-mozilla-html:FALSE
url:http://www.gnutelephony.org
version:2.1
end:vcard
_______________________________________________
Bayonne-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bayonne-devel