<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 03/12/2012 02:27 PM, Uri Shacked wrote:
    <blockquote
cite="mid:CAMMbDhQqTuMXiUoBdo_BNdODDwVx9c_jPjDB9wzsnC9Cn-bAYA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hi,</div>
        <div>&nbsp;</div>
        <div>i am using the exec_avp command as followed:</div>
        <div>&nbsp;</div>
        <div><em>exec_avp("[/usr/local/etc/kamailio/maintenance/service/service_pr.sh",
            &nbsp;"$avp(xxx),$avp(yyy)");</em></div>
        <div><em></em>&nbsp;</div>
        <div>here is the shell script content:</div>
        <div><em></em>&nbsp;</div>
        <div><em>RETVAL=-1<br>
            RES=`kamctl cr reload`<br>
            RETVAL=$?<br>
            echo "$RETVAL"<br>
            echo "$RES"</em></div>
      </div>
    </blockquote>
    <br>
    Hello,<br>
    <br>
    Check to see if you can run the script as the user that is the user
    id of the kamailio process. Also use the full path to the kamctl
    script, as relying on $PATH might not work always (environment
    settings).<br>
    <br>
    Cheers<br>
    Marius<br>
    <blockquote
cite="mid:CAMMbDhQqTuMXiUoBdo_BNdODDwVx9c_jPjDB9wzsnC9Cn-bAYA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><em></em>&nbsp;</div>
        <div>I&nbsp;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>&nbsp;<br>
        </div>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Zbihlei Marius

Head of
Linux Development Services Romania

1&amp;1 Internet Development srl    Tel KA: 754-9152
Str Mircea Eliade 18            Tel RO: +40-31-223-9152
Sect 1, Bucuresti               mailto: <a class="moz-txt-link-abbreviated" href="mailto:marius.zbihlei@1and1.ro">marius.zbihlei@1and1.ro</a>
71295, Romania
</pre>
  </body>
</html>