Hello,

I realized that this new feature of DSM's mod_sys may be really interesting to SEMS users, so it may be worth an extra note here:

with the sys.popen function, one can execute an external process and get the result (stdout and result) into DSM variables. This way, it is even easier to implement some interaction with external data sources or programs on the system, or script something in your favourite language.

One should keep in mind, though, that a popen incurs quite some overhead (many system calls etc), so from a performance pov, it may be advisable to just add some action or condition in a small module (which is done easily thanks to all the macro trickery), to be executed in the same process.

mod_sys doc:
http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sems;a=blob;f=doc/dsm/mods/Readme.mod_sys.txt
example:
http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sems;a=blob;f=doc/dsm/examples/test_popen.dsm

Best Regards
Stefan


--
Stefan Sayer
VoIP Services Consulting and Development

Warschauer Str. 24
10243 Berlin

tel:+491621366449
sip:[email protected]
email/xmpp:[email protected]


_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

Reply via email to