app_waitforsilence: Cleanup & don't treat missing frames as 'noise'
authorSean Bright <sean.bright@gmail.com>
Wed, 6 Sep 2017 15:50:53 +0000 (11:50 -0400)
committerSean Bright <sean.bright@gmail.com>
Wed, 6 Sep 2017 21:16:19 +0000 (16:16 -0500)
commit2b3f903e6f239781a3e0a449a77744d0045a1e74
tree905d389c96a1bfb6236c97c7f25c770d257fcab5
parent2857a3334aa430b81baac31bdfe0efb3871f37d4
app_waitforsilence: Cleanup & don't treat missing frames as 'noise'

* WaitForSilence completes successfully if it receives no media in the
  specified timeout, but when acting as WaitForNoise that logic needs
  to be reversed.

* Use standard argument parsing macros and add some error checking for
  invalid values.

* The documentation indicated that the first argument to both
  WaitForSilence and WaitForNoise was required when it was not. Update
  the documentation to reflect that.

* Wrap up some behavior in structs to avoid boolean checks all over the
  place.

ASTERISK-24066 #close
Reported by: M vd S

Change-Id: I01d40adc5b63342bb5018a1bea2081a0aa191ef9
apps/app_waitforsilence.c