Email notification of trunk status?

Discussion in 'General' started by joshua, Sep 24, 2009.

  1. joshua

    Joined:
    Jan 21, 2009
    Messages:
    11
    Likes Received:
    0
    G'day,
    is it possible to setup an email notification when there is a change of trunk status, ie trunk rejected or changes like that?

    If I setup a failover trunk and the first goes down, I'll be oblivious to the fact and would like some notification.

    Thanks!
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    You might have noticed that each trunk has an entry to "monitor trunk failures", you need to write a script to do whatever you want, which will be called when the trunk fails, that could easily include something to email you or even turn on your coffee machine. :)

    ok I'll be serious (semi)

    Code:
    #!/bin/bash
    echo "You're screwed, The cheap trunk you bought from XYZ.au is broke"|mail -s "you have a problem" joshua@tree.au
    
    
    (stick it in /var/lib/asterisk/bin, chown it to asterisk and make it executable with chmod +x <the script> )
     
  3. joshua

    Joined:
    Jan 21, 2009
    Messages:
    11
    Likes Received:
    0
    That's excellent, thanks. Love your cheek by the way ;)
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    :) :) Which one? I have 4.
     

Share This Page