<div dir="ltr"><div>Hi,</div>
<div> </div>
<div>i am using the exec_avp command as followed:</div>
<div> </div>
<div><em>exec_avp(&quot;[/usr/local/etc/kamailio/maintenance/service/service_pr.sh&quot;,  &quot;$avp(xxx),$avp(yyy)&quot;);</em></div>
<div><em></em> </div>
<div>here is the shell script content:</div>
<div><em></em> </div>
<div><em>RETVAL=-1<br>RES=`kamctl cr reload`<br>RETVAL=$?<br>echo &quot;$RETVAL&quot;<br>echo &quot;$RES&quot;</em></div>
<div><em></em> </div>
<div>I keep on getting 127 as the retval. any ideas why?</div>
<div>I must say that two days ago, the script was OK..... :-(</div>
<div>where i run the script manualy i have no problems... retval is 0.</div>
<div> </div>
<div>here is the log with debug 4:</div>
<div> </div>
<div> <em>cfg_set_now(): core.debug has been changed to 4<br>Mar 12 14:20:43  server-Test /usr/local/sbin/kamailio[16589]: DEBUG: &lt;core&gt; [md5utils.c:67]: DEBUG: MD5 calculated: 64d3de5c2447acd6006b8539d1246e10<br>Mar 12 14:20:43 server-Test /usr/local/sbin/kamailio[16589]: DEBUG: exec [exec_hf.c:267]: SIP_HF_CONTENT_LENGTH=0<br>
Mar 12 14:20:43 server-Test /usr/local/sbin/kamailio[16589]: DEBUG: exec [exec_hf.c:267]: SIP_HF_CSEQ=1 OPTIONS<br>Mar 12 14:20:43 server-Test /usr/local/sbin/kamailio[16589]: DEBUG: exec [exec_hf.c:267]: SIP_HF_CALLID=123<br>
Mar 12 14:20:43  server-Test /usr/local/sbin/kamailio[16589]: DEBUG: exec [exec_hf.c:267]: SIP_HF_TO=&lt;</em><a href="mailto:you@kamailio.org"><em>you@kamailio.org</em></a><em>&gt;<br>Mar 12 14:20:43  server-Test /usr/local/sbin/kamailio[16589]: DEBUG: exec [exec_hf.c:267]: SIP_HF_FROM=&lt;</em><a href="mailto:you@kamailio.org%3E;tag=123"><em>you@kamailio.org&gt;;tag=123</em></a><br>
<em>Mar 12 14:20:43  server-Test /usr/local/sbin/kamailio[16589]: DEBUG: exec [exec_hf.c:267]: SIP_HF_VIA=SIP/2.0/UDP 127.0.0.1<br>Mar 12 14:20:43  server-Test /usr/local/sbin/kamailio[16589]: DEBUG: exec [exec_mod.c:208]: executing [/usr/local/etc/kamailio/maintenance/service/service_pr.sh]<br>
Mar 12 14:20:43  server-Test /usr/local/sbin/kamailio[16589]: DEBUG: &lt;core&gt; [main.c:852]: SIGCHLD received: we do not worry about grand-children<br>Mar 12 14:20:43  server-Test /usr/local/sbin/kamailio[16589]: CRITICAL: &lt;script&gt;: <strong><font color="#ff0000"><u>127</u></font></strong>,0</em></div>
</div>