Sophie

Sophie

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

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>Customizing System Prompts</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-CHP-13.html" title="Chapter 13. Managing Your Asterisk System" /><link rel="prev" href="asterisk-CHP-13-SECT-4.html" title="Running Asterisk As a Non-root User" /><link rel="next" href="asterisk-CHP-13-SECT-6.html" title="Music on Hold" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Customizing System Prompts</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="asterisk-CHP-13-SECT-4.html">Prev</a> </td><th width="60%" align="center">Chapter 13. Managing Your Asterisk System</th><td width="20%" align="right"> <a accesskey="n" href="asterisk-CHP-13-SECT-6.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="asterisk-CHP-13-SECT-5"></a>Customizing System Prompts</h2></div></div></div><p>In keeping<a id="I_indexterm13_tt1652" class="indexterm"></a> with the seemingly limitless flexibility of Asterisk, you
    can also modify the system prompts. This is very simple to explain, but
    generally difficult to do well.</p><p>With more than 300 system prompts in the main distribution, and an
    additional 600 in the <span class="emphasis"><em>asterisk-sounds</em></span> add-on, if
    you’re contemplating customizing all of them you’d better have either a
    lot of money or a lot of time on your hands.</p><p>An audio engineer is also recommended to ensure that the recordings
    are normalized to –3 dB and that all prompts start and end at a
    zero-crossing point (with just the right amount of silence prepended and
    appended).</p><div class="sidebar"><a id="asterisk-CHP-13-SIDEBAR-3.1"></a><p class="title"><b>The Voice</b></p><p>If you are interested in The Voice of Asterisk, she <a id="I_indexterm13_tt1653" class="indexterm"></a>is Allison Smith, and she can deliver customized
      recordings for you to use on your own system.</p><p>This is a powerful concept, as very few PBXes allow you to use the
      same voice in your custom recordings as is used by the system
      prompts.</p><p>Allison is the voice of the system prompts in both English and
      Spanish.</p><p>There are also prompts available in French. Montreal’s
      own<a id="I_indexterm13_tt1654" class="indexterm"></a> June Wallack is the voice of the French Asterisk prompts
      (and also does prompts in flawless English,<sup>[<a id="id4158912" href="#ftn.id4158912">144</a>]</sup> should you want the same voice for both languages).</p><p>To find out how to get your own voice prompts, visit the Digium
      web site, <a href="http://www.digium.com/products/voice" target="_top">http://www.digium.com/products/voice</a>.</p></div><p>Once you have the recordings, the actual implementation is
    easy—simply replace the files in
    <span class="emphasis"><em>/var/lib/asterisk/sounds</em></span> with the ones you have
    created.</p><p>Alternatively, you can opt to record your own prompts and place them
    in a folder of your choosing. When you refer to sound files with
    the<a id="I_indexterm13_tt1655" class="indexterm"></a><a id="I_indexterm13_tt1656" class="indexterm"></a> <code class="literal">Playback()</code> or <code class="literal">Background()</code> applications, you can refer to the
    full pathname of the sound file, or to any subdirectory of
    <span class="emphasis"><em>/var/lib/asterisk/sounds/</em></span>.</p><p>Note that the default sounds that come with Asterisk are delivered
    in format. We would not normally recommend storing them in this format
    (unless you have a lot of channels that will be entering the system using
    the GSM<a id="I_indexterm13_tt1657" class="indexterm"></a> codec). Sure, you save some hard drive space, but the extra
    load on your CPU when it has to transcode all these files (not to mention
    the lower overall quality of the sound) makes the use of GSM undesirable,
    to our thinking. Use uncompressed files (such as
    <span class="emphasis"><em>.wav</em></span>, <span class="emphasis"><em>.ulaw</em></span> or
    <span class="emphasis"><em>.alaw</em></span>) and your CPU will not have to work as hard. As
    an added bonus, your prompts will sound better.</p><div class="sidebar"><a id="asterisk-CHP-13-SIDEBAR-4.1"></a><p class="title"><b>Sound Recording from the Dialplan</b></p><p>Surprisingly, one <a id="I_indexterm13_tt1658" class="indexterm"></a><a id="I_indexterm13_tt1659" class="indexterm"></a>of the easiest ways to get respectable-quality recordings
      is not through a PC with fancy editing software, but rather through a
      telephone set. There are many reasons for this, but the most important
      is that the telephone will tend to filter out background noise (such as
      white noise caused by HVAC equipment) and will record at a consistent
      audio level.</p><p>This little addition to your dialplan will allow you to easily
      create recordings, which will be placed in your system’s
      <span class="emphasis"><em>/tmp/</em></span> folder (from there, you can rename them and
      move them wherever you’d like):</p><a id="I_programlisting13_tt1660"></a><pre class="programlisting">exten =&gt; _66XX,1,Wait(2)
exten =&gt; _66XX,n,Record(/tmp/prompt${EXTEN:2}:wav)
exten =&gt; _66XX,n,Wait(1)
exten =&gt; _66XX,n,Playback(/tmp/prompt${EXTEN:2})
exten =&gt; _66XX,n,Wait(2)
exten =&gt; _66XX,n,Hangup()</pre><p>This snippet will allow you to dial from 6600 to 6699, and it will
      record prompts in the <span class="emphasis"><em>/tmp/</em></span> folder using the names
      <span class="emphasis"><em>prompt00.wav</em></span> to <span class="emphasis"><em>prompt99.wav</em></span>.
      After you complete recording (by pressing the <code class="literal">#</code> key), it will play your prompt back to you
      and hang up.</p><p>Be sure to move your prompts out of the <span class="emphasis"><em>/tmp/</em></span>
      dir to the Asterisk sounds directory. To keep the dialplan readable,
      rename your <span class="emphasis"><em>prompt&lt;XX&gt;</em></span> files to something
      more meaningful. For example:</p><a id="I_programlisting13_tt1661"></a><pre class="programlisting">mv /tmp/prompt00.wav /var/lib/asterisk/sounds/custom/welcome-message.wav</pre></div><div class="footnotes"><br /><hr width="100" align="left" /><div class="footnote"><p><sup>[<a id="ftn.id4158912" href="#id4158912">144</a>] </sup>We were going to say “accentless English”, but then we’d have
          to apologize to folks from the British Isles, Australia, South
          Africa, and who knows where else. We are not experts in languages,
          dialects, and such, but our ears tell us that there is a type of
          accent that in North America is common for professional voices. This
          is the accent that is common to the Pacific coast from San Diego to
          Seattle, and most of English-speaking Canada as well. Both June and
          Allison deliver English prompts in this accent, and we think it
          sounds great.</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="asterisk-CHP-13-SECT-4.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="asterisk-CHP-13.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="asterisk-CHP-13-SECT-6.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Running Asterisk As a Non-root User </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Music on Hold</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>