Hi!


I suggest moving the script out of the "/root"-folder into a folder that you know Kamailio is able to access (unless you run Kamailio as root), and then make sure the file is executable by Kamailio, i.e. "mv /root/test.pl /var/tmp && chmod 755 /var/tmp/test.pl".


For example I'm running this in my config, which works fine to get the parameters:

exec_msg("/usr/src/script.sh '$tU' '$ci'");


Best,

/Tobias



From: sr-users <sr-users-bounces@lists.sip-router.org> on behalf of Venkatesh Macha <linuxvenkey@gmail.com>
Sent: Wednesday, January 25, 2017 11:41 AM
To: sr-users@lists.sip-router.org
Subject: [SR-Users] Executing perl script with command line parameters.
 
Hi all,

   I am trying to execute external Perl script from the Kamailio config
file. My script accepts few command line parameters but if I try to pass
command line parameters like below, It is not working.

exec_msg("/root/test.pl 10000 '$var(env)' '$fU'");  # i tried with exec_avp
also

How to execute the external Perl scripts with few arguments.

Thank you in Advance.



--
View this message in context: http://sip-router.1086192.n5.nabble.com/Executing-perl-script-with-command-line-parameters-tp155359.html
sip-router.1086192.n5.nabble.com
Executing perl script with command line parameters. Hi all, I am trying to execute external Perl script from the Kamailio config file. My script accepts few command line parameters but if I try...


Sent from the Users mailing list archive at Nabble.com.

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
lists.sip-router.org
SIP Router Users Mailing list - online email forum for communities of SIP Express Router (SER) and Kamailio (OpenSER) projects. Subscription is open to anyone that ...