Send Email when Sip ext unregisters

I want to know when a sip handset goes off-line in the pbx and have asterisk send an email stating the fact…
Is it possible?
I know that I can generate an email when a certain pattern of digits is dialed but is the above feasible?

Create a bash script that runs asterisk -rx"sip show peers" | grep unregistered and sends you an email. Then put it in a cronjob every five minutes and you are ready.

1 Like

So its possible,that’s brilliant thank you very much.I am not au faux with the tools you mentioned but I love trying out new stuff so I will have a bash at it ,excuse the pun!

1 Like

I chuckled a little, good one! :smiley:

1 Like

Personally I use an external logging service, I send my syslog output to them and then setup triggers there that email me when conditions are met.

Look at Splunk, Papertrail, and Loggly if you are willing to outsource this.

1 Like

Cheers folksI just want to know its possible for the moment see if the boss gives the go ahead,probably wont have access to internet.I will send the email to another device that converts it to paging and alert the responsible person that way.