Hi,
i am using the exec_avp command as followed:
exec_avp("[/usr/local/etc/kamailio/maintenance/service/service_pr.sh", "$avp(xxx),$avp(yyy)");
here is the shell script content:
RETVAL=-1
RES=`kamctl cr reload`
RETVAL=$?
echo "$RETVAL"
echo "$RES"
I keep on getting 127 as the retval. any ideas why?
I must say that two days ago, the script was OK..... :-(
where i run the script manualy i have no problems... retval is 0.
here is the log with debug 4:
cfg_set_now(): core.debug has been changed to 4
Mar 12 14:20:43 server-Test /usr/local/sbin/kamailio[16589]: DEBUG: <core> [md5utils.c:67]: DEBUG: MD5 calculated: 64d3de5c2447acd6006b8539d1246e10
Mar 12 14:20:43 server-Test /usr/local/sbin/kamailio[16589]: DEBUG: exec [exec_hf.c:267]: SIP_HF_CONTENT_LENGTH=0
Mar 12 14:20:43 server-Test /usr/local/sbin/kamailio[16589]: DEBUG: exec [exec_hf.c:267]: SIP_HF_CSEQ=1 OPTIONS
Mar 12 14:20:43 server-Test /usr/local/sbin/kamailio[16589]: DEBUG: exec [exec_hf.c:267]: SIP_HF_CALLID=123
Mar 12 14:20:43 server-Test /usr/local/sbin/kamailio[16589]: DEBUG: exec [exec_hf.c:267]: SIP_HF_TO=<you@kamailio.org>
Mar 12 14:20:43 server-Test /usr/local/sbin/kamailio[16589]: DEBUG: exec [exec_hf.c:267]: SIP_HF_FROM=<you@kamailio.org>;tag=123
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
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]
Mar 12 14:20:43 server-Test /usr/local/sbin/kamailio[16589]: DEBUG: <core> [main.c:852]: SIGCHLD received: we do not worry about grand-children
Mar 12 14:20:43 server-Test /usr/local/sbin/kamailio[16589]: CRITICAL: <script>: 127,0