Sophie

Sophie

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

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>Chapter 2. Preparing a System for Asterisk</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="index.html" title="Asterisk™: The Future of Telephony" /><link rel="prev" href="asterisk-CHP-1-SECT-7.html" title="This Book" /><link rel="next" href="asterisk-CHP-2-SECT-1.html" title="Server Hardware Selection" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. Preparing a System for Asterisk</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="asterisk-CHP-1-SECT-7.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="asterisk-CHP-2-SECT-1.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="asterisk-CHP-2"></a>Chapter 2. Preparing a System for Asterisk</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="asterisk-CHP-2-SECT-1.html">Server Hardware Selection</a></span></dt><dd><dl><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-1.html#asterisk-CHP-2-SECT-1.1">Performance Issues</a></span></dt><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-1.html#asterisk-CHP-2-SECT-1.2">Choosing a Processor</a></span></dt><dd><dl><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-1.html#asterisk-CHP-2-SECT-1.2.1">Small systems</a></span></dt><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-1.html#asterisk-CHP-2-SECT-1.2.2">Medium systems</a></span></dt><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-1.html#asterisk-CHP-2-SECT-1.2.3">Large systems</a></span></dt></dl></dd><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-1.html#asterisk-CHP-2-SECT-1.3">Choosing a Motherboard</a></span></dt><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-1.html#asterisk-CHP-2-SECT-1.4">Power Supply Requirements</a></span></dt><dd><dl><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-1.html#asterisk-CHP-2-SECT-1.4.1">Computer power supplies</a></span></dt><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-1.html#asterisk-CHP-2-SECT-1.4.2">Redundant power supplies</a></span></dt></dl></dd></dl></dd><dt><span class="sect1"><a href="asterisk-CHP-2-SECT-2.html">Environment</a></span></dt><dd><dl><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-2.html#asterisk-CHP-2-SECT-2.1">Power Conditioning and Uninterruptible Power Supplies</a></span></dt><dd><dl><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-2.html#asterisk-CHP-2-SECT-2.1.1">Power-conditioned UPSes</a></span></dt></dl></dd><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-2.html#asterisk-CHP-2-SECT-2.2">Grounding</a></span></dt><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-2.html#asterisk-CHP-2-SECT-2.3">Electrical Circuits</a></span></dt><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-2.html#asterisk-CHP-2-SECT-2.4">The Equipment Room</a></span></dt><dd><dl><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-2.html#asterisk-CHP-2-SECT-2.4.1">Humidity</a></span></dt><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-2.html#asterisk-CHP-2-SECT-2.4.2">Temperature</a></span></dt><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-2.html#asterisk-CHP-2-SECT-2.4.3">Dust</a></span></dt><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-2.html#asterisk-CHP-2-SECT-2.4.4">Security</a></span></dt></dl></dd></dl></dd><dt><span class="sect1"><a href="asterisk-CHP-2-SECT-3.html">Telephony Hardware</a></span></dt><dd><dl><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-3.html#asterisk-CHP-2-SECT-3.1">Connecting to the PSTN</a></span></dt><dd><dl><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-3.html#asterisk-CHP-2-SECT-3.1.1">Analog interface cards</a></span></dt><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-3.html#asterisk-CHP-2-SECT-3.1.2">Digital interface cards</a></span></dt><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-3.html#asterisk-CHP-2-SECT-3.1.3">Channel banks</a></span></dt><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-3.html#asterisk-CHP-2-SECT-3.1.4">Other types of PSTN interfaces</a></span></dt></dl></dd><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-3.html#asterisk-CHP-2-SECT-3.2">Connecting Exclusively to a Packet-Based Telephone
      Network</a></span></dt><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-3.html#asterisk-CHP-2-SECT-3.3">Echo Cancellation</a></span></dt></dl></dd><dt><span class="sect1"><a href="asterisk-CHP-2-SECT-4.html">Types of Phones</a></span></dt><dd><dl><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-4.html#asterisk-CHP-2-SECT-4.1">Physical Telephones</a></span></dt><dd><dl><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-4.html#asterisk-CHP-2-SECT-4.1.1">Analog telephones</a></span></dt><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-4.html#asterisk-CHP-2-SECT-4.1.2">Proprietary digital telephones</a></span></dt><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-4.html#asterisk-CHP-2-SECT-4.1.3">ISDN telephones</a></span></dt><dt><span class="sect3"><a href="asterisk-CHP-2-SECT-4.html#asterisk-CHP-2-SECT-4.1.4">IP telephones</a></span></dt></dl></dd><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-4.html#asterisk-CHP-2-SECT-4.2">Softphones</a></span></dt><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-4.html#asterisk-CHP-2-SECT-4.3">Telephony Adaptors</a></span></dt><dt><span class="sect2"><a href="asterisk-CHP-2-SECT-4.html#asterisk-CHP-2-SECT-4.4">Communications Terminals</a></span></dt></dl></dd><dt><span class="sect1"><a href="asterisk-CHP-2-SECT-5.html">Linux Considerations</a></span></dt><dt><span class="sect1"><a href="asterisk-CHP-2-SECT-6.html">Conclusion</a></span></dt></dl></div><div class="epigraph"><p>Very early on, I knew that someday in some “perfect” future out
    there over the horizon, it would be commonplace for computers to handle
    all of the necessary processing functionality internally, making the
    necessary external hardware to connect up to telecom interfaces
    <span class="emphasis"><em>very</em></span> inexpensive and, in some cases, trivial.</p><div class="attribution"><span>--<span class="attribution">Jim Dixon, “The History of Zapata Telephony and How It
    Relates to the Asterisk PBX”</span></span></div></div><p>By this point,<a id="ch02_systempreparing" class="indexterm"></a> you must be anxious to get your Asterisk system up and
  running. If you are building a hobby system, you can probably jump right to
  the next chapter and begin the installation. For a mission-critical
  deployment, however, some thought must be given to the <a id="I_indexterm2_tt43" class="indexterm"></a>environment in which the Asterisk system will run. Make no
  mistake: Asterisk, being a very flexible piece of software, will happily and
  successfully install on nearly any Linux platform you can conceive of, and
  several non-Linux platforms as well.<sup>[<a id="asterisk-CHP-2-FN-1" href="#ftn.asterisk-CHP-2-FN-1">14</a>]</sup> However, to arm you with an understanding of the type of
  operating environment Asterisk will really thrive in, this chapter will
  discuss issues you need to be aware of in order to deliver a reliable,
  well-designed system.</p><p>In terms of its resource requirements, Asterisk’s needs are similar to
  those of an embedded, real-time application. This is due in large part to
  its need to have priority access to the processor and system buses. It is,
  therefore, imperative that any functions on the system not directly related
  to the call-processing tasks of Asterisk be run at a low priority, if at
  all. On smaller systems and hobby systems, this might not be as much of an
  issue. However, on high-capacity systems, performance shortcomings will
  manifest as audio quality problems for users, often experienced as<a id="I_indexterm2_tt49" class="indexterm"></a> echo, <a id="I_indexterm2_tt50" class="indexterm"></a>static, and the like. The symptoms will resemble those
  experienced on a cell phone when going out of range, although the underlying
  causes will be different. As loads increase, the system will have increasing
  difficulty maintaining connections. For a PBX, such a situation is nothing
  short of disastrous, so careful attention to performance
  requirements<a id="I_indexterm2_tt51" class="indexterm"></a> is a critical consideration during the platform selection
  process.</p><p><a href="asterisk-CHP-2.html#asterisk-CHP-2-TABLE-1" title="Table 2.1. System requirement guidelines">Table 2.1, “System requirement guidelines”</a> lists some very basic
  guidelines that you’ll want to keep in mind when planning your system. The
  next section takes a close look at the various design and implementation
  issues that will affect its performance.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The size of an Asterisk system is actually not dictated by the
    number of users or sets, but rather by the number of simultaneous calls it
    will be expected to support. These numbers are very conservative, so feel
    free to experiment and see what works for you.</p></div><div class="table"><a id="asterisk-CHP-2-TABLE-1"></a><p class="title"><b>Table 2.1. System requirement guidelines</b></p><table summary="System requirement guidelines" border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th align="left">
              <p>Purpose</p>
            </th><th align="left">
              <p>Number of channels</p>
            </th><th align="left">
              <p>Minimum recommended</p>
            </th></tr></thead><tbody><tr><td align="left">
              <p>Hobby system<a id="I_indexterm2_tt52" class="indexterm"></a></p>
            </td><td align="left">
              <p>No more than 5</p>
            </td><td align="left">
              <p>400 MHz x86, 256 MB RAM</p>
            </td></tr><tr><td align="left">
              <p>SOHO <a id="I_indexterm2_tt53" class="indexterm"></a>system (small office/home office—less than three lines
          and five sets)</p>
            </td><td align="left">
              <p>5 to 10</p>
            </td><td align="left">
              <p>1 GHz x86, 512 MB RAM</p>
            </td></tr><tr><td align="left">
              <p>Small business system<a id="I_indexterm2_tt54" class="indexterm"></a></p>
            </td><td align="left">
              <p>Up to 25</p>
            </td><td align="left">
              <p>3 GHz x86, 1 GB RAM</p>
            </td></tr><tr><td align="left">
              <p>Medium to large system </p>
            </td><td align="left">
              <p>More than 25</p>
            </td><td align="left">
              <p>Dual CPUs, possibly also multiple servers
          in a distributed architecture</p>
            </td></tr></tbody></table></div><p>With large Asterisk installations, it is common to deploy
  functionality across several servers. One or more central units will be
  dedicated to call processing; these will be complemented by one or more
  ancillary servers handling peripherals (such as a database system, a
  voicemail system, a conferencing system, a management system, a web
  interface, a firewall, and so on). As is true in most Linux environments,
  Asterisk is well suited to growing with your needs: a small system that used
  to be able to handle all your call-processing and peripheral tasks can be
  distributed among several servers when increased demands exceed its
  abilities. Flexibility is a key reason why Asterisk is extremely
  cost-effective for rapidly growing businesses; there is no effective maximum
  or minimum size to consider when budgeting the initial purchase. While some
  scalability is possible with most telephone systems, we have yet to hear of
  one that can scale as flexibly as Asterisk. Having said that, distributed
  Asterisk systems are not simple to design—this is not a task for someone new
  to Asterisk.</p><p>
      </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>If you are sure that you need to set up a distributed Asterisk
      system, you will want to study the DUNDi protocol,<a id="I_indexterm2_tt55" class="indexterm"></a><a id="I_indexterm2_tt56" class="indexterm"></a><a id="I_indexterm2_tt57" class="indexterm"></a><a id="I_indexterm2_tt58" class="indexterm"></a> Asterisk Realtime Architecture (ARA), func_odbc, and the
      various other database tools at your disposal. This will help you to
      abstract the data your system requires from the dialplan logic your
      Asterisk systems will utilize, allowing a generic set of dialplan logic
      that can be used across multiple boxes, thereby allowing you to scale
      more simply by adding additional boxes to the system. However, this is
      far beyond the scope of this book and will be left as an exercise for
      the reader. If you want a teaser of some tools you can use for scaling,
      see <a href="asterisk-CHP-12.html" title="Chapter 12. Relational Database Integration">Chapter 12, <i>Relational Database Integration</i></a>.</p></div><p>
    </p><div class="sidebar"><a id="I_sidebar2_tt59"></a><p class="title"><b>A Set of Load Test Results</b></p><p>Joshua Colp<a id="I_indexterm2_tt60" class="indexterm"></a> was able to produce the results in <a href="asterisk-CHP-2.html#table_2_2" title="Table 2.2. Sample test results for SIPp default scenario using simple Wait()&#10;      and Playback() application; SIPp echoed media back to Asterisk">Table 2.2, “Sample test results for SIPp default scenario using simple Wait()
      and Playback() application; SIPp echoed media back to Asterisk”</a> on an AMD Athlon64 X2 4200+ with 1 GB RAM and 80 GB
    SATA hard drive, testing with the default scenario in the<a id="I_indexterm2_tt61" class="indexterm"></a> SIPp application: a simple call setup, Playback()
    an<a id="I_indexterm2_tt62" class="indexterm"></a> audio file, and<a id="I_indexterm2_tt63" class="indexterm"></a> Wait() a short time. Notice the massive savings in CPU
    utilization while reading data from the RAM disk versus the hard drive.
    This could be interpreted as the CPU waiting for data to process before
    delivering it to the requesting channel. However, this is just a simple
    test and in no way reflects the amount of calls your system will be able
    to handle. You are encouraged to load test your own system to determine
    the number of simultaneous calls that can be handled utilizing your
    dialplan and combination of applications.</p><div class="table"><a id="table_2_2"></a><p class="title"><b>Table 2.2. Sample test results for SIPp default scenario using simple Wait()
      and Playback() application; SIPp echoed media back to Asterisk</b></p><table summary="Sample test results for SIPp default scenario using simple Wait()&#10;      and Playback() application; SIPp echoed media back to Asterisk" border="1"><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><td>Simultaneous calls</td><td>330</td><td>330</td><td>550</td></tr><tr><td>CPU utilization</td><td>149%</td><td>14.8%</td><td>57.6%</td></tr><tr><td>Load average</td><td>49</td><td>25</td><td>60</td></tr><tr><td>Storage</td><td>Hard drive</td><td>RAM disk</td><td>RAM disk</td></tr></tbody></table></div></div><div class="footnotes"><br /><hr width="100" align="left" /><div class="footnote"><p><sup>[<a id="ftn.asterisk-CHP-2-FN-1" href="#asterisk-CHP-2-FN-1">14</a>] </sup>People have successfully compiled and run Asterisk on<a id="I_indexterm2_tt44" class="indexterm"></a> WRAP boards,<a id="I_indexterm2_tt45" class="indexterm"></a><a id="I_indexterm2_tt46" class="indexterm"></a><a id="I_indexterm2_tt47" class="indexterm"></a><a id="I_indexterm2_tt48" class="indexterm"></a> Linksys WRT54G routers, Soekris systems, Pentium 100s,
      PDAs, Apple Macs, Sun SPARCs, laptops, and more. Of course, whether you
      would <span class="emphasis"><em>want</em></span> to put such a system into production is
      another matter entirely. (Actually, the AstLinux distribution, by
      Kristian Kielhofner, runs very well indeed on the Soekris 4801 board.
      Once you’ve grasped the basics of Asterisk, this is something worth
      looking into further. Check out <a href="http://www.astlinux.org" target="_top">http://www.astlinux.org</a>.)</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-1-SECT-7.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="asterisk-CHP-2-SECT-1.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">This Book </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Server Hardware Selection</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>