Sophie

Sophie

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

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>Debugging</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-4.html" title="Chapter 4. Initial Configuration of Asterisk" /><link rel="prev" href="I_sect14_tt691.html" title="Using Templates in Your Configuration Files" /><link rel="next" href="asterisk-CHP-4-SECT-11.html" title="Conclusion" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Debugging</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="I_sect14_tt691.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Initial Configuration of Asterisk</th><td width="20%" align="right"> <a accesskey="n" href="asterisk-CHP-4-SECT-11.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-4-SECT-10"></a>Debugging</h2></div></div></div><p>Several methods of debugging are available in<a id="I_indexterm4_tt695" class="indexterm"></a> Asterisk. Once you’ve connected to the console, you can
    enable different levels of verbosity and debugging output, as well as
    protocol packet tracing. We’ll take a look at the various options in this
    section.</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="asterisk-CHP-4-SECT-10.1"></a>Connecting to the Console</h3></div></div></div><p>To connect to the Asterisk console, <a id="I_indexterm4_tt696" class="indexterm"></a>you can either start the server in the console directly
      (in which case you will not be able to exit out of the console without
      killing the Asterisk process), or start Asterisk as a daemon and then
      connect to a remote console.</p><p>To start the Asterisk process directly in the console, use
      the<a id="I_indexterm4_tt697" class="indexterm"></a> console flag:</p><a id="I_programlisting4_tt698"></a><pre class="programlisting"># <strong class="userinput"><code>/usr/sbin/asterisk -c</code></strong>         </pre><p>To connect to a remote Asterisk console, start the daemon first
      and then connect <a id="I_indexterm4_tt699" class="indexterm"></a>with the -<code class="literal">r</code>
      flag:</p><a id="I_programlisting4_tt700"></a><pre class="programlisting"># <strong class="userinput"><code>/usr/sbin/asterisk</code></strong>
# <strong class="userinput"><code>/usr/sbin/asterisk -r</code></strong>         </pre><p>If you are having a problem with a specific module not loading, or
      a module causing Asterisk to not load, start the Asterisk process with
      the -<code class="literal">c</code> flag <a id="I_indexterm4_tt701" class="indexterm"></a>to monitor the status of modules loading. For example, if
      you attempt to load the OSS channel driver (which allows the use of the
      <code class="literal">CONSOLE</code> channel), and Asterisk is
      unable to open <span class="emphasis"><em>/dev/dsp</em></span>, you will receive the
      following error on startup:</p><a id="I_programlisting4_tt702"></a><pre class="programlisting">WARNING[32174]: chan_oss.c:470 soundcard_init: Unable to open /dev/dsp: 
No such file or directory
  == No sound card detected -- console channel will be unavailable
  == Turn off OSS support by adding 'noload=chan_oss.so' in /etc/
     asterisk/modules.conf</pre></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="asterisk-CHP-4-SECT-10.2"></a>Enabling Verbosity and Debugging</h3></div></div></div><p>Asterisk can output debugging <a id="I_indexterm4_tt703" class="indexterm"></a>information in the form of <code class="literal">WARNING</code>, <code class="literal">NOTICE</code>, and <code class="literal">ERROR</code> messages. These messages will give you
      information about your system, such as registrations, status, and
      progression of calls, and various other useful bits of information. Note
      that <code class="literal">WARNING</code> and <code class="literal">NOTICE</code> messages are not errors; however,
      <code class="literal">ERROR</code> messages should be
      investigated. To enable various levels of verbosity, use <code class="literal">set verbose</code> followed by a numerical value.
      Useful values range from 3 to 10. For example, to set the highest level
      of verbosity, use:</p><a id="I_programlisting4_tt704"></a><pre class="programlisting"># <strong class="userinput"><code>set verbose 10</code></strong>         </pre><p>You can also enable core debugging messages with <code class="literal">set debug</code> followed by a numerical value. To
      enable <code class="literal">DEBUG</code> output on the console,
      you may need to enable it in the <span class="emphasis"><em>logger.conf</em></span> file
      by adding <code class="literal">debug</code> to the <code class="literal">console =&gt;</code> statement, as follows:</p><a id="I_programlisting4_tt705"></a><pre class="programlisting">console =&gt; warning,notice,error,event,<strong class="userinput"><code>debug</code></strong>         </pre><p>Useful values for <code class="literal">set debug</code>
      range from 3 to 10. For example:<a id="I_indexterm4_tt706" class="indexterm"></a></p><a id="I_programlisting4_tt707"></a><pre class="programlisting"># <strong class="userinput"><code>set debug 10</code></strong>         </pre></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="I_sect14_tt691.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="asterisk-CHP-4.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="asterisk-CHP-4-SECT-11.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Using Templates in Your Configuration Files </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Conclusion</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>