[SR-Users] Exec - call python script with arguments
Daniel W. Graham
dan at cmsinter.net
Sun Dec 10 22:22:31 CET 2017
I don’t get any errors that’s part of my issue. No errors and the script doesn’t appear to run (script writes to a log file, and no output seen).
From: sr-users [mailto:sr-users-bounces at lists.kamailio.org] On Behalf Of Joel Serrano
Sent: Sunday, December 10, 2017 3:55 PM
To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] Exec - call python script with arguments
What error do you see in the logs?
On Sun, Dec 10, 2017 at 11:04 Daniel W. Graham <dan at cmsinter.net<mailto:dan at cmsinter.net>> wrote:
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
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20171210/9ed27feb/attachment.html>
More information about the sr-users
mailing list