On Tuesday 20 February 2007 23:03, Mikael Bjerkeland wrote:
> tir, 20,.02.2007 kl. 12.03 -0800, skrev Beau Hargis:
> > When moving from Asterisk to OpenPBX, I found one problem that prevents
> > it from working. When using the Read() app, the maxdigits argument fails
> > to work. '#' must be hit no matter the options set. The console reports
> > this:
> >
> > -- Executing Wait("SIP/5061-0808c5b0", "1") in new stack
> > -- Executing Read("SIP/5061-0808c5b0", "VAR|promptx|1") in new stack
> > -- Accepting a maximum of 1 digits.
> > -- Playing 'promptx' (language 'en')
> > -- User entered '1'
> >
> > It will only accept the digits entered when I press '#', and it wont do
> > anything until it times out. Because I specified '1' as maxdigits, it
> > should stop the playback and return upon any digit entry. The same thing
> > has been working on asterisk for about a year. The read_exec() functions
> > are the same in openpbx and asterisk. I did notice, however, that there
> > were differences between the [ast|opbx]_app_getdata() functions. The
> > asterisk code is thus:
> >
> > int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int
> > maxlen, int timeout)
> > {
> > int res,to,fto;
> > /* XXX Merge with full version? XXX */
> > if (maxlen)
> > s[0] = '\0';
> > if (prompt) {
> > res = ast_streamfile(c, prompt, c->language);
> > if (res < 0)
> > return res;
> > }
> > fto = c->pbx ? c->pbx->rtimeout * 1000 : 6000;
> > to = c->pbx ? c->pbx->dtimeout * 1000 : 2000;
> >
> > if (timeout > 0)
> > fto = to = timeout;
> > if (timeout < 0)
> > fto = to = 1000000000;
> > res = ast_readstring(c, s, maxlen, to, fto, "#");
> > return res;
> > }
> >
>
> Hi Beau,
>
> did you try recompiling OpenPBX.org with the code you just posted?
>
> If you could try this, confirm that it works and send me a patch file, I
> will make sure this is fixed.
>
>
>
> Mikael
After copying the code for ast_app_getdata() from app.c right out of asterisk
1.2.14 into opbx and replacing opbx_app_getdata() and making the appropriate
prefix changes, it works as it is supposed to, so something is not correct in
the opbx code.
_______________________________________________
Openpbx-dev mailing list
[email protected]
http://lists.openpbx.org/mailman/listinfo/openpbx-dev