[SR-Users] Exec - call python script with arguments

Daniel W. Graham dan at cmsinter.net
Sun Dec 10 20:04:14 CET 2017


Trying to call a python script using exec_msg and haven't had any luck.

The following works:
exec_msg("echo 'TEST' > /usr/local/etc/kamailio/test.txt");

The following works from shell:
/usr/local/etc/kamailio/script.py arg1 arg2 arg3

The following does not work from kamailio:
exec_msg("/usr/local/etc/kamailio/script.py arg1 arg2 arg3");

(The arguments are just strings for test purposes)

Kamailio is running as kamailio user

Permissions:
755 script.py

Any idea what could be going wrong?

-dan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20171210/fac5b311/attachment.html>


More information about the sr-users mailing list