<div dir="ltr">This works for me - key change is full path the "ls" command...<div><br></div><div> $var(out)="";<br> $var(err)="";<br> $avp(env)="a";<br><br> exec("/usr/bin/ls -l", , $var(out), $var(err), $avp(env));<br> xlog("Out: $var(out)");<br> xlog("Err: $var(err)");<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 4 Feb 2021 at 11:29, Dragomir Haralambiev <<a href="mailto:goup2010@gmail.com">goup2010@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br><div>When try to start Opensips with follow settings:<br>exec("ls -l", , $var(out), $var(err), $avp(env));<br></div><div><br></div><div>I receive follow error:<br>column 12-21: syntax error<br></div><div><br></div><div>bad arguments for command <exec><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">На чт, 4.02.2021 г. в 13:15 ч. Mark Allen <<a href="mailto:mark@allenclan.co.uk" target="_blank">mark@allenclan.co.uk</a>> написа:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Dragomir,<div><br></div><div>exec is working for me in OpenSIPS 3.1 with command...</div><div><br></div><div>exec("/root/scripts/script.sh $si", , $var(out), $var(err));<br></div><div><br></div><div>Is it the quotes around $var(err) that is causing the null output??</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 4 Feb 2021 at 10:37, Dragomir Haralambiev <<a href="mailto:goup2010@gmail.com" target="_blank">goup2010@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I try to run external program like this<br><br>exec("/test/<a href="http://opensips.pl" target="_blank">opensips.pl</a>",,,"$var(err)");<br>xlog("Received the following error $var(err)");<br><br>Here is log record:<br>Received the following error <null><br></div><div><br></div><div>The program is not running.<br><br>Where is the reason?<br></div><div><br></div><div>Best regards:<br>Dragomir </div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>