[asterisk-dev] Re: ast_waitstream behaviour

ast guy astguy at gmail.com
Thu Apr 27 06:34:03 MST 2006


On 4/27/06, Tony Mountifield <tony at softins.clara.co.uk> wrote:
> In article <c28c863a0604270239n4e40a18heb0982f158e5b05 at mail.gmail.com>,
> ast guy <astguy at gmail.com> wrote:
> >    if (retry >= 1)
> >             {
> >               res = ast_streamfile (chan, prompt_error, chan->language);
> >               if (!res)
> >                 res = ast_waitstream (chan, "");
> >             }
> >
> >           res = _code_prompt (chan, &code_digits);
> >
> > According to flow  after playing prompt_error file it should go to
> > _code_prompt function and execute ast_app_getdata function.
> >
> >  But It plays prompt_error and then waites for some TIMEOUT value and
> > then goes to __code_prompt, Is there any value that I can set that
> > after file has been played ( don't want any DTMF from ast_stream) it
> > goes according to flow.
>
> ast_streamfile() just starts the file playing and immediately returns.
> While the file is playing, you are sitting inside ast_waitstream().
> ast_waitstream() should return as soon as the file being streamed has
> finished.
>
> I can think of two things to check:
>
> 1. Does the file being played as prompt_error have some silence at the end?
>
> 2. Could it be that _code_prompt() is actually being called as soon as the
>    error prompt ends, but that there is something in _code_prompt() itself
>    that is causing a delay?
>
> Cheers
> Tony
> --

Yes the problem was about silence, file i was playing had silence at
end, replaced with another file with no silence and it worked.
Thanks for the help!

regards,
-ag



More information about the asterisk-dev mailing list