Try calling on_blank manually when liquidsoap starts. It may be that the
function callback is working but the mail command isn't in your path.
M
On Jun 8, 2013 4:20 PM, "Andy Brown" <[email protected]> wrote:
> Thanks guys,
>
> I think I'm doing something wrong though as its not doing anything for
> me. My code snippet looks like this:
>
> def blank_alert()
> system("echo -e '\nSilence or stream detect failures notification\n\n'
> | mail -s 'Silence - arctic' [email protected]
> end
>
> live1 = strip_blank(
> on_blank(blank_alert,input.harbor(id="live", port=8005,
> password="pass",
> buffer=4.,max=40.,"stream.mp3")),
> max_blank=20., threshold=-50.)
>
> to_live1 = to_live(security)
>
> full = fallback(track_sensitive=false,
> transitions=[to_live1, to_file],
> [live1, radio])
>
>
> Is that the right place to put it in? As i dropped the stream source for
> a few seconds and just saw the usual logs, no email alert.
>
> Any ideas?
>
>
> On 07/06/13 17:51, Martin Konečný wrote:
> > The documentation Gilou mentioned is here:
> >
> > http://savonet.sourceforge.net/doc-svn/blank.html
> >
> > Note that this will fire even if the harbor source is connected and
> starts
> > streaming silence.
> >
> >
> > On Fri, Jun 7, 2013 at 12:23 PM, Gilou <[email protected]> wrote:
> >
> >> Le 07/06/2013 14:48, Andy Brown a écrit :
> >>> Hi all,
> >>>
> >>> I'm after a couple of pointers. What I'm wanting to achieve is to
> detect
> >>> when a harbor source is lost. I run a few internet streams for various
> >>> radio stations and have fallback systems in place, but want to be
> >>> notified or specify notification emails for them.
> >>>
> >>> I'm looking around line 165 of sources/harbor_input.ml at the:
> >>> self#log#f 2 "Feeding stopped: %s." (Utils.error_message e) ;
> >>>
> >>> As I think this would be the correct trigger point, but I don't know
> >>> anything about OCaml so trying to work out the best way of implementing
> >>> this.
> >>>
> >>> Can anyone offer any pointers?--
> >>
> >> Hi,
> >>
> >> Yes, you can use the on_blank on your source to generate an alert like
> >> that:
> >> function blank_alert()
> >> system("whatever shell command you want to be executed on
> blank")
> >> end
> >>
> >> onblank(blank_alert, length=XX., your_source)
> >>
> >> I usually use that with the on_noise parameter as well, to call a script
> >> that mails or do whatever needs to be done externally..
> >>
> >> Good luck ;)
>
>
>
>
> --
> Andy
> e: andy @ thebmwz3.co.uk
> e: andy @ broadcast-tech.co.uk
> w: http://www.thebmwz3.co.uk
> w: http://www.broadcast-tech.co.uk
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users