<div dir="ltr"><br><br><div class="gmail_quote">On Wed, Sep 14, 2011 at 5:27 AM, Dale Noll <span dir="ltr"><<a href="mailto:dnoll@wi.rr.com">dnoll@wi.rr.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On 09/13/2011 07:49 PM, Israel Gottlieb wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
is it possible to pas variables to the shell function<br>
<br>
Set(recordingavail=${SHELL("ls<br>
/var/lib/asterisk/sounds/<u></u>custom/${TOPMENU}")})<br>
<br>
im trying to see if a file is available before playing the file<br>
<br>
or does anybody have a different idea but not using agi<br>
<br>
asterisk 1.6.2.20<br>
thanks<br>
<br>
</blockquote>
<br></div></div>
You should check out the STAT function.<br>
<br>
core show function STAT<br>
<br>
<br>
<br>
This should evaluate to 1<br>
${STAT(e,/var/lib/asterisk/<u></u>sounds/en/vm-goodbye.gsm)})<br>
<br>
This should evaluate to 0<br>
${STAT(e,/var/lib/asterisk/<u></u>sounds/en/xyzzy.gsm)}<br><font color="#888888">
<br>
<br>
Dale</font><br><div><div class="h5"></div></div></blockquote><div><br><br>Thanks never noticed that function<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div class="h5">
<br>
<br>
--<br>
______________________________<u></u>______________________________<u></u>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/<u></u>mailman/listinfo/asterisk-<u></u>users</a><br>
</div></div></blockquote></div><br></div>