[SR-Users] system call

Daniel-Constantin Mierla miconda at gmail.com
Thu Jun 28 09:12:25 CEST 2012


Hello,

On 6/28/12 8:34 AM, Kelvin Chua wrote:
> hi guys,
>
> i'm currently using cron to alert the admin via email of any 
> irregularities (e.g. pike) but i'm wondering, is it possible to do a 
> system call from the cfg script?
there is no email function exported by native kamailio modules. You can 
use some embedded language to do it, like Lua (see app_lua module), or 
perl, python, C#... Executed an embedded script is better that using the 
alternative of running a script/application via exec module, which can 
be an alternative.

Because sending an email can take time, I would suggest you do it from a 
dedicated process, like using a combination of mqueue - rtimer modules 
-- add the allert message to a message queue, consume it from a rtimer 
process to send the email message.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw




More information about the sr-users mailing list