Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > media > contrib-updates > by-pkgid > c7095aefea7b97fbd2a596dcbfb9d481 > files > 185

asterisk-docs-1.4.26.1-1mdv2008.1.i586.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HasNewVoicemail()</title><link rel="stylesheet" href="styles.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /><link rel="start" href="index.html" title="Asterisk™: The Future of Telephony" /><link rel="up" href="asterisk-APP-B.html" title="Appendix B. Application Reference" /><link rel="prev" href="asterisk-APP-B-93.html" title="Hangup()" /><link rel="next" href="asterisk-APP-B-97.html" title="HasVoicemail()" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">HasNewVoicemail()</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="asterisk-APP-B-93.html">Prev</a> </td><th width="60%" align="center">Appendix B. Application Reference</th><td width="20%" align="right"> <a accesskey="n" href="asterisk-APP-B-97.html">Next</a></td></tr></table><hr /></div><div class="refentry" lang="en" xml:lang="en"><a id="asterisk-APP-B-95"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>HasNewVoicemail() — Checks to see if there is new voicemail in the indicated
      voicemail box</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a id="I_programlisting_tt2242"></a><pre class="programlisting">HasNewVoicemail(<em class="replaceable"><code>vmbox</code></em>[@<em class="replaceable"><code>context</code></em>][:<em class="replaceable"><code>folder</code></em>][,<em class="replaceable"><code>varname</code></em>[,<em class="replaceable"><code>options</code></em>]])</pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4186351"></a><h2></h2><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p><a id="I_indexterm_tt2243" class="indexterm"></a>The application has been deprecated in favor of the
        <a href="asterisk-APP-B-97.html" title="HasVoicemail()"><code class="literal">VMCOUNT()</code> function</a>.</p></div><p>Similar to <code class="literal">HasVoicemail()</code>. This
      application sets the <code class="literal">VMSTATUS</code> to
      <code class="literal">1</code> or <code class="literal">0</code>, to indicate whether there is new (unheard)
      voicemail in the voicemail box indicated by
      <em class="replaceable"><code>vmbox</code></em>. The <em class="replaceable"><code>context</code></em>
      argument corresponds to the voicemail context, and
      <em class="replaceable"><code>folder</code></em> corresponds to a voicemail folder. If
      the voicemail folder is not specified, it defaults to the
      <span class="emphasis"><em>INBOX</em></span> folder. If the
      <em class="replaceable"><code>varname</code></em> argument is present, <code class="literal">HasNewVoicemail()</code> assigns the number of
      messages in the specified folder to that variable.</p><p>If the <em class="replaceable"><code>options</code></em> argument is set to the
      letter <code class="literal">j</code>, then Asterisk will send the
      call to priority <code class="literal">n</code>+101 if there is
      new voicemail.</p><a id="I_programlisting_tt2244"></a><pre class="programlisting">; check to see if there's unheard voicemail in INBOX of mailbox 123
; in the default voicemail context
exten =&gt; 123,1,Answer()
<span class="strong"><strong>exten =&gt; 123,n,HasNewVoicemail(123@default)</strong></span>
exten =&gt; 123,n,GotoIf($[${HASVMSTATUS} &gt; 0]?newvm)
exten =&gt; 123,n,Playback(vm-youhave)
exten =&gt; 123,n,Playback(vm-no)
exten =&gt; 123,n,Playback(vm-messages)
exten =&gt; 123,n,Goto(done)
exten =&gt; 123,n(newvm),Playback(vm-youhave)
exten =&gt; 123,n,SayNumber(${HASVMSTATUS})
exten =&gt; 123,n,Playback(vm-INBOX)
exten =&gt; 123,n,Playback(vm-messages)
exten =&gt; 123,n(done),NoOp()</pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="asterisk-APP-B-96"></a><h2>See Also</h2><p><a href="asterisk-APP-B-97.html" title="HasVoicemail()"><span class="refentrytitle">HasVoicemail()</span></a>, <a href="asterisk-APP-B-106.html" title="MailboxExists()"><span class="refentrytitle">MailboxExists()</span></a>, VMCOUNT</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="asterisk-APP-B-93.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="asterisk-APP-B.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="asterisk-APP-B-97.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Hangup() </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> HasVoicemail()</td></tr></table></div><div xmlns="" id="svn-footer"><hr /><p>You are reading <em>Asterisk: The Future of Telephony</em> (2nd Edition for Asterisk 1.4), by Jim van Meggelen, Jared Smith, and Leif Madsen.<br />
       This work is licensed under the <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative Commons Attribution-Noncommercial-No Derivative Works License v3.0</a>.<br />
       To submit comments, corrections, or other contributions to the text, please visit <a href="http://oreilly.com/catalog/9780596510480/">http://www.oreilly.com/</a>.</p></div></body></html>