Skip to main content

mod_dptools: sched broadcast



0. About

Schedule a broadcast in the future.

When a scheduled broadcast is executed, the session variable last_sched_id is set to the task ID of the broadcast.

TODO See TODOs in mod_dptools: sched transfer.

1. Syntax

In the dialplan

<action application="sched_broadcast" data="[+]<time> [<dialplan_app>::]<path> <call_leg>" />

This syntax is also valid as of commit 116ebc0:

In the dialplan

<action application="sched_broadcast" data="@<time> <uuid> [<dialplan_app>::]<path> <call_leg> " />

As an API call

 sched_broadcast [[+]<time> | @<time>] <uuid> [<dialplan_app>::]<path> <call_leg>

TODO Added the [<dialplan_app>::] part to the syntax based on the examples in section 2. but didn't check whether it works.

ParameterDescriptionExamples
[+]<time>Time in seconds.If used with + then the call will be hung up after that number of seconds.If used without + then the given value is considered the number of seconds since the epoch, 1970-01-01 00:00:00 UTC+60 (hang up after 1 minute)2003336820 (hang up at Jun 25 2033 11:27 AM)
@<time>Schedule a broadcast for every <time> seconds for the duration of a call.See Jira issue FS-5661 or 2. Examples section below.@60
<uuid>The unique identifier (UUID) of the call leg. See Channel Variables.f2120667-3cd6-42bc-8be6-8cf4207cf6bc
<path>Specify the path of the audio file to broadcast./tmp/main.wav
<call_leg>Specify the call leg to broadcast on.Valid value arealegblegbothbleg might mean "other leg" even if the leg this is set on (e.g., via an export) really is the B leg.aleg

2. Examples

2.1 Play audio in a channel to all participants after 1 hour

<action application="sched_broadcast" data="+3600 /tmp/howdy.wav both"/> 

This one with "playback" may help if the above does not work.

<action application="sched_broadcast" data="+3600 playback::/tmp/howdy.wav both"/> 

2.2 Play audible "beep" every N seconds

Quoting Jira issue FS-5661:

One example for usage is jurisdictions that require an audible "beep" every N seconds while a call is being recorded.

<action application="sched_broadcast" data="@60 /tmp/call_recorded.wav both"/>

3. See Also