[App_rpt-users] Execute Schedule Only If Certain Conditions are Met

Brett Friermood brett.friermood at gmail.com
Tue Jan 7 02:40:22 UTC 2014


I haven't gotten a chance to delve into just how much info is
available through the Asterisk command line, but that's the way I
would go. Use either cron or the scheduler to call an external script
which accesses the command line and views the variables, then calls
whatever commands or macros. And once you have a script running
externally you can really do some interesting stuff as you observed
because it is completely external to the asterisk processes.

That's the beauty of linux being the underlying OS and a glimpse at
how it can be so powerful yet still stay flexible. Everything can be
broken down to simple scripts. Even very complex operations, such as
the linux boot process, can just be a sequence of scripts written to
do only a single small task and then call the next.

Brett KQ9N

On Mon, Jan 6, 2014 at 5:22 PM, Tony Olivero <anthony at olivero.us> wrote:
> Hi all:
>
> As I've been playing with a node I finally got set up running on a
> Sheevaplug I was wondering if it's possible to schedule events, but
> only have them fire if conditions are met?
>
> I can think of a few ways to use this, but a quick example: schedule
> an hourly time announcement followed by a recorded announcement file
> about the club meeting that night, but do not allow it to play if
> RPT_TXKEYED. In other words, we don't want the announcement to play
> over someone talking, whether they be on a link or a local receiver. I
> can see how to check variables in the event management system, but I
> don't quite know how, or if, variables can be tied into the scheduler.
>
> The best option I can see for conditional events would be to go
> outside app_rpt and use cron and asterisk -rx. Using a shell script it
> might be possible to read in the node channel vars and fire off the
> desired macro through a cli command. This might also allow you to
> periodically check to see if the node is still in transmit, say every
> 15 seconds for 15 minutes, and if the node goes quiet play the
> announcement. If it never does, just forget about it for that hour.
>
> This is maybe a simplistic example, but I'm trying to learn the
> intricacies of app_rpt with the simple stuff :).
>
> Thanks for any pointers.
>
> 73,
> Tony AD9O
> _______________________________________________
> App_rpt-users mailing list
> App_rpt-users at ohnosec.org
> http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users



More information about the App_rpt-users mailing list