Time o'clock Announcement

Can the time-of-day announcement be modified? Some in our group feel that " o’clock " is old fashioned!

yes it can be modified. I can send you a script that you can run either from your crontab every hr or from your rpt.conf file using the normal time commands that will change it and you will not hear the O’clock in it.
please feel free to email me at bradn8pc at gmail.com

Thanks! I’ll give it a try. Send to: lengriff@gmail.com

Others might like to know how you’ve done that. You could post your solution here. That’s sort of point of a community forum :slight_smile:

In your crontab file, use saytime24.pl instead of saytime.pl, e.g.:
0 0-23 * * * (source /usr/local/etc/allstar.env ; /usr/bin/nice -19 /usr/bin/perl /usr/local/sbin/saytime24.pl $NODE1 > /dev/null)

That looks like a HamVoIP only solution.

I’m not quite sure why anyone would go out on a limb to write a python program
to do what asterisk will do naturally.

So here is an example framework.

Write a extension in your extensions.conf in a specific unique context to limit later exten conflicts,
then, call the asterisk function SayUnixTime() with the options you desire,

[time-playback]
exten => 900,1,SayUnixTime(utime,format)
exten => 900,n,Hangup

The options I did not present are well documented in asterisk.
But goes to the heart of the type of playback you want. Very customizable to what exactly you desire.
Local 12hr to 24hr utc and beyond.
You do have to know that this is dependent on your system clock and timezone settings.

Then your executing command from rpt.conf only needs to be a autopatch call to the context and extension of that, but a quite dial so no dialtone etc.

89xx=autopatchup,context=time-playback,noct=1,farenddisconnect=1,dialtime=250,quiet=1,exten=900

From there you can call the 89xx command you created from the macro/sched

Using this method, there is nothing much that asterisk can do that can not be preformed in app_rpt,
which has it’s own purposeful limitations. So, this is a work around to those limitations.

But there it is in 3 lines of dialplan.

1 Like

saytime and say24 time is hamvoip and it will say the same time just the hrs are different. on ASL it is not the same as they do not run the same scripts. Also in those you can specify a zip code and get local weather.

I would have to share at least 4 files for it to all work with time and weather announcement on here.