[SR-Users] Email alert

Daniel-Constantin Mierla miconda at gmail.com
Thu Nov 7 10:27:00 CET 2013


Hello,


On 11/7/13 1:17 AM, Oriol Capsada wrote:
> Hi Phillip,
>
> On 06/11/2013, at 22:29, phillman25 <phillman25 at gmail.com> wrote:
>
>> Hi
>>
>> I was wondering which module i could use to configure an email alert upon an event in kamailio.cfg file
>>
>> i.e. if ......
>> then send to email address xxxx
>>
>> any ideas?
>>
> There's no module to do so, but as an alternative you could print a log message and use some monitoring program (ex. monit or fail2ban) to check the log file and send the alert if your message is found.
you can also use exec module to run an external application such as 
'mail' - I used it in the past. Now I would use Lua via app_lua (or 
other embedded languages) to send emails (for example, I use them for 
doing custom http requests).

Might be a good idea to do it via mqueue + rtimer combination, so you 
don't block the sip worker -- if you search on the web, you should find 
some presentation that shows async notifications to twitter.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Trainings - Berlin, Nov 25-28
   - more details about Kamailio trainings at http://www.asipto.com -




More information about the sr-users mailing list