mirror of
https://github.com/D-Modem/speaking-clock.git
synced 2026-11-28 12:38:05 -08:00
app_speakingclock adds SpeakingClock(), which places each announcement by sample against the system clock, so the time mark (the third pip) lands on the second it announces, as on the real machines. Voices are folders of 8 kHz WAV clips with a voice.conf; the module supports TIM-style (phrase, hour, minute, seconds, pips), talking-clock, chime and hourly voices. voices/ holds the asterisk-tim pair (Pat Simmons, Gordon Gow), garrysblog's Amy and Celine, and the Steve's Talking Clock library, converted by tools/build_voices.py from what tools/fetch-sources.sh downloads. The recordings belong to their original owners (NOTICE.md); the code is GPL-2.0-or-later. freepbx/speakingclock is a FreePBX module: clocks as destinations, with optional numbers to dial, and speakingclock.conf from its settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRVXG9MBYPxmcs9cFxs
26 lines
627 B
PHP
26 lines
627 B
PHP
<?php
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
// Copyright (C) 2026 D-Modem Authors
|
|
//
|
|
// functions.inc.php - FreePBX's destination hooks, found by the module's
|
|
// name: each clock is a destination of inbound routes, IVRs and the like.
|
|
|
|
if (!defined('FREEPBX_IS_AUTH')) {
|
|
die('No direct script access allowed');
|
|
}
|
|
|
|
function speakingclock_destinations()
|
|
{
|
|
return \FreePBX::Speakingclock()->destinations();
|
|
}
|
|
|
|
function speakingclock_getdest($exten)
|
|
{
|
|
return [\FreePBX\modules\Speakingclock::destination($exten)];
|
|
}
|
|
|
|
function speakingclock_getdestinfo($dest)
|
|
{
|
|
return \FreePBX::Speakingclock()->destinationInfo($dest);
|
|
}
|