<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C56D00.0D5D40D0">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
@font-face
        {font-family:"Book Antiqua";
        panose-1:2 4 6 2 5 3 5 3 3 4;
        mso-font-charset:0;
        mso-generic-font-family:roman;
        mso-font-pitch:variable;
        mso-font-signature:647 0 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.EmailStyle17
        {mso-style-type:personal;
        mso-style-noshow:yes;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:navy;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>How about the <span class=GramE>System(</span>)
command?<span style='mso-spacerun:yes'>&nbsp; </span>I haven&#8217;t tried it
but I wonder if something like this would work&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><span class=SpellE><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Exten</span></font></span><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> =&gt; 1234<span class=GramE>,1,System</span>(/<span class=SpellE>usr</span>/bin/head
/<span class=SpellE>var/spool/asterisk/vm/default</span>/${EXTEN}/INBOX/<span
class=SpellE>busy.gsm</span>)<o:p></o:p></span></font></p>

<p class=MsoNormal><span class=SpellE><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Exten</span></font></span><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> =&gt; 1234<span class=GramE>,2,Voicemail</span>(u${EXTEN})<o:p></o:p></span></font></p>

<p class=MsoNormal><span class=SpellE><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Exten</span></font></span><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> =&gt; 1234<span class=GramE>,102,Voicemail</span>(b${EXTEN})<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>As I understand it, <span class=GramE>System(</span>)
will return -1 on errors (such as FILE NOT FOUND) and continue to priority
n+101.<span style='mso-spacerun:yes'>&nbsp; </span>I&#8217;m not sure if that
means -1 if the program spits out an <span class=GramE>error,</span> or if
RUNNING the program itself is unsuccessful. <span
style='mso-spacerun:yes'>&nbsp;&nbsp;</span>Might be that it returns 0 even if
the file doesn&#8217;t exist, because as in my example, the program /<span
class=SpellE>usr</span>/bin/head DOES exist.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hey, if it works, post it!<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><strong><b><i><font size=4 color=navy face="Book Antiqua"><span
style='font-size:13.5pt;font-family:"Book Antiqua";color:navy;font-style:italic;
mso-no-proof:yes'><o:p>&nbsp;</o:p></span></font></i></b></strong></p>

<p class=MsoNormal><strong><b><i><font size=4 color=navy face="Book Antiqua"><span
style='font-size:13.5pt;font-family:"Book Antiqua";color:navy;font-style:italic;
mso-no-proof:yes'>Chris Coulthurst</span></font></i></b></strong><font
color=navy><span style='color:navy;mso-no-proof:yes'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=4 color=navy face="Book Antiqua"><span
style='font-size:13.5pt;font-family:"Book Antiqua";color:navy;mso-no-proof:
yes'><a href="mailto:chris@shuksan.com"><em><i><font color=navy
face="Book Antiqua"><span style='font-family:"Book Antiqua";color:navy;
text-decoration:none;text-underline:none'>chris@shuksan.com</span></font></i></em></a></span></font><font
color=navy><span style='color:navy;mso-no-proof:yes'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy;mso-no-proof:yes'>&nbsp;</span></font><o:p></o:p></p>

</div>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b>
asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Jim Sturtevant<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, June 09, 2005 1:25
PM<br>
<b><span style='font-weight:bold'>To:</span></b>
asterisk-users@lists.digium.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Asterisk-Users]
voicemail check for busy message</span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Is there a way to check to see if a user has recorded a busy
message?&nbsp; If they haven&#8217;t I would prefer to send them to
&#8220;u&#8221; and play their unavailable greeting.&nbsp;&nbsp; I know I can
send them to &#8220;u&#8221; in both cases, but I would like to send them to
&#8220;b&#8221; if a recorded busy greeting exists.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks!<o:p></o:p></span></font></p>

</div>

</div>

</body>

</html>