Еmail notification when a asterisk has a problem

Hi friends,
I want to ask how I can do Asterisk send me an email when it’s stopped and when someone tries to log in unsuccessfully?

I loaded the directory

and changed the email settings
CLIARGS="$*" # Grab any args passed to safe_asterisk
TTY=9 # TTY (if you want one) for Asterisk to run on
CONSOLE=yes # Whether or not you want a console
NOTIFY=ben@mydomain # Email address for crash notifications


but I do not receive the email, the server has a mail server installed and receives and sends emails.

OS my server : Debian 9

Thanks in advance for your help

safe_asterisk is actually third part code that is bundled with Asterisk. It’s a shell script, so you can see exactly how it works. for NOTIFY.

If you want emails on security events, you need to scrape the relevant log files with your own scripts or programs.

So you have to write your own script?

I used AMI events and PHP or Python for notification unde certain events, also fail2ban can send you emails

Thanks for the reply. i want to ask if there can be any sample code, for example fail2ban

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.