[asterisk-commits] russell: branch russell/LaTeX_docs r58922 - /team/russell/LaTeX_docs/doc/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Mar 15 10:02:26 MST 2007


Author: russell
Date: Thu Mar 15 12:02:26 2007
New Revision: 58922

URL: http://svn.digium.com/view/asterisk?view=rev&rev=58922
Log:
commit progress, it's up to 112 pages

Added:
    team/russell/LaTeX_docs/doc/billing.tex
      - copied, changed from r58903, team/russell/LaTeX_docs/doc/billing.txt
    team/russell/LaTeX_docs/doc/cdrdriver.tex
      - copied, changed from r58903, team/russell/LaTeX_docs/doc/cdrdriver.txt
    team/russell/LaTeX_docs/doc/chaniax.tex
      - copied, changed from r58903, team/russell/LaTeX_docs/doc/chaniax.txt
    team/russell/LaTeX_docs/doc/localchannel.tex
      - copied, changed from r58903, team/russell/LaTeX_docs/doc/localchannel.txt
    team/russell/LaTeX_docs/doc/misdn.tex
      - copied, changed from r58903, team/russell/LaTeX_docs/doc/misdn.txt
    team/russell/LaTeX_docs/doc/mp3.tex
      - copied, changed from r58903, team/russell/LaTeX_docs/doc/mp3.txt
Removed:
    team/russell/LaTeX_docs/doc/billing.txt
    team/russell/LaTeX_docs/doc/cdrdriver.txt
    team/russell/LaTeX_docs/doc/chaniax.txt
    team/russell/LaTeX_docs/doc/h323.txt
    team/russell/LaTeX_docs/doc/localchannel.txt
    team/russell/LaTeX_docs/doc/misdn.txt
    team/russell/LaTeX_docs/doc/mp3.txt
    team/russell/LaTeX_docs/doc/musiconhold-fpm.txt
    team/russell/LaTeX_docs/doc/mysql.txt
    team/russell/LaTeX_docs/doc/radius.txt
    team/russell/LaTeX_docs/doc/sla.pdf
Modified:
    team/russell/LaTeX_docs/doc/ael.tex
    team/russell/LaTeX_docs/doc/ajam.tex
    team/russell/LaTeX_docs/doc/asterisk.pdf
    team/russell/LaTeX_docs/doc/asterisk.tex
    team/russell/LaTeX_docs/doc/manager.tex
    team/russell/LaTeX_docs/doc/sla.tex

Modified: team/russell/LaTeX_docs/doc/ael.tex
URL: http://svn.digium.com/view/asterisk/team/russell/LaTeX_docs/doc/ael.tex?view=diff&rev=58922&r1=58921&r2=58922
==============================================================================
--- team/russell/LaTeX_docs/doc/ael.tex (original)
+++ team/russell/LaTeX_docs/doc/ael.tex Thu Mar 15 12:02:26 2007
@@ -1,4 +1,4 @@
-\subsection{Introduction}
+\section{Introduction}
 
 AEL is a specialized language intended purely for 
 describing Asterisk dial plans.
@@ -42,7 +42,7 @@
 as well as the Expression syntax, and the Variable syntax.
 
 
-\subsection{Asterisk in a Nutshell}
+\section{Asterisk in a Nutshell}
 
 Asterisk acts as a server. Devices involved in telephony, like Zapata
 cards, or Voip phones, all indicate some context that should be
@@ -51,7 +51,7 @@
 specify a context to activate when somebody picks up a phone, or a
 call comes in from the phone company, or a voip phone, etc.
 
-\subsubsection{Contexts}
+\subsection{Contexts}
 
 Contexts are a grouping of extensions.
 
@@ -59,7 +59,7 @@
 merge operation at runtime, whereby the included context's extensions
 are added to the contexts making the inclusion.
 
-\subsubsection{Extensions and priorities}
+\subsection{Extensions and priorities}
 
 A Context contains zero or more Extensions. There are several
 predefined extensions. The "s" extension is the "start" extension, and
@@ -91,7 +91,7 @@
 extensions in other contexts. Conditionals provide the ability to
 react to different stimuli, and there you have it.
 
-\subsubsection{Macros}
+\subsection{Macros}
 
 Think of a macro as a combination of a context with one nameless
 extension, and a subroutine. It has arguments like a subroutine
@@ -100,7 +100,7 @@
 execution returns to the next statement after the macro call. Macros
 can call other macros. And they work just like function calls.
 
-\subsubsection{Applications}
+\subsection{Applications}
 
 Application calls, like "Dial()", or "Hangup()", or "Answer()", are
 available for users to use to accomplish the work of the
@@ -112,7 +112,7 @@
 Hopefully, the above objects will allow you do anything you need to in
 the Asterisk environment!
 
-\subsection{Getting Started}
+\section{Getting Started}
 
 The AEL parser (pbx\_ael.so) is completely separate from the module
 that parses extensions.conf (pbx\_config.so). To use AEL, the only
@@ -133,7 +133,7 @@
     *CLI> ael reload
 
 
-\subsection{Debugging}
+\section{Debugging}
 
 Right at this moment, the following commands are available, but do
 nothing:
@@ -161,7 +161,7 @@
 3. the standalone executable, "aelparse" built in the utils/ dir in the source.
 
 
-\subsection{About "aelparse"}
+\section{About "aelparse"}
 
 You can use the "aelparse" program to check your extensions.ael
 file before feeding it to asterisk. Wouldn't it be nice to eliminate
@@ -190,7 +190,7 @@
   \end{itemize}
 \end{itemize}
 
