|
40 | 40 | /*** DOCUMENTATION
|
41 | 41 | <application name="Milliwatt" language="en_US">
|
42 | 42 | <synopsis>
|
43 |
| - Generate a Constant 1004Hz tone at 0dbm (mu-law). |
| 43 | + Generates a 1004 Hz test tone at 0dbm (mu-law). |
44 | 44 | </synopsis>
|
45 | 45 | <syntax>
|
46 | 46 | <parameter name="options">
|
47 | 47 | <optionlist>
|
| 48 | + <option name="m"> |
| 49 | + <para>Generate a 1004 Hz Milliwatt test tone at 0dbm, with a |
| 50 | + 1 second silent interval. This option must be specified |
| 51 | + if you are using this for a milliwatt test line.</para> |
| 52 | + </option> |
48 | 53 | <option name="o">
|
49 |
| - <para>Generate the tone at 1000Hz like previous version.</para> |
| 54 | + <para>Generate a constant tone at 1000 Hz like previous version.</para> |
50 | 55 | </option>
|
51 | 56 | </optionlist>
|
52 | 57 | </parameter>
|
53 | 58 | </syntax>
|
54 | 59 | <description>
|
55 |
| - <para>Previous versions of this application generated the tone at 1000Hz. If for |
| 60 | + <para>Generates a 1004 Hz test tone.</para> |
| 61 | + <para>By default, this application does not provide a Milliwatt test tone. It simply |
| 62 | + plays a 1004 Hz tone, which is not suitable for performing a milliwatt test. |
| 63 | + The <literal>m</literal> option should be used so that a real Milliwatt test tone |
| 64 | + is provided. This will include a 1 second silent interval every 10 seconds.</para> |
| 65 | + <para>Previous versions of this application generated a constant tone at 1000 Hz. If for |
56 | 66 | some reason you would prefer that behavior, supply the <literal>o</literal> option to get the
|
57 | 67 | old behavior.</para>
|
58 | 68 | </description>
|
@@ -155,8 +165,11 @@ static int milliwatt_exec(struct ast_channel *chan, const char *data)
|
155 | 165 | if (!ast_strlen_zero(options) && strchr(options, 'o')) {
|
156 | 166 | return old_milliwatt_exec(chan);
|
157 | 167 | }
|
158 |
| - |
159 |
| - res = ast_playtones_start(chan, 23255, "1004/1000", 0); |
| 168 | + if (!ast_strlen_zero(options) && strchr(options, 'm')) { |
| 169 | + res = ast_playtones_start(chan, 23255, "1004/9000,0/1000", 0); |
| 170 | + } else { |
| 171 | + res = ast_playtones_start(chan, 23255, "1004/1000", 0); |
| 172 | + } |
160 | 173 |
|
161 | 174 | while (!res) {
|
162 | 175 | res = ast_safe_sleep(chan, 10000);
|
|
0 commit comments