diff --git a/apps/app_milliwatt.c b/apps/app_milliwatt.c index 64513fe899..1ca66217ab 100644 --- a/apps/app_milliwatt.c +++ b/apps/app_milliwatt.c @@ -40,19 +40,29 @@ /*** DOCUMENTATION - Generate a Constant 1004Hz tone at 0dbm (mu-law). + Generates a 1004 Hz test tone at 0dbm (mu-law). + - Previous versions of this application generated the tone at 1000Hz. If for + Generates a 1004 Hz test tone. + By default, this application does not provide a Milliwatt test tone. It simply + plays a 1004 Hz tone, which is not suitable for performing a milliwatt test. + The m option should be used so that a real Milliwatt test tone + is provided. This will include a 1 second silent interval every 10 seconds. + Previous versions of this application generated a constant tone at 1000 Hz. If for some reason you would prefer that behavior, supply the o option to get the old behavior. @@ -155,8 +165,11 @@ static int milliwatt_exec(struct ast_channel *chan, const char *data) if (!ast_strlen_zero(options) && strchr(options, 'o')) { return old_milliwatt_exec(chan); } - - res = ast_playtones_start(chan, 23255, "1004/1000", 0); + if (!ast_strlen_zero(options) && strchr(options, 'm')) { + res = ast_playtones_start(chan, 23255, "1004/9000,0/1000", 0); + } else { + res = ast_playtones_start(chan, 23255, "1004/1000", 0); + } while (!res) { res = ast_safe_sleep(chan, 10000); diff --git a/doc/CHANGES-staging/app_milliwatt.txt b/doc/CHANGES-staging/app_milliwatt.txt new file mode 100644 index 0000000000..434ace22bb --- /dev/null +++ b/doc/CHANGES-staging/app_milliwatt.txt @@ -0,0 +1,11 @@ +Subject: app_milliwatt + +The Milliwatt application's existing behavior is +incorrect in that it plays a constant tone, which +is not how digital milliwatt test lines actually +work. + +An option is added so that a proper milliwatt test +tone can be provided, including a 1 second silent +interval every 10 seconds. However, for compatability +reasons, the default behavior remains unchanged.