-\subsection{General Notes about Syntax}
+\section{General Notes about Syntax}
 
 Note that the syntax and style are now a little more free-form. The
 opening '{' (curly-braces) do not have to be on the same line as the
@@ -241,7 +241,7 @@
 }
 \end{verbatim}
 
-\subsection{Keywords}
+\section{Keywords}
 
 The AEL keywords are case-sensitive. If an application name and a
 keyword overlap, there is probably good reason, and you should
@@ -282,7 +282,7 @@
 \end{itemize}
 
 
-\subsection{Procedural Interface and Internals}
+\section{Procedural Interface and Internals}
 
 AEL first parses the extensions.ael file into a memory structure representing the file.
 The entire file is represented by a tree of "pval" structures linked together.
@@ -300,7 +300,7 @@
 for developers to simplify apps to generate dialplan data.
 
 
-\subsubsection{AEL version 2 BNF}
+\subsection{AEL version 2 BNF}
 
 (hopefully, something close to bnf).
 
@@ -491,9 +491,9 @@
 \end{verbatim}
 
 
-\subsection{AEL Example USAGE}
-
-\subsubsection{Comments}
+\section{AEL Example USAGE}
+
+\subsection{Comments}
 
 Comments begin with // and end with the end of the line.
 
@@ -503,7 +503,7 @@
 comments is after terminating semicolons, or on otherwise empty lines.
 
 
-\subsubsection{Context}
+\subsection{Context}
 
 Contexts in AEL represent a set of extensions in the same way that
 they do in extensions.conf.
@@ -527,7 +527,7 @@
 \end{verbatim}
 
 
-\subsubsection{Extensions}
+\subsection{Extensions}
 
 To specify an extension in a context, the following syntax is used. If
 more than one application is be called in an extension, they can be
@@ -591,7 +591,7 @@
 as to have 7079953345 as their CallerID!
 
 
-\subsubsection{Includes}
+\subsection{Includes}
 
 Contexts can be included in other contexts. All included contexts are
 listed within a single block.
@@ -620,7 +620,7 @@
 }
 \end{verbatim}
 
-\subsubsection{\#include}
+\subsection{\#include}
 
 You can include other files with the \#include "filepath" construct.
 
@@ -638,7 +638,7 @@
 
 
 
-\subsubsection{Dialplan Switches}
+\subsection{Dialplan Switches}
 
 Switches are listed in their own block within a context. For clues as
 to what these are used for, see Asterisk - dual servers, and Asterisk
@@ -657,7 +657,7 @@
 \end{verbatim}
 
 
-\subsubsection{Ignorepat}
+\subsection{Ignorepat}
 
 ignorepat can be used to instruct channel drivers to not cancel
 dialtone upon receipt of a particular pattern. The most commonly used
@@ -670,7 +670,7 @@
 \end{verbatim}
 
 
-\subsubsection{Variables}
+\subsection{Variables}
 
 Variables in Asterisk do not have a type, so to define a variable, it
 just has to be specified with a value.
@@ -720,7 +720,7 @@
 \end{verbatim}
 
 
-\subsubsection{Loops}
+\subsection{Loops}
 
 AEL has implementations of 'for' and 'while' loops.
 
@@ -747,7 +747,7 @@
 
 
 
-\subsubsection{Conditionals}
+\subsection{Conditionals}
 
 AEL supports if and switch statements, like AEL, but adds ifTime, and
 random. Unlike the original AEL, though, you do NOT need to put curly
@@ -840,7 +840,7 @@
       the RAND() function instead, in the GotoIf application.
 
 
-\subsubsection{Break, Continue, and Return}
+\subsection{Break, Continue, and Return}
 
 Three keywords, break, continue, and return, are included in the
 syntax to provide flow of control to loops, and switches.
@@ -858,7 +858,7 @@
 
 
 
-\subsubsection{goto, jump, and labels}
+\subsection{goto, jump, and labels}
 
 This is an example of how to do a goto in AEL.
 
@@ -941,7 +941,7 @@
 
 
 
-\subsubsection{Macros}
+\subsection{Macros}
 
 A macro is defined in its own block like this. The arguments to the
 macro are specified with the name of the macro. They are then referred
@@ -980,7 +980,7 @@
 \end{verbatim}
 
 
-\subsection{Examples}
+\section{Examples}
 
 \begin{verbatim}
 context demo {
@@ -1029,7 +1029,7 @@
 \end{verbatim}
 
 
-\subsection{Semantic Checks}
+\section{Semantic Checks}
 
 
 AEL, after parsing, but before compiling, traverses the dialplan
@@ -1170,7 +1170,7 @@
 \end{enumerate}
 
 
-\subsection{Hints and Bugs}
+\section{Hints and Bugs}
 
      The safest way to check for a null strings is to say \$[ "\${x}" =
      "" ] The old way would do as shell scripts often do, and append
@@ -1190,7 +1190,7 @@
       then say "Set(x=y);" instead.
 
 
-\subsection{The Full Power of AEL}
+\section{The Full Power of AEL}
 
 A newcomer to Asterisk will look at the above constructs and
 descriptions, and ask, "Where's the string manipulation functions?",

Modified: team/russell/LaTeX_docs/doc/ajam.tex
URL: http://svn.digium.com/view/asterisk/team/russell/LaTeX_docs/doc/ajam.tex?view=diff&rev=58922&r1=58921&r2=58922
==============================================================================
--- team/russell/LaTeX_docs/doc/ajam.tex (original)
+++ team/russell/LaTeX_docs/doc/ajam.tex Thu Mar 15 12:02:26 2007
@@ -1,11 +1,11 @@
-\subsection{Asynchronous Javascript Asterisk Manger (AJAM)}
+\section{Asynchronous Javascript Asterisk Manger (AJAM)}
 
 AJAM is a new technology which allows web browsers or other HTTP enabled 
 applications and web pages to directly access the Asterisk Manger 
 Interface (AMI) via HTTP.  Setting up your server to process AJAM 
 involves a few steps:
 
-\subsubsection{Setup the Asterisk HTTP server}
+\subsection{Setup the Asterisk HTTP server}
 
 \begin{enumerate}
 \item Uncomment the line "enabled=yes" in /etc/asterisk/http.conf to enable
@@ -22,7 +22,7 @@
    rest of these instructions assume that value.
 \end{enumerate}
 
-\subsubsection{Allow Manager Access via HTTP}
+\subsection{Allow Manager Access via HTTP}
 
 \begin{enumerate}
 \item Make sure you have both "enabled = yes" and "webenabled = yes" setup 
@@ -71,7 +71,7 @@
 
 Note that for the demo, there is no need for *any* external web server.
 
-\subsubsection{Integration with other web servers}
+\subsection{Integration with other web servers}
 
 Asterisk's micro HTTP server is *not* designed to replace a general 
 purpose web server and it is intentionally created to provide only the 

Modified: team/russell/LaTeX_docs/doc/asterisk.pdf
URL: http://svn.digium.com/view/asterisk/team/russell/LaTeX_docs/doc/asterisk.pdf?view=diff&rev=58922&r1=58921&r2=58922
==============================================================================
Binary files - no diff available.

Modified: team/russell/LaTeX_docs/doc/asterisk.tex
URL: http://svn.digium.com/view/asterisk/team/russell/LaTeX_docs/doc/asterisk.tex?view=diff&rev=58922&r1=58921&r2=58922
==============================================================================
--- team/russell/LaTeX_docs/doc/asterisk.tex (original)
+++ team/russell/LaTeX_docs/doc/asterisk.tex Thu Mar 15 12:02:26 2007
@@ -1,4 +1,4 @@
-\documentclass[12pt,a4]{article}
+\documentclass[12pt,a4]{report}
 \usepackage{hyperref}
 
 \author{Asterisk Development Team \\ Asterisk.org}
@@ -9,54 +9,71 @@
 
 \tableofcontents
 
-\section{Introduction}
+\chapter{Introduction}
 
 This document contains various pieces of information that are useful for
 reference purposes.
 
-\section{License Information}
-\input{../LICENSE}
+  \section{License Information}
+  \input{../LICENSE}
+     \subsection{Hold Music}
+       Digium has licensed the music included with
+       the Asterisk distribution From FreePlayMusic
+       for use and distribution with Asterisk.  It
+       is licensed ONLY for use as hold music within
+       an Asterisk based PBX.
+  \section{Security}
+  \input{security.tex}
+  \section{Hardware}
+  \input{hardware.tex}
 
-\section{Security}
-\input{security.tex}
+\chapter{Configuration}
+  \section{General Configuration Information}
+    \subsection{Configuration Parser}
+    \input{configuration.tex}
+    \subsection{Asterisk.conf}
+    \input{asterisk-conf.tex}
+    \subsection{CLI Prompt}
+    \input{cliprompt.tex}
+    \subsection{Extensions}
+    \input{extensions.tex}
+    \subsection{IP Type of Service}
+    \input{ip-tos.tex}
+    \subsection{MP3 Support}
+    \input{mp3.tex}
+  \section{Database Support}
+    \subsection{Realtime Database Configuration}
+    \input{realtime.tex}
+    \subsection{FreeTDS}
+    \input{freetds.tex}
 
-\section{Hardware}
-\input{hardware.tex}
-
-\section{General Configuration Information}
-  \subsection{Configuration Parser}
-  \input{configuration.tex}
-  \subsection{Asterisk.conf}
-  \input{asterisk-conf.tex}
-  \subsection{CLI Prompt}
-  \input{cliprompt.tex}
-  \subsection{Extensions}
-  \input{extensions.tex}
-  \subsection{IP Type of Service}
-  \input{ip-tos.tex}
-
-\section{Database Support}
-  \subsection{Realtime Database Configuration}
-  \input{realtime.tex}
-  \subsection{FreeTDS}
-  \input{freetds.tex}
-
-\section{AEL, Asterisk Extension Language}
+\chapter{AEL, Asterisk Extension Language}
 \input{ael.tex}
 
-\section{SLA (Shared Line Appearances)}
+\chapter{SLA (Shared Line Appearances)}
 \input{sla.tex}
 
-\section{Distributed Universal Number Discovery (DUNDi) (tm)}
-  \subsection{Introduction}
+\chapter{Distributed Universal Number Discovery (DUNDi)}
+  \section{Introduction}
   \input{dundi.tex}
-  \subsection{Peering Agreement}
+  \section{Peering Agreement}
   \input{PEERING}
 
-\section{AMI: Asterisk Manager Interface}
+\chapter{AMI: Asterisk Manager Interface}
   \input{manager.tex}
   \input{ajam.tex}
 
+\chapter{CDR: Call Detail Records}
+\input{billing.tex}
+\input{cdrdriver.tex}
+
+\chapter{Channel Drivers}
+  \section{IAX2}
+  \input{chaniax.tex}
+  \section{mISDN}
+  \input{misdn.tex}
+  \section{Local}
+  \input{localchannel.tex}
 
 % This is a list of files not yet integrated into this document:
 %
@@ -64,28 +81,16 @@
 %----
 %app_sms.txt		How to configure the SMS application
 %callingpres.txt	Settings for Caller ID presentation
-%billing.txt		Call Data Record information
 %enum.txt		Enum support in Asterisk
 %ices.txt		Integrating ICEcast streaming in Asterisk
 %jitterbuffer.txt	About the IAX2 jitterbuffer implementation
 %math.txt		About the math() application
-%mp3.txt		About MP3 support in Asterisk
-%musiconhold-fpm.txt	Free Music On Hold music
-%mysql.txt		About MYSQL support in Asterisk
 %odbcstorage.txt	Voicemail storage of messages in UnixODBC
 %privacy.txt		Privacy enhancements in Asterisk
 %queuelog.txt		Agent and queue logging
 %channelvariables.txt	Channel variables
-%cdrdrivers.txt		About CDR storage in various databases (needs update)
 %asterisk-mib.txt	SNMP mib for Asterisk (net-snmp)
 %digium-mib.txt		SNMP mib for Asterisk (net-snmp)
-%
-%Channel drivers
-%---------------
-%misdn.txt		The mISDN channel driver for ISDN BRI cards
-%h323.txt		How to compile and configure the H.323 channel
-%chaniax.txt		About the IAX2 protocol support in Asterisk
-%localchannel.txt	The local channel is a "gosub" in the dialplan
 %
 %For developers
 %--------------

Copied: team/russell/LaTeX_docs/doc/billing.tex (from r58903, team/russell/LaTeX_docs/doc/billing.txt)
URL: http://svn.digium.com/view/asterisk/team/russell/LaTeX_docs/doc/billing.tex?view=diff&rev=58922&p1=team/russell/LaTeX_docs/doc/billing.txt&r1=58903&p2=team/russell/LaTeX_docs/doc/billing.tex&r2=58922
==============================================================================
--- team/russell/LaTeX_docs/doc/billing.txt (original)
+++ team/russell/LaTeX_docs/doc/billing.tex Thu Mar 15 12:02:26 2007
@@ -1,68 +1,50 @@
-Asterisk billing support - Call Detail Records
-----------------------------------------------
-Asterisk generates Call Detail Records in a database or in a comma
-separated text file. 
+\section{Applications}
 
-   * cdr_csv supports comma separated text file storage, this is the
-     default driver
-   * cdr_manager supports CDR information via the AMI, The Asterisk Manager
-     interface
-   * cdr_odbc supports UnixODBC databases, see http://www.unixodbc.org
-     for an updated list of supported databases, from MySQL to MsSQL
-     and text files.
-   * cdr_tds supports FreeTDS databases (Among them MS SQL)
-	NOTE: Please read doc/freetds.txt for information on possible
-	problems with the FreeTDS driver
-   * cdr_sqlite supports SQlite
-   * cdr_pgsql supports PostgreSQL
+\begin{itemize}
+    \item SetAccount - 		Set account code for billing
+    \item SetAMAFlags -		Sets AMA flags
+    \item NoCDR - 		Make sure no CDR is saved for a specific call
+    \item ResetCDR -  		Reset CDR
+    \item ForkCDR -		Save current CDR and start a new CDR for this call
+    \item Authenticate -	Authenticates and sets the account code
+    \item SetCDRUserField -  	Set CDR user field
+    \item AppendCDRUserField - 	Append data to CDR User field 
+\end{itemize}
 
-In the asterisk-addons subversion repository, there's a cdr_mysql driver for
-MySQL.
-
-Applications
-------------
-
-    * SetAccount  		Set account code for billing
-    * SetAMAFlags 		Sets AMA flags
-    * NoCDR  			Make sure no CDR is saved for a specific call
-    * ResetCDR  		Reset CDR
-    * ForkCDR 			Save current CDR and start a new CDR for this call
-    * Authenticate 		Authenticates and sets the account code
-    * SetCDRUserField   	Set CDR user field
-    * AppendCDRUserField   	Append data to CDR User field 
-
-For more information, use the "show application" command.
+For more information, use the "core show application <application>" command.
 You can set default account codes and AMA flags for devices in 
 channel configuration files, like sip.conf, iax.conf etc.
 
 
-Fields of the CDR in Asterisk
------------------------------
+\section{Fields of the CDR in Asterisk}
 
-   1. accountcode:	What account number to use, (string, 20 characters)
-   2. src:		Caller*ID number (string, 80 characters)
-   3. dst:		Destination extension (string, 80 characters)
-   4. dcontext:		Destination context (string, 80 characters)
-   5. clid:		Caller*ID with text (80 characters)
-   6. channel:		Channel used (80 characters)
-   7. dstchannel:	Destination channel if appropriate (80 characters)
-   8. lastapp:		Last application if appropriate (80 characters)
-   9. lastdata:		Last application data (arguments) (80 characters)
-  10. start:		Start of call (date/time)
-  11. answer:		Answer of call (date/time)
-  12. end:		End of call (date/time)
-  13. duration:		Total time in system, in seconds (integer), from dial to hangup
-  14. billsec:		Total time call is up, in seconds (integer), from answer to hangup
-  15. disposition:	What happened to the call: ANSWERED, NO ANSWER, BUSY
-  16. amaflags:		What flags to use: DOCUMENTATION, BILL, IGNORE etc, 
+\begin{itemize}
+   \item accountcode:	What account number to use, (string, 20 characters)
+   \item src:		Caller*ID number (string, 80 characters)
+   \item dst:		Destination extension (string, 80 characters)
+   \item dcontext:		Destination context (string, 80 characters)
+   \item clid:		Caller*ID with text (80 characters)
+   \item channel:		Channel used (80 characters)
+   \item dstchannel:	Destination channel if appropriate (80 characters)
+   \item lastapp:		Last application if appropriate (80 characters)
+   \item lastdata:		Last application data (arguments) (80 characters)
+   \item start:		Start of call (date/time)
+   \item answer:		Answer of call (date/time)
+   \item end:		End of call (date/time)
+   \item duration:		Total time in system, in seconds (integer), from dial to hangup
+   \item billsec:		Total time call is up, in seconds (integer), from answer to hangup
+   \item disposition:	What happened to the call: ANSWERED, NO ANSWER, BUSY
+   \item amaflags:		What flags to use: DOCUMENTATION, BILL, IGNORE etc, 
       			specified on a per channel basis like accountcode.
-  17. user field:	A user-defined field, maximum 255 characters 
+   \item user field:	A user-defined field, maximum 255 characters 
+\end{itemize}
 
 In some cases, uniqueid is appended:
 
-    * uniqueid:		Unique Channel Identifier (32 characters) 
+\begin{itemize}
+   \item uniqueid:		Unique Channel Identifier (32 characters) 
       This needs to be enabled in the source code at compile time
-
+\end{itemize}
 
 NOTE: If you use IAX2 channels for your calls, and allow 'full' transfers
 (not media-only transfers), then when the calls is transferred the server
@@ -72,14 +54,13 @@
 (although this can result in a media latency increase since the media packets
 have to traverse the middle server(s) in the call).
 
-____________________________________
-CDR Variables
-------------------------------------
+\section{CDR Variables}
 
 If the channel has a cdr, that cdr record has its own set of variables which 
 can be accessed just like channel variables. The following builtin variables
 are available.
 
+\begin{verbatim}
 ${CDR(clid)}			Caller ID
 ${CDR(src)}			Source 
 ${CDR(dst)}			Destination
@@ -98,8 +79,9 @@
 ${CDR(accountcode)}		The channel's account code.
 ${CDR(uniqueid)}		The channel's unique id.
 ${CDR(userfield)}		The channels uses specified field.
+\end{verbatim}
 
 In addition, you can set your own extra variables by using Set(CDR(name)=value).
-These variables can be output into a text-format CDR by using the cdr_custom
-CDR driver; see the cdr_custom.conf.sample file in the configs directory for
+These variables can be output into a text-format CDR by using the cdr\_custom
+CDR driver; see the cdr\_custom.conf.sample file in the configs directory for
 an example of how to do this.

Copied: team/russell/LaTeX_docs/doc/cdrdriver.tex (from r58903, team/russell/LaTeX_docs/doc/cdrdriver.txt)
URL: http://svn.digium.com/view/asterisk/team/russell/LaTeX_docs/doc/cdrdriver.tex?view=diff&rev=58922&p1=team/russell/LaTeX_docs/doc/cdrdriver.txt&r1=58903&p2=team/russell/LaTeX_docs/doc/cdrdriver.tex&r2=58922
==============================================================================
--- team/russell/LaTeX_docs/doc/cdrdriver.txt (original)
+++ team/russell/LaTeX_docs/doc/cdrdriver.tex Thu Mar 15 12:02:26 2007
@@ -1,81 +1,90 @@
 Call data records can be stored in many different databases or even CSV text.
 
-MSSQL:		Asterisk can currently store CDRs into an MSSQL database in
-		two different ways:  cdr_odbc.c or cdr_tds.c
-		
-		Call Data Records can be stored using unixODBC (which requires
-		the FreeTDS package) [cdr_odbc.c] or directly by using just the
-		FreeTDS package [cdr_tds.c]  The following provide some
-		examples known to get asterisk working with mssql.
-		NOTE:  Only choose one db connector.
-
-	ODBC [cdr_odbc.c]:
-		Compile, configure, and install the latest unixODBC package:
-		   tar -zxvf unixODBC-2.2.9.tar.gz &&
-		   cd unixODBC-2.2.9 &&
-		   ./configure --sysconfdir=/etc --prefix=/usr --disable-gui &&
-		   make &&
-		   make install
-
-		Compile, configure, and install the latest FreeTDS package:
-		   tar -zxvf freetds-0.62.4.tar.gz &&
-		   cd freetds-0.62.4 &&
-		   ./configure --prefix=/usr --with-tdsver=7.0 \
-                        --with-unixodbc=/usr/lib &&
-		   make &&
-		   make install
-
-		Compile, or recompile, asterisk so that it will now add support
-		for cdr_odbc.c
-
-		   make clean &&
-		   make update &&
-		   make &&
-		   make install
-
-		Setup odbc configuration files.  These are working examples
-		from my system.  You will need to modify for your setup.
-		You are not required to store usernames or passwords here.
-
-		/etc/odbcinst.ini
-		   [FreeTDS]
-		   Description    = FreeTDS ODBC driver for MSSQL
-		   Driver         = /usr/lib/libtdsodbc.so
-		   Setup          = /usr/lib/libtdsS.so
-		   FileUsage      = 1
-
-		/etc/odbc.ini
-		   [MSSQL-asterisk]
-		   description         = Asterisk ODBC for MSSQL
-		   driver              = FreeTDS
-		   server              = 192.168.1.25
-		   port                = 1433
-		   database            = voipdb
-		   tds_version         = 7.0
-		   language            = us_english
+\section{MSSQL}
+
+	Asterisk can currently store CDRs into an MSSQL database in
+	two different ways:  cdr\_odbc or cdr\_tds
+	
+	Call Data Records can be stored using unixODBC (which requires
+	the FreeTDS package) [cdr\_odbc] or directly by using just the
+	FreeTDS package [cdr\_tds]  The following provide some
+	examples known to get asterisk working with mssql.
+
+	NOTE:  Only choose one db connector.
+
+\subsection{ODBC using cdr\_odbc}
+	Compile, configure, and install the latest unixODBC package:
+\begin{verbatim}
+	tar -zxvf unixODBC-2.2.9.tar.gz &&
+	cd unixODBC-2.2.9 &&
+	./configure --sysconfdir=/etc --prefix=/usr --disable-gui &&
+	make &&
+	make install
+\end{verbatim}
+
+	Compile, configure, and install the latest FreeTDS package:
+\begin{verbatim}
+	tar -zxvf freetds-0.62.4.tar.gz &&
+	cd freetds-0.62.4 &&
+	./configure --prefix=/usr --with-tdsver=7.0 \
+                 --with-unixodbc=/usr/lib &&
+	make && make install
+\end{verbatim}
+
+	Compile, or recompile, asterisk so that it will now add support
+	for cdr\_odbc.
+\begin{verbatim}
+	make clean && ./configure --with-odbc &&
+	make update &&
+	make &&
+	make install
+\end{verbatim}
+
+	Setup odbc configuration files.  These are working examples
+	from my system.  You will need to modify for your setup.
+	You are not required to store usernames or passwords here.
+
+\begin{verbatim}
+	/etc/odbcinst.ini
+	   [FreeTDS]
+	   Description    = FreeTDS ODBC driver for MSSQL
+	   Driver         = /usr/lib/libtdsodbc.so
+	   Setup          = /usr/lib/libtdsS.so
+	   FileUsage      = 1
+
+	/etc/odbc.ini
+	   [MSSQL-asterisk]
+	   description         = Asterisk ODBC for MSSQL
+	   driver              = FreeTDS
+	   server              = 192.168.1.25
+	   port                = 1433
+	   database            = voipdb
+	   tds_version         = 7.0
+	   language            = us_english
+\end{verbatim}
 
 		Only install one database connector.  Do not confuse asterisk
-		by using both ODBC (cdr_odbc.c) and FreeTDS (cdr_tds.c).
-		This command will erase the contents of cdr_tds.conf 
-
+		by using both ODBC (cdr\_odbc) and FreeTDS (cdr\_tds).
+		This command will erase the contents of cdr\_tds.conf 
+\begin{verbatim}
 		[ -f /etc/asterisk/cdr_tds.conf ] > /etc/asterisk/cdr_tds.conf
-
+\end{verbatim}
 		NOTE:  unixODBC requires the freeTDS package, but asterisk does
 		not call freeTDS directly.
 
-		Setup cdr_odbc configuration files.  These are working samples
+		Now set up cdr\_odbc configuration files.  These are working samples
 		from my system.  You will need to modify for your setup. Define
 		your usernames and passwords here, secure file as well.
-
+\begin{verbatim}
 		/etc/asterisk/cdr_odbc.conf
 		   [global]
 		   dsn=MSSQL-asterisk
 		   username=voipdbuser
 		   password=voipdbpass
 		   loguniqueid=yes
-
+\end{verbatim}
 		And finally, create the 'cdr' table in your mssql database.
-
+\begin{verbatim}
 		CREATE TABLE cdr ( 
 		        [calldate]      [datetime]              NOT NULL ,
 		        [clid]          [varchar] (80)          NOT NULL ,
@@ -94,37 +103,38 @@
 		        [uniqueid]      [varchar] (32)          NOT NULL ,
 		        [userfield]     [varchar] (255)         NOT NULL
 		)
-
+\end{verbatim}
 		Start asterisk in verbose mode, you should see that asterisk
 		logs a connection to the database and will now record every
 		call to the database when it's complete.
 
-	TDS [cdr_tds.c]:
+\subsection{TDS, using cdr\_tds}
 		Compile, configure, and install the latest FreeTDS package:
+\begin{verbatim}
 		   tar -zxvf freetds-0.62.4.tar.gz &&
 		   cd freetds-0.62.4 &&
 		   ./configure --prefix=/usr --with-tdsver=7.0
 		   make &&
 		   make install
-
+\end{verbatim}
                 Compile, or recompile, asterisk so that it will now add support
-                for cdr_tds.c  
-
-                   make clean &&
+                for cdr\_tds.
+\begin{verbatim}
+                   make clean && ./configure --with-tds &&
                    make update &&
                    make &&
                    make install
-
+\end{verbatim}
                 Only install one database connector.  Do not confuse asterisk
-                by using both ODBC (cdr_odbc.c) and FreeTDS (cdr_tds.c).
-                This command will erase the contents of cdr_odbc.conf
-
+                by using both ODBC (cdr\_odbc) and FreeTDS (cdr\_tds).
+                This command will erase the contents of cdr\_odbc.conf
+\begin{verbatim}
 		[ -f /etc/asterisk/cdr_odbc.conf ] > /etc/asterisk/cdr_odbc.conf
-
-                Setup cdr_tds configuration files.  These are working samples
+\end{verbatim}
+                Setup cdr\_tds configuration files.  These are working samples
                 from my system.  You will need to modify for your setup. Define
                 your usernames and passwords here, secure file as well.
-
+\begin{verbatim}
                 /etc/asterisk/cdr_tds.conf
 		   [global]
 		   hostname=192.168.1.25
@@ -133,9 +143,9 @@
 		   user=voipdbuser
 		   password=voipdpass
 		   charset=BIG5
-
+\end{verbatim}
                 And finally, create the 'cdr' table in your mssql database.
-
+\begin{verbatim}
 		CREATE TABLE cdr (
 		        [accountcode]   [varchar] (20)          NULL ,
 		        [src]           [varchar] (80)          NULL ,
@@ -155,26 +165,27 @@
 		        [amaflags]      [varchar] (16)          NULL ,
 		        [uniqueid]      [varchar] (32)          NULL
 		)
-
+\end{verbatim}
                 Start asterisk in verbose mode, you should see that asterisk
                 logs a connection to the database and will now record every
                 call to the database when it's complete.
 
 
-MYSQL:
-
-
-PGSQL:
-        If you want to go directly to postgresql database, and have the cdr_pgsql.so
+\section{MYSQL}
+
+Using MySQL for CDR records is supported by using ODBC and the cdr\_odbc module.
+
+\section{PGSQL}
+        If you want to go directly to postgresql database, and have the cdr\_pgsql.so
         compiled you can use the following sample setup.
         On Debian, before compiling asterisk, just install libpqxx-dev.
         Other distros will likely have a similiar package.
 
         Once you have the compile done,
-        copy the sample cdr_pgsql.conf file or create your own.
+        copy the sample cdr\_pgsql.conf file or create your own.
 
         Here is a sample:
-
+\begin{verbatim}
         /etc/asterisk/cdr_pgsql.conf
           ; Sample Asterisk config file for CDR logging to PostgresSQL
           [global]
@@ -184,11 +195,10 @@
           password=password
           user=postgres
           table=cdr
-
-        ;Now create a table in postgresql for your cdrs
-
-        ;SQL table where CDRs will be inserted
-        ;Copy and paste this into your postgresql prompt.
+\end{verbatim}
+        Now create a table in postgresql for your cdrs
+
+\begin{verbatim}
         CREATE TABLE cdr (
                 calldate      time               NOT NULL ,
                 clid          varchar (80)          NOT NULL ,
@@ -207,9 +217,215 @@
                 uniqueid      varchar (32)          NOT NULL ,
                 userfield     varchar (255)         NOT NULL
         );
-
-
-SQLLITE:
-
-
-RADIUS:		See doc/radius.txt for more information on cdr_radius	
+\end{verbatim}
+
+\section{SQLLITE}
+
+SQLite version 2 is supported in cdr\_sqlite.
+
+\section{RADIUS}
+
+\subsection{What is needed}
+
+\begin{itemize}
+	\item FreeRADIUS server
+	\item Radiusclient-ng library
+	\item Asterisk PBX
+\end{itemize}
+
+\begin{verbatim}
+	+--------------------+
+	|    Asterisk PBX    |
+	|                    |
+	|********************|
+	|                    |        +---------------+
+	|    RADIUS client   |------->| RADIUS server |
+	|                    |<-------| (FreeRADIUS)  |
+	+--------------------+        +---------------+
+\end{verbatim}
+
+
+
+\subsection{Steps to follow in order to have RADIUS support}
+
+\subsubsection{Installation of the Radiusclient library}
+   Installation:
+\begin{verbatim}	
+	Download the sources from:
+		
+	http://developer.berlios.de/projects/radiusclient-ng/
+		
+	Untar the source tarball.
+		root at localhost:/usr/local/src# tar xvfz radiusclient-ng-0.5.2.tar.gz
+
+	Compile and install the library.
+		root at localhost:/usr/local/src# cd radiusclient-ng-0.5.2
+		root at localhost:/usr/local/src/radiusclient-ng-0.5.2# ./configure
+		root at localhost:/usr/local/src/radiusclient-ng-0.5.2# make
+		root at localhost:/usr/local/src/radiusclient-ng-0.5.2# make install
+\end{verbatim}
+
+\subsubsection{Configuration of the Radiusclient library}
+	
+	By default all the configuration files of the radiusclient library will
+	be in /usr/local/etc/radiusclient-ng directory.
+		
+	File "radiusclient.conf"
+		Open the file and find lines containing the following:
+
+			authserver      localhost
+	
+	This is the hostname or IP address of the RADIUS server used for 
+	authentication. You will have to change this unless the server is 
+	running on the same host as your Asterisk PBX.
+
+			acctserver      localhost
+	This is the hostname or IP address of the RADIUS server used for 
+	accounting. You will have to change this unless the server is running
+	on the same host as your Asterisk PBX.
+
+	File "servers" 
+		
+	RADIUS protocol uses simple access control mechanism based on shared
+	secrets that allows RADIUS servers to limit access from RADIUS clients.
+		
+	A RADIUS server is configured with a secret string and only RADIUS 
+	clients that have the same secret will be accepted.
+
+	You need to configure a shared secret for each server you have 
+	configured in radiusclient.conf file in the previous step. The shared 
+	secrets are stored in /usr/local/etc/radiusclient-ng/servers file.
+
+	Each line contains hostname of a RADIUS server and shared secret 
+	used in communication with that server. The two values are separated 
+	by white spaces. Configure shared secrets for every RADIUS server you 
+	are going to use.
+
+	File "dictionary"
+			
+	Asterisk uses some attributes that are not included in the 
+	dictionary of radiusclient library, therefore it is necessary to add 
+	them. A file called dictionary.digium (kept in the contrib dir)
+	was created to list all new attributes used by Asterisk. 
+	Add to the end of the main dictionary file
+	/usr/local/etc/radiusclient-ng/dictionary
+	the line:
+\begin{verbatim}
+		\$INCLUDE /path/to/dictionary.digium
+\end{verbatim}
+
+\subsubsection{Install FreeRADIUS Server (Version 1.1.1)}
+ 
+	Download sources tarball from:
+
+		http://freeradius.org/
+			
+	Untar, configure, build, and install the server:
+
+\begin{verbatim}
+	root at localhost:/usr/local/src# tar xvfz freeradius-1.1.1.tar.gz
+	root at localhost:/usr/local/src# cd freeradius-1.1.1
+	root at localhost"/usr/local/src/freeradius-1.1.1# ./configure
+	root at localhost"/usr/local/src/freeradius-1.1.1# make
+	root at localhost"/usr/local/src/freeradius-1.1.1# make install
+\end{verbatim}
+
+	All the configuration files of FreeRADIUS server will be in 
+	/usr/local/etc/raddb directory. 
+		
+
+\subsubsection{Configuration of the FreeRADIUS Server}
+			
+	There are several files that have to be modified to configure the
+	RADIUS server. These are presented next.
+
+	File "clients.conf"
+			
+	File /usr/local/etc/raddb/clients.conf contains description of 
+	RADIUS clients that are allowed to use the server. For each of the 
+	clients you need to specify its hostname or IP address and also a 
+	shared secret. The shared secret must be the same string you configured
+	in radiusclient library.
+
+	Example:
+\begin{verbatim}
+		client myhost {
+		    secret = mysecret
+		    shortname = foo
+		}
+\end{verbatim}	
+
+	This fragment allows access from RADIUS clients on "myhost" if they use 
+	"mysecret" as the shared secret.	 
+	The file already contains an entry for localhost (127.0.0.1), so if you
+	are running the RADIUS server on the same host as your Asterisk server,
+	then modify the existing entry instead, replacing the default password.
+		
+	File "dictionary"
+		
+	Note : as of version 1.1.2, the dictionary.digium file ships with FreeRADIUS. 
+	The following procedure brings the dictionary.digium file to previous versions 
+	of FreeRADIUS.
+	
+	File /usr/local/etc/raddb/dictionary contains the dictionary of 
+	FreeRADIUS server. You have to add the same dictionary file 
+	(dictionary.digium), which you added to the dictionary of radiusclient-ng
+	library. You can include it into the main file, adding the following line at the
+	end of file '/usr/local/etc/raddb/dictionary':
+		
+	\$INCLUDE /path/to/dictionary.digium
+
+	That will include the same new attribute definitions that are used 
+	in radiusclient-ng library so the client and server will understand each 
+	other. 
+
+
+\subsubsection{Asterisk Accounting Configuration}
+
+	Compilation and installation:
+
+        The module will be compiled as long as the radiusclient-ng
+        library has been detected on your system.
+	
+	By default FreeRADIUS server will log all accounting requests into 
+	/usr/local/var/log/radius/radacct directory in form of plain text files. 
+	The server will create one file for each hostname in the directory. The 
+	following example shows how the log files look like. 
+
+	Asterisk now generates Call Detail Records. See /include/asterisk/cdr.h
+	for all the fields which are recorded. By default, records in comma 
+	separated values will be created in /var/log/asterisk/cdr-csv. 
+
+	The configuration file for cdr\_radius.so module is :
+
+        /etc/asterisk/cdr.conf 
+	This is where you can set CDR related parameters as well as the path to
+	the radiusclient-ng library configuration file.
+
+
+\section{Logged Values}
+\begin{verbatim}
+  "Asterisk-Acc-Code",          The account name of detail records
+  "Asterisk-Src",
+  "Asterisk-Dst",
+  "Asterisk-Dst-Ctx",           The destination context
+  "Asterisk-Clid",
+  "Asterisk-Chan",              The channel
+  "Asterisk-Dst-Chan",	        (if applicable)
+  "Asterisk-Last-App",	        Last application run on the channel 
+  "Asterisk-Last-Data",         Argument to the last channel 
+  "Asterisk-Start-Time",        
+  "Asterisk-Answer-Time", 
+  "Asterisk-End-Time", 
+  "Asterisk-Duration",          Duration is the whole length that the entire 
+                                call lasted. ie. call rx'd to hangup 
+                                "end time" minus "start time" 
+  "Asterisk-Bill-Sec", 	        The duration that a call was up after other 
+                                end answered which will be <= to duration  
+                                "end time" minus "answer time" 
+  "Asterisk-Disposition",    	ANSWERED, NO ANSWER, BUSY 
+  "Asterisk-AMA-Flags",       	DOCUMENTATION, BILL, IGNORE etc, specified on 
+                                a per channel basis like accountcode. 
+  "Asterisk-Unique-ID",         Unique call identifier 
+  "Asterisk-User-Field"	        User field set via SetCDRUserField 
+\end{verbatim}

Copied: team/russell/LaTeX_docs/doc/chaniax.tex (from r58903, team/russell/LaTeX_docs/doc/chaniax.txt)
URL: http://svn.digium.com/view/asterisk/team/russell/LaTeX_docs/doc/chaniax.tex?view=diff&rev=58922&p1=team/russell/LaTeX_docs/doc/chaniax.txt&r1=58903&p2=team/russell/LaTeX_docs/doc/chaniax.tex&r2=58922
==============================================================================
--- team/russell/LaTeX_docs/doc/chaniax.txt (original)
+++ team/russell/LaTeX_docs/doc/chaniax.tex Thu Mar 15 12:02:26 2007
@@ -1,15 +1,11 @@
-Inter-Asterisk eXchange Protocol
-================================
+\subsection{Introduction}

[... 1018 lines stripped ...]


More information about the asterisk-commits mailing list