bridge_builtin_features: add beep via touch variable

Add periodic beep option to one-touch recording by setting
the touch variable TOUCH_MONITOR_BEEP or
TOUCH_MIXMONITOR_BEEP to the desired interval in seconds.

If the interval is less than 5 seconds, a minimum of 5
seconds will be imposed.  If the interval is set to an
invalid value, it will default to 15 seconds.

A new test event PERIODIC_HOOK_ENABLED was added to the
func_periodic_hook hook_on function to indicate when
a hook is started.  This is so we can test that the touch
variable starts the hook as expected.

ASTERISK-30446

Change-Id: I800e494a789ba7a930bbdcd717e89d86040d6661
This commit is contained in:
Mike Bradeen
2023-03-01 15:39:15 -07:00
parent 1a649af1b1
commit 450345386f
4 changed files with 83 additions and 13 deletions

View File

@@ -198,16 +198,27 @@
channel variable or <literal>auto</literal> if the variable is not set. The timestamp
is a UNIX timestamp. The filename is either the value of the <replaceable>TOUCH_MONITOR</replaceable>
channel variable or the callerID of the channels if the variable is not set.</para>
<para>To play a periodic beep while this call is being recorded, set the
<replaceable>TOUCH_MONITOR_BEEP</replaceable> to the interval in seconds. The interval will default
to 15 seconds if invalid. The minimum interval is 5 seconds.</para>
</description>
</configOption>
<configOption name="automixmon">
<synopsis>DTMF sequence to start or stop mixmonitoring a call </synopsis>
<description>
<para>Operation of the automixmon is similar to the <literal> automon </literal>
feature, with the following exceptions:
<replaceable>TOUCH_MIXMONITOR</replaceable> is used in place of <replaceable>TOUCH_MONITOR</replaceable>
<replaceable>TOUCH_MIXMONITOR_FORMAT</replaceable> is used in place of <replaceable>TOUCH_MIXMONITOR</replaceable>
There is no equivalent for <replaceable>TOUCH_MONITOR_PREFIX</replaceable>. <literal>"auto"</literal> is always how the filename begins.</para>
<para>This will cause the channel that pressed the DTMF sequence
to be monitored by the <literal>MixMonitor</literal> application. The
format for the recording is determined by the <replaceable>TOUCH_MIXMONITOR_FORMAT</replaceable>
channel variable. If this variable is not specified, then <literal>wav</literal> is the
default. The filename is constructed in the following manner:</para>
<para> prefix-timestamp-suffix.fmt</para>
<para>where prefix is either the value of the <replaceable>TOUCH_MIXMONITOR_PREFIX</replaceable>
channel variable or <literal>auto</literal> if the variable is not set. The timestamp
is a UNIX timestamp. The suffix is either the value of the <replaceable>TOUCH_MIXMONITOR</replaceable>
channel variable or the callerID of the channels if the variable is not set.</para>
<para>To play a periodic beep while this call is being recorded, set the
<replaceable>TOUCH_MIXMONITOR_BEEP</replaceable> to the interval in seconds. The interval will default
to 15 seconds if invalid. The minimum interval is 5 seconds.</para>
</description>
<see-also><ref type="configOption">automon</ref></see-also>
</configOption>