[asterisk-bugs] [JIRA] (ASTERISK-24006) app_waitforsilence logic error when used as WaitForNoise

M vd S (JIRA) noreply at issues.asterisk.org
Fri Jul 11 16:29:56 CDT 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=220483#comment-220483 ] 

M vd S edited comment on ASTERISK-24006 at 7/11/14 4:28 PM:
------------------------------------------------------------

Yes, I just checked out, compiled and ran Asterisk SVN-branch-1.8-r418261M, to observe the exact same behavior.

I also found strange bugs calling Record() without the starting beep and before outputting audio, which seems to boil down to the same issue, that no frames are received and ast_waitfor() gives unexpected results (in my case a lockup, as it waits indefinitely for silence to end the recording). Also fixed by outputting 1 ms of silence, so no major problem.

[ps. updated description to add the Record() issue]


was (Author: mvds):
Yes, I just checked out, compiled and ran Asterisk SVN-branch-1.8-r418261M, to observe the exact same behavior.

I also found strange bugs calling Record() without the starting beep and before outputting audio, which seems to boil down to the same issue, that no frames are received and ast_waitfor() gives unexpected results (in my case a lockup, as it waits indefinitely for silence to end the recording). Also fixed by outputting 1 ms of silence, so no major problem.

> app_waitforsilence logic error when used as WaitForNoise
> --------------------------------------------------------
>
>                 Key: ASTERISK-24006
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24006
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_waitforsilence
>    Affects Versions: 1.8.13.1, 1.8.29.0
>         Environment: N/A (but observed on Debian 7.5)
>            Reporter: M vd S
>            Assignee: M vd S
>            Severity: Trivial
>
> Actually 2 connected issues:
> 1) In do_waiting(), a condition in which no frames are received is treated as if it would trigger the dsp function. This is okay if the dsp tries to find silence, but if the dsp needs noise, you get the odd result that a muted channel is seen as noise.
> 2a) For some reason, when calling outbound using SIP, and invoking WaitForNoise() almost immediately (as to wait for the called party to start talking), no frames are received, nor is any audio recorded by the Monitor, while WaitForNoise() is running.
> [update 20140711]
> 2b) When calling outbound using SIP, and invoking Record(), a zero-sized file is created but no sound is recorded to it. Also, when invoked in such a way that it should end on silence, it hangs in Record() indefinitely. (to be precise, on "ms = ast_waitfor(chan, ms);" which is called with ms==-1)
> Issue 1 is resolved by changing this line:
>    dsptime = timereqd;
> to 
>    if ( wait_for_silence ) dsptime = timereqd; 
> Issue 2 is worked around by simply playing a short (1 ms) silent audio file before doing anything else.
> I personally don't need to have this fixed, but it might save other users a few hours of searching, since the combined effect of these issues is quite obscure.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list