[asterisk-commits] russell: trunk r85547 - in /trunk: apps/ doc/tex/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 15 08:12:52 CDT 2007


Author: russell
Date: Mon Oct 15 08:12:51 2007
New Revision: 85547

URL: http://svn.digium.com/view/asterisk?view=rev&rev=85547
Log:
Another major doc directory update from IgorG.  This patch includes
 - Many uses of the astlisting environment around verbatim text to ensure that
   it gets properly formatted and doesn't run off the page.
 - Update some things that have been deprecated.
 - Add escaping as needed
 - and more ...

(closes issue #10978)
Reported by: IgorG
Patches: 
      texdoc-85542-1.patch uploaded by IgorG (license 20)

Modified:
    trunk/apps/app_zapateller.c
    trunk/doc/tex/ael.tex
    trunk/doc/tex/ajam.tex
    trunk/doc/tex/app-sms.tex
    trunk/doc/tex/billing.tex
    trunk/doc/tex/cdrdriver.tex
    trunk/doc/tex/channelvariables.tex
    trunk/doc/tex/cliprompt.tex
    trunk/doc/tex/configuration.tex
    trunk/doc/tex/dundi.tex
    trunk/doc/tex/extensions.tex
    trunk/doc/tex/imapstorage.tex
    trunk/doc/tex/jitterbuffer.tex
    trunk/doc/tex/localchannel.tex
    trunk/doc/tex/manager.tex
    trunk/doc/tex/misdn.tex
    trunk/doc/tex/privacy.tex
    trunk/doc/tex/queuelog.tex
    trunk/doc/tex/queues-with-callback-members.tex
    trunk/doc/tex/realtime.tex
    trunk/doc/tex/security.tex
    trunk/doc/tex/sla.tex

Modified: trunk/apps/app_zapateller.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_zapateller.c?view=diff&rev=85547&r1=85546&r2=85547
==============================================================================
--- trunk/apps/app_zapateller.c (original)
+++ trunk/apps/app_zapateller.c Mon Oct 15 08:12:51 2007
@@ -53,7 +53,7 @@
 "    'answer'     - causes the line to be answered before playing the tone,\n" 
 "    'nocallerid' - causes Zapateller to only play the tone if there is no\n"
 "                   callerid information available.  Options should be\n"
-"                   separated by | characters\n\n"
+"                   separated by , characters\n\n"
 "  This application will set the following channel variable upon completion:\n"
 "    ZAPATELLERSTATUS - This will contain the last action accomplished by the\n"
 "                        Zapateller application. Possible values include:\n"

Modified: trunk/doc/tex/ael.tex
URL: http://svn.digium.com/view/asterisk/trunk/doc/tex/ael.tex?view=diff&rev=85547&r1=85546&r2=85547
==============================================================================
--- trunk/doc/tex/ael.tex (original)
+++ trunk/doc/tex/ael.tex Mon Oct 15 08:12:51 2007
@@ -22,7 +22,7 @@
      by AEL, and so are the if and while expressions, among others.
 
     \item The third syntax is the Variable Reference Syntax, the stuff
-      enclosed in \${..} curly braces. It's a bit more involved than just
+      enclosed in \$\{..\} curly braces. It's a bit more involved than just
       putting a variable name in there. You can include one of dozens of
       'functions', and their arguments, and there are even some string
       manipulation notation in there.
@@ -118,45 +118,47 @@
 that parses extensions.conf (pbx\_config.so). To use AEL, the only
 thing that has to be done is the module pbx\_ael.so must be loaded by
 Asterisk. This will be done automatically if using 'autoload=yes' in
-/etc/asterisk/modules.conf. When the module is loaded, it will look
-for 'extensions.ael' in /etc/asterisk/. extensions.conf and
+\path{/etc/asterisk/modules.conf}. When the module is loaded, it will look
+for 'extensions.ael' in \path{/etc/asterisk/}. extensions.conf and
 extensions.ael can be used in conjunction with
 each other if that is what is desired. Some users may want to keep
 extensions.conf for the features that are configured in the 'general'
 section of extensions.conf.
 
-Reloading extensions.ael
-
 To reload extensions.ael, the following command can be issued at the
 CLI:
 
     *CLI> ael reload
 
-
 \section{Debugging}
 
 Right at this moment, the following commands are available, but do
 nothing:
 
 Enable AEL contexts debug
-   *CLI> ael debug contexts
+
+   *CLI$>$ ael debug contexts
 
 Enable AEL macros debug
-   *CLI> ael debug macros
+
+   *CLI$>$ ael debug macros
 
 Enable AEL read debug
-   *CLI> ael debug read
+
+   *CLI$>$ ael debug read
 
 Enable AEL tokens debug
-   *CLI> ael debug tokens
+
+   *CLI$>$ ael debug tokens
 
 Disable AEL debug messages
-   *CLI> ael no debug
+
+   *CLI$>$ ael no debug
 
 If things are going wrong in your dialplan, you can use the following
 facilities to debug your file:
 
-1. The messages log in /var/log/asterisk. (from the checks done at load time).
+1. The messages log in \path{/var/log/asterisk}. (from the checks done at load time).
 2. the "show dialplan" command in asterisk
 3. the standalone executable, "aelparse" built in the utils/ dir in the source.
 
@@ -177,7 +179,7 @@
   \item -d
   \begin{itemize}
     \item Override the normal location of the config file dir, (usually
-       /etc/asterisk), and use the current directory instead as the
+       \path{/etc/asterisk}), and use the current directory instead as the
        config file dir. Aelparse will then expect to find the file
        "./extensions.ael" in the current directory, and any included
        files in the current directory as well.
@@ -200,12 +202,13 @@
 
 You can just as easily say,
 
+\begin{astlisting}
 \begin{verbatim}
 if(${x}=1) { NoOp(hello!); goto s,3; } else { NoOp(Goodbye!); goto s,12; }
 \end{verbatim}
-
+\end{astlisting}
 as you can say:
-
+\begin{astlisting}
 \begin{verbatim}
 if(${x}=1)
 {
@@ -218,9 +221,11 @@
        goto s,12;
 }
 \end{verbatim}
+\end{astlisting}
 
 or:
 
+\begin{astlisting}
 \begin{verbatim}
 if(${x}=1) {
        NoOp(hello!);
@@ -230,9 +235,11 @@
        goto s,12;
 }
 \end{verbatim}
+\end{astlisting}
 
 or:
 
+\begin{astlisting}
 \begin{verbatim}
 if (${x}=1) {
        NoOp(hello!); goto s,3;
@@ -240,6 +247,7 @@
        NoOp(Goodbye!); goto s,12;
 }
 \end{verbatim}
+\end{astlisting}
 
 \section{Keywords}
 
@@ -510,32 +518,33 @@
 
 Contexts in AEL represent a set of extensions in the same way that
 they do in extensions.conf.
-
+\begin{astlisting}
 \begin{verbatim}
 context default {
 
 }
-
+\end{verbatim}
+\end{astlisting}
 
 A context can be declared to be "abstract", in which case, this
 declaration expresses the intent of the writer, that this context will
 only be included by another context, and not "stand on its own". The
 current effect of this keyword is to prevent "goto " statements from
 being checked.
-
+\begin{astlisting}
 \begin{verbatim}
 abstract context longdist {
      _1NXXNXXXXXX => NoOp(generic long distance dialing actions in the US);
 }
 \end{verbatim}
-
+\end{astlisting}
 
 \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
 listed in order inside of a block.
-
+\begin{astlisting}
 \begin{verbatim}
 context default {
     1234 => Playback(tt-monkeys);
@@ -547,6 +556,7 @@
     _5XXX => NoOp(it's a pattern!);
 }
 \end{verbatim}
+\end{astlisting}
 
 Two optional items have been added to the AEL syntax, that allow the
 specification of hints, and a keyword, regexten, that will force the
@@ -554,39 +564,45 @@
 
 The ability to make extensions match by CID is preserved in
 AEL; just use '/' and the CID number in the specification. See below.
-
+\begin{astlisting}
 \begin{verbatim}
 context default {
 
     regexten _5XXX => NoOp(it's a pattern!);
 }
 \end{verbatim}
-
+\end{astlisting}
+
+\begin{astlisting}
 \begin{verbatim}
 context default {
 
     hint(Sip/1) _5XXX => NoOp(it's a pattern!);
 }
 \end{verbatim}
-
+\end{astlisting}
+
+\begin{astlisting}
 \begin{verbatim}
 context default {
 
     regexten hint(Sip/1) _5XXX => NoOp(it's a pattern!);
 }
 \end{verbatim}
+\end{astlisting}
 
 The regexten must come before the hint if they are both present.
 
 CID matching is done as with the extensions.conf file. Follow the extension
 name/number with a slash (/) and the number to match against the Caller ID:
-
+\begin{astlisting}
 \begin{verbatim}
 context zoombo
 {
   819/7079953345 => { NoOp(hello, 3345); }
 }
 \end{verbatim}
+\end{astlisting}
 
 In the above,  the 819/7079953345 extension will only be matched if the
 CallerID is 7079953345, and the dialed number is 819. Hopefully you have
@@ -599,6 +615,7 @@
 Contexts can be included in other contexts. All included contexts are
 listed within a single block.
 
+\begin{astlisting}
 \begin{verbatim}
 context default {
     includes {
@@ -608,11 +625,13 @@
     }
 }
 \end{verbatim}
+\end{astlisting}
 
 Time-limited inclusions can be specified, as in extensions.conf
 format, with the fields described in the wiki page Asterisk cmd
 GotoIfTime.
 
+\begin{astlisting}
 \begin{verbatim}
 context default {
     includes {
@@ -622,14 +641,17 @@
     }
 }
 \end{verbatim}
+\end{astlisting}
 
 \subsection{\#include}
 
 You can include other files with the \#include "filepath" construct.
 
+\begin{astlisting}
 \begin{verbatim}
    #include "/etc/asterisk/testfor.ael"
 \end{verbatim}
+\end{astlisting}
 
 An interesting property of the \#include, is that you can use it almost
 anywhere in the .ael file. It is possible to include the contents of
@@ -637,7 +659,7 @@
 have to occur at the beginning of a line. Included files can include
 other files, up to 50 levels deep. If the path provided in quotes is a
 relative path, the parser looks in the config file directory for the
-file (usually /etc/asterisk).
+file (usually \path{/etc/asterisk}).
 
 
 
@@ -647,6 +669,7 @@
 to what these are used for, see Asterisk - dual servers, and Asterisk
 config extensions.conf.
 
+\begin{astlisting}
 \begin{verbatim}
 context default {
     switches {
@@ -658,20 +681,20 @@
     }
 }
 \end{verbatim}
-
+\end{astlisting}
 
 \subsection{Ignorepat}
 
 ignorepat can be used to instruct channel drivers to not cancel
 dialtone upon receipt of a particular pattern. The most commonly used
 example is '9'.
-
+\begin{astlisting}
 \begin{verbatim}
 context outgoing {
     ignorepat => 9;
 }
 \end{verbatim}
-
+\end{astlisting}
 
 \subsection{Variables}
 
@@ -680,16 +703,18 @@
 
 Global variables are set in their own block.
 
+\begin{astlisting}
 \begin{verbatim}
 globals {
     CONSOLE=Console/dsp;
     TRUNK=Zap/g2;
 }
 \end{verbatim}
-
+\end{astlisting}
 
 Variables can be set within extensions as well.
 
+\begin{astlisting}
 \begin{verbatim}
 context foo {
     555 => {
@@ -700,6 +725,7 @@
     }
 }
 \end{verbatim}
+\end{astlisting}
 
 NOTE: AEL wraps the right hand side of an assignment with \$[ ] to allow
 expressions to be used If this is unwanted, you can protect the right hand
@@ -713,6 +739,7 @@
 
 Writing to a dialplan function is treated the same as writing to a variable.
 
+\begin{astlisting}
 \begin{verbatim}
 context blah {
     s => {
@@ -721,9 +748,11 @@
     }
 }
 \end{verbatim}
+\end{astlisting}
 
 You can declare variables in Macros, as so:
 
+\begin{astlisting}
 \begin{verbatim}
 Macro myroutine(firstarg, secondarg)
 {
@@ -731,6 +760,7 @@
   NoOp(Myvar is set to ${myvar});
 }
 \end{verbatim}
+\end{astlisting}
 
 \subsection{Local Variables}
 
@@ -744,6 +774,7 @@
 Users can declare their own local variables by using the keyword 'local'
 before setting them to a value;
 
+\begin{astlisting}
 \begin{verbatim}
 Macro myroutine(firstarg, secondarg)
 {
@@ -751,12 +782,13 @@
   NoOp(Myvar is set to ${Myvar}, and firstarg is ${firstarg}, and secondarg is ${secondarg});
 }
 \end{verbatim}
+\end{astlisting}
 
 In the above example, Myvar, firstarg, and secondarg are all local variables,
 and will not be visible to the calling code, be it an extension, or another Macro.
 
 If you need to make a local variable within the Set() application, you can do it this way:
-
+\begin{astlisting}
 \begin{verbatim}
 Macro myroutine(firstarg, secondarg)
 {
@@ -764,12 +796,12 @@
   NoOp(Myvar is set to ${Myvar}, and firstarg is ${firstarg}, and secondarg is ${secondarg});
 }
 \end{verbatim}
-
+\end{astlisting}
 
 \subsection{Loops}
 
 AEL has implementations of 'for' and 'while' loops.
-
+\begin{astlisting}
 \begin{verbatim}
 context loops {
     1 => {
@@ -786,8 +818,9 @@
     }
 }
 \end{verbatim}
-
-NOTE: The conditional expression (the "\${y} $>$= 0" above) is wrapped in
+\end{astlisting}
+
+NOTE: The conditional expression (the "\$\{y\} $>$= 0" above) is wrapped in
       \$[ ] so it can be evaluated.  NOTE: The for loop test expression
       (the "\${x} $<$ 3" above) is wrapped in \$[ ] so it can be evaluated.
 
@@ -801,6 +834,7 @@
 random(), or an ifTime() statement. The if(), ifTime(), and random()
 statements allow optional else clause.
 
+\begin{astlisting}
 \begin{verbatim}
 context conditional {
     _8XXX => {
@@ -808,15 +842,15 @@
          if ("${DIALSTATUS}" = "BUSY")
          {
               NoOp(yessir);
-              Voicemail(${EXTEN}|b);
+              Voicemail(${EXTEN},b);
          }
          else
-              Voicemail(${EXTEN}|u);
-         ifTime (14:00-25:00|sat-sun|*|*)
-              Voicemail(${EXTEN}|b);
+              Voicemail(${EXTEN},u);
+         ifTime (14:00-25:00,sat-sun,*,*)
+              Voicemail(${EXTEN},b);
          else
          {
-              Voicemail(${EXTEN}|u);
+              Voicemail(${EXTEN},u);
               NoOp(hi, there!);
          }
          random(51) NoOp(This should appear 51% of the time);
@@ -856,13 +890,14 @@
     }
 }
 \end{verbatim}
+\end{astlisting}
 
 NOTE: The conditional expression in if() statements (the
-      "\${DIALSTATUS}" = "BUSY" above) is wrapped by the compiler in
+      "\$\{DIALSTATUS\}" = "BUSY" above) is wrapped by the compiler in
       \$[] for evaluation.
 
 NOTE: Neither the switch nor case values are wrapped in \$[ ]; they can
-      be constants, or \${var} type references only.
+      be constants, or \$\{var\} type references only.
 
 NOTE: AEL generates each case as a separate extension. case clauses
       with no terminating 'break', or 'goto', have a goto inserted, to
@@ -908,6 +943,7 @@
 
 This is an example of how to do a goto in AEL.
 
+\begin{astlisting}
 \begin{verbatim}
 context gotoexample {
     s => {
@@ -917,20 +953,21 @@
          goto begin;    // go to label in same extension
     }
     3 => {
-            goto s|begin;   // go to label in different extension
+            goto s,begin;   // go to label in different extension
      }
      4 => {
-            goto gotoexample|s|begin;  // overkill go to label in same context
+            goto gotoexample,s,begin;  // overkill go to label in same context
      }
 }
 
 context gotoexample2 {
      s =>  {
    end:
-           goto gotoexample|s|begin;   // go to label in different context
+           goto gotoexample,s,begin;   // go to label in different context
      }
 }
 \end{verbatim}
+\end{astlisting}
 
 You can use the special label of "1" in the goto and jump
 statements. It means the "first" statement in the extension. I would
@@ -944,6 +981,7 @@
 "1". If context is not present, it is assumed to be the same as that
 which contains the "jump".
 
+\begin{astlisting}
 \begin{verbatim}
 context gotoexample {
     s => {
@@ -967,24 +1005,19 @@
      }
 }
 \end{verbatim}
+\end{astlisting}
 
 NOTE: goto labels follow the same requirements as the Goto()
       application, except the last value has to be a label. If the
       label does not exist, you will have run-time errors. If the
       label exists, but in a different extension, you have to specify
-      both the extension name and label in the goto, as in: goto s|z;
+      both the extension name and label in the goto, as in: goto s,z;
       if the label is in a different context, you specify
-      context|extension|label. There is a note about using goto's in a
+      context,extension,label. There is a note about using goto's in a
       switch statement below...
 
 NOTE  AEL introduces the special label "1", which is the beginning
       context number for most extensions.
-
-NOTE: A NEW addition to AEL: you can now use ',' instead of '|' to
-      separate the items in the target address. You can't have a mix,
-      though, of '|' and ',' in the target. It's either one, or the other.
-
-
 
 
 \subsection{Macros}
@@ -994,15 +1027,16 @@
 to by that same name. A catch block can be specified to catch special
 extensions.
 
+\begin{astlisting}
 \begin{verbatim}
 macro std-exten( ext , dev ) {
        Dial(${dev}/${ext},20);
        switch(${DIALSTATUS) {
        case BUSY:
-               Voicemail(b${ext});
+               Voicemail(${ext},b);
                break;
        default:
-               Voicemail(u${ext});
+               Voicemail(${ext},u);
 
        }
        catch a {
@@ -1011,11 +1045,13 @@
        }
 }
 \end{verbatim}
+\end{astlisting}
 
 A macro is then called by preceding the macro name with an
 ampersand. Empty arguments can be passed simply with nothing between
 comments(0.11).
 
+\begin{astlisting}
 \begin{verbatim}
 context example {
     _5XXX => &std-exten(${EXTEN}, "IAX2");
@@ -1024,10 +1060,12 @@
     _8XXX => &std-exten(,);
 }
 \end{verbatim}
+\end{astlisting}
 
 
 \section{Examples}
 
+\begin{astlisting}
 \begin{verbatim}
 context demo {
     s => {
@@ -1045,34 +1083,35 @@
     }
     2 => {
          Background(demo-moreinfo);
-         goto s|instructions;
+         goto s,instructions;
     }
     3 => {
          LANGUAGE()=fr;
-         goto s|restart;
+         goto s,restart;
     }
 
     500 => {
          Playback(demo-abouttotry);
          Dial(IAX2/guest at misery.digium.com);
          Playback(demo-nogo);
-         goto s|instructions;
+         goto s,instructions;
     }
     600 => {
          Playback(demo-echotest);
          Echo();
          Playback(demo-echodone);
-         goto s|instructions;
+         goto s,instructions;
     }
     # => {
 hangup:
          Playback(demo-thanks);
          Hangup();
     }
-    t => goto #|hangup;
+    t => goto #,hangup;
     i => Playback(invalid);
 }
 \end{verbatim}
+\end{astlisting}
 
 
 \section{Semantic Checks}
@@ -1128,7 +1167,7 @@
       the application that would set that variable is not called in
       the same extension. This is a warning only...
     \item Calls to applications not in the "applist" database (installed
-      in /var/lib/asterisk/applist" on most systems).
+      in \path{/var/lib/asterisk/applist}" on most systems).
     \item In an assignment statement, if the assignment is to a function,
       the function name used is checked to see if it one of the
       currently known functions. A warning is issued if it is not.
@@ -1137,9 +1176,9 @@
 \section{Differences with the original version of AEL}
 
 \begin{enumerate}
-   \item The \$[...] expressions have been enhanced to include the ==, ||,
+   \item The \$[...] expressions have been enhanced to include the ==, $|$$|$,
       and \&\& operators. These operators are exactly equivalent to the
-      =, |, and \& operators, respectively. Why? So the C, Java, C++
+      =, $|$, and \& operators, respectively. Why? So the C, Java, C++
       hackers feel at home here.
    \item It is more free-form. The newline character means very little,
       and is pulled out of the white-space only for line numbers in
@@ -1161,19 +1200,19 @@
    \item A pretty printer function is available within pbx\_ael.so.
    \item In the utils directory, two standalone programs are supplied for
       debugging AEL files. One is called "aelparse", and it reads in
-      the /etc/asterisk/extensions.ael file, and shows the results of
+      the \path{/etc/asterisk/extensions.ael} file, and shows the results of
       syntax and semantic checking on stdout, and also shows the
       results of compilation to stdout. The other is "aelparse1",
       which uses the original ael compiler to do the same work,
-      reading in "/etc/asterisk/extensions.ael", using the original
+      reading in "\path{/etc/asterisk/extensions.ael}", using the original
       'pbx\_ael.so' instead.
   \item AEL supports the "jump" statement, and the "pattern" statement
       in switch constructs. Hopefully these will be documented in the
       AEL README.
   \item Added the "return" keyword, which will jump to the end of an
       extension/Macro.
-  \item Added the ifTime ($<$time range$>$|$<$days of week$>$|$<$days of
-      month$>$|$<$months$>$ ) {} [else {}] construct, which executes much
+  \item Added the ifTime ($<$time range$>$$|$$<$days of week$>$$|$$<$days of
+      month$>$$|$$<$months$>$ ) {} [else {}] construct, which executes much
       like an if () statement, but the decision is based on the
       current time, and the time spec provided in the ifTime. See the
       example above. (Note: all the other time-dependent Applications
@@ -1216,15 +1255,15 @@
 
 \section{Hints and Bugs}
 
-     The safest way to check for a null strings is to say \$[ "\${x}" =
+     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
-     something on both sides, like this: \$[ \${x}foo = foo ]. The
+     something on both sides, like this: \$[ \$\{x\}foo = foo ]. The
      trouble with the old way, is that, if x contains any spaces, then
      problems occur, usually syntax errors. It is better practice and
      safer wrap all such tests with double quotes! Also, there are now
      some functions that can be used in a variable reference,
      ISNULL(), and LEN(), that can be used to test for an empty string:
-     \${ISNULL(\${x})} or \$[ \${LEN(\${x}) = 0 ].
+     \$\{ISNULL(\$\{x\})\} or \$[ \$\{LEN(\$\{x\})\} = 0 ].
 
       Assignment vs. Set(). Keep in mind that setting a variable to
       value can be done two different ways. If you choose say 'x=y;',
@@ -1248,7 +1287,7 @@
     \item Applications: See Asterisk - documentation of application
       commands
 
-    \item Functions: Functions were implemented inside \${ .. } variable
+    \item Functions: Functions were implemented inside \$\{ .. \} variable
       references, and supply many useful capabilities.
 
     \item Expressions: An expression evaluation engine handles items

Modified: trunk/doc/tex/ajam.tex
URL: http://svn.digium.com/view/asterisk/trunk/doc/tex/ajam.tex?view=diff&rev=85547&r1=85546&r2=85547
==============================================================================
--- trunk/doc/tex/ajam.tex (original)
+++ trunk/doc/tex/ajam.tex Mon Oct 15 08:12:51 2007
@@ -1,85 +1,97 @@
 \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 
+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:
 
 \subsection{Setup the Asterisk HTTP server}
 
 \begin{enumerate}
-\item Uncomment the line "enabled=yes" in /etc/asterisk/http.conf to enable
+\item Uncomment the line "enabled=yes" in \path{/etc/asterisk/http.conf} to enable
    Asterisk's builtin micro HTTP server.
 
-\item If you want Asterisk to actually deliver simple HTML pages, CSS, 
+\item If you want Asterisk to actually deliver simple HTML pages, CSS,
    javascript, etc. you should uncomment "enablestatic=yes"
 
-\item Adjust your "bindaddr" and "bindport" settings as appropriate for 
+\item Adjust your "bindaddr" and "bindport" settings as appropriate for
    your desired accessibility
 
 \item Adjust your "prefix" if appropriate, which must be the beginning of
-   any URI on the server to match.  The default is "asterisk" and the 
+   any URI on the server to match.  The default is "asterisk" and the
    rest of these instructions assume that value.
 \end{enumerate}
 
 \subsection{Allow Manager Access via HTTP}
 
 \begin{enumerate}
-\item Make sure you have both "enabled = yes" and "webenabled = yes" setup 
-   in /etc/asterisk/manager.conf
+\item Make sure you have both "enabled = yes" and "webenabled = yes" setup
+   in \path{/etc/asterisk/manager.conf}
 
-\item You may also use "httptimeout" to set a default timeout for HTTP 
+\item You may also use "httptimeout" to set a default timeout for HTTP
    connections.
 
 \item Make sure you have a manager username/secret
 \end{enumerate}
 
-Once those configurations are complete you can reload or restart 
-Asterisk and you should be able to point your web browser to specific 
-URI's which will allow you to access various web functions.  A complete 
-list can be found by typing "show http" at the Asterisk CLI.
+Once those configurations are complete you can reload or restart
+Asterisk and you should be able to point your web browser to specific
+URI's which will allow you to access various web functions.  A complete
+list can be found by typing "http show status" at the Asterisk CLI.
 
 examples:
-
-http://localhost:8088/asterisk/manager?action=login\&username=foo\&secret=bar
-
-This logs you into the manager interface's "HTML" view.  Once you're 
-logged in, Asterisk stores a cookie on your browser (valid for the 
-length of httptimeout) which is used to connect to the same session.  
-
+\begin{astlisting}
+\begin{verbatim}
+http://localhost:8088/asterisk/manager?action=login&username=foo&secret=bar
+\end{verbatim}
+\end{astlisting}
+This logs you into the manager interface's "HTML" view.  Once you're
+logged in, Asterisk stores a cookie on your browser (valid for the
+length of httptimeout) which is used to connect to the same session.
+\begin{astlisting}
+\begin{verbatim}
 http://localhost:8088/asterisk/rawman?action=status
-
-Assuming you've already logged into manager, this URI will give you a 
+\end{verbatim}
+\end{astlisting}
+Assuming you've already logged into manager, this URI will give you a
 "raw" manager output for the "status" command.
-
+\begin{astlisting}
+\begin{verbatim}
 http://localhost:8088/asterisk/mxml?action=status
-
-This will give you the same status view but represented as AJAX data, 
-theoretically compatible with RICO (http://www.openrico.org).
-
+\end{verbatim}
+\end{astlisting}
+This will give you the same status view but represented as AJAX data,
+theoretically compatible with RICO (\url{http://www.openrico.org}).
+\begin{astlisting}
+\begin{verbatim}
 http://localhost:8088/asterisk/static/ajamdemo.html
-
-If you have enabled static content support and have done a make install, 
-Asterisk will serve up a demo page which presents a live, but very 
-basic, "astman" like interface.  You can login with your username/secret 
-for manager and have a basic view of channels as well as transfer and 
+\end{verbatim}
+\end{astlisting}
+If you have enabled static content support and have done a make install,
+Asterisk will serve up a demo page which presents a live, but very
+basic, "astman" like interface.  You can login with your username/secret
+for manager and have a basic view of channels as well as transfer and
 hangup calls.  It's only tested in Firefox, but could probably be made
 to run in other browsers as well.
 
-A sample library (astman.js) is included to help ease the creation of 
+A sample library (astman.js) is included to help ease the creation of
 manager HTML interfaces.
 
 Note that for the demo, there is no need for *any* external web server.
 
 \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 
-minimal interfaces required.  Even without the addition of an external 
-web server, one can use Asterisk's interfaces to implement screen pops 
-and similar tools pulling data from other web servers using iframes, 
-div's etc.  If you want to integrate CGI's, databases, PHP, etc.  you 
-will likely need to use a more traditional web server like Apache and 
+Asterisk's micro HTTP server is *not* designed to replace a general
+purpose web server and it is intentionally created to provide only the
+minimal interfaces required.  Even without the addition of an external
+web server, one can use Asterisk's interfaces to implement screen pops
+and similar tools pulling data from other web servers using iframes,
+div's etc.  If you want to integrate CGI's, databases, PHP, etc.  you
+will likely need to use a more traditional web server like Apache and
 link in your Asterisk micro HTTP server with something like this:
+\begin{astlisting}
+\begin{verbatim}
+ProxyPass /asterisk http://localhost:8088/asterisk
+\end{verbatim}
+\end{astlisting}
 
-ProxyPass /asterisk http://localhost:8088/asterisk

Modified: trunk/doc/tex/app-sms.tex
URL: http://svn.digium.com/view/asterisk/trunk/doc/tex/app-sms.tex?view=diff&rev=85547&r1=85546&r2=85547
==============================================================================
--- trunk/doc/tex/app-sms.tex (original)
+++ trunk/doc/tex/app-sms.tex Mon Oct 15 08:12:51 2007
@@ -143,19 +143,21 @@
    UK this call is from a CLI of 080058752X0 where X is the sub address.
    As such a typical usage in the extensions.conf at the point of
    handling an incoming call is:
-
+\begin{astlisting}
 \begin{verbatim}
 exten = _X./8005875290,1,Goto(smsmtrx,${EXTEN},1)
 exten = _X./_80058752[0-8]0,1,Goto(smsmtrx,${EXTEN}-${CALLERID(num):8:1},1)
 \end{verbatim}
+\end{astlisting}
 
    Alternatively, if you have the correct national prefix on incoming
    CLI, e.g. using zaphfc, you might use:
-
+\begin{astlisting}
 \begin{verbatim}
 exten = _X./08005875290,1,Goto(smsmtrx,${EXTEN},1)
 exten = _X./_080058752[0-8]0,1,Goto(smsmtrx,${EXTEN}-${CALLERID(num):9:1},1)
 \end{verbatim}
+\end{astlisting}
 
    smsmorx is normally accessed by a call from a local sip device
    connected to a Magic Messenger. It could however by that you are
@@ -164,11 +166,12 @@
    SMSC number that would be dialed is 1709400X where X is the caller sub
    address. As such typical usage in extension.config at the point of
    handling a call from a sip phone is:
-
+\begin{astlisting}
 \begin{verbatim}
 exten = 17094009,1,Goto(smsmorx,${CALLERID(num)},1)
 exten = _1709400[0-8],1,Goto(smsmorx,${CALLERID(num)}-{EXTEN:7:1},1)
 \end{verbatim}
+\end{astlisting}
 
 \section{Using smsq}
 
@@ -181,7 +184,7 @@
    smsq 0123456789 This is a test to 0123456789
    This would create a queue file for a mobile originated TX message in
    queue 0 to send the text "This is a test to 0123456789" to 0123456789.
-   It would then place a file in the /var/spool/asterisk/outgoing
+   It would then place a file in the \path{/var/spool/asterisk/outgoing}
    directory to initiate a call to 17094009 (the default message centre
    in smsq) attached to application SMS with argument of the queue name
    (0).
@@ -191,10 +194,10 @@
    connect to the message centre or device and actually send the pending
    message(s).
 
-   Using --process, smsq can however be used on received queues to run a
+   Using \verb!--process!, smsq can however be used on received queues to run a
    command for each file (matching the queue if specified) with various
    environment variables set based on the message (see below);
-   smsq options:-
+   smsq options:
 \begin{verbatim}
    --help
    Show help text
@@ -341,14 +344,14 @@
 
 
    Note that when smsq attempts to make a file in
-   /var/spool/asterisk/outgoing, it checks if there is already a call
+   \path{/var/spool/asterisk/outgoing}, it checks if there is already a call
    queued for that queue. It will try several filenames, up to the
-   --concurrent setting. If these files exist, then this means Asterisk
+   \verb!--concurrent! setting. If these files exist, then this means Asterisk
    is already queued to send all messages for that queue, and so Asterisk
    should pick up the message just queued. However, this alone could
    create a race condition, so if the files exist then smsq will wait up
    to 3 seconds to confirm it still exists or if the queued messages have
-   been sent already. The --no-wait turns off this behaviour. Basically,
+   been sent already. The \verb!--no-wait! turns off this behaviour. Basically,
    this means that if you have a lot of messages to send all at once,
    Asterisk will not make unlimited concurrent calls to the same message
    centre or device for the same queue. This is because it is generally
@@ -361,7 +364,7 @@
    queued message it finds. A outgoing call will normally send all queued
    messages for that queue. One way to use smsq would be to run with no
    queue name (so any queue) every minute or every few seconds to send
-   pending message. This is not normally necessary unless --no-dial is
+   pending message. This is not normally necessary unless \verb!--no-dial! is
    selected. Note that smsq does only check motx or mttx depending on the
    options selected, so it would need to be called twice as a general
    check.
@@ -369,7 +372,7 @@
    UTF-8 is used to parse command line arguments for user data, and is
    the default when reading a file. If an invalid UTF-8 sequence is
    found, it is treated as UCS-1 data (i.e, as is).
-   The --process option causes smsq to scan the specified queue (default
+   The \verb!--process! option causes smsq to scan the specified queue (default
    is mtrx) for messages (matching the queue specified, or any if queue
    not specified) and run a command and delete the file. The command is
    run with a number of environment variables set as follows. Note that
@@ -404,10 +407,10 @@
 
 \section{File formats}
 
-   By default all queues are held in a director /var/spool/asterisk/sms.
+   By default all queues are held in a director \path{/var/spool/asterisk/sms}.
    Within this directory are sub directories mtrx, mttx, morx, motx which
    hold the received messages and the messages ready to send. Also,
-   /var/log/asterisk/sms is a log file of all messages handled.
+   \path{/var/log/asterisk/sms} is a log file of all messages handled.
 
    The file name in each queue directory starts with the queue parameter
    to SMS which is normally the CLI used for an outgoing message or the
@@ -424,7 +427,7 @@
    UTF-8. The user data (ud) field is treated as being UTF-8 encoded
    unless the DCS is specified indicating 8 bit format. If 8 bit format
    is specified then the user data is sent as is.
-   The keywords are as follows:-
+   The keywords are as follows:
 \begin{verbatim}
    oa Originating address
    The phone number from which the message came
@@ -450,7 +453,7 @@
    Present on mobile originated messages, added by default if absent
    srr
    0 or 1 for status report request
-   Does not work in UK yet, not implemented in app\_sms yet
+   Does not work in UK yet, not implemented in app_sms yet
    rp
    0 or 1 return path
    See GSM specs for details

Modified: trunk/doc/tex/billing.tex
URL: http://svn.digium.com/view/asterisk/trunk/doc/tex/billing.tex?view=diff&rev=85547&r1=85546&r2=85547
==============================================================================
--- trunk/doc/tex/billing.tex (original)
+++ trunk/doc/tex/billing.tex Mon Oct 15 08:12:51 2007
@@ -8,11 +8,11 @@
     \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 
+    \item AppendCDRUserField - Append data to CDR User field
 \end{itemize}
 
-For more information, use the "core show application <application>" command.
-You can set default account codes and AMA flags for devices in 
+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.
 
 \section{Fields of the CDR in Asterisk}
@@ -33,15 +33,15 @@
    \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, 
+   \item amaflags:  What flags to use: DOCUMENTATION, BILL, IGNORE etc,
             specified on a per channel basis like accountcode.
-   \item 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:
 
 \begin{itemize}
-   \item uniqueid:  Unique Channel Identifier (32 characters) 
+   \item uniqueid:  Unique Channel Identifier (32 characters)
       This needs to be enabled in the source code at compile time
 \end{itemize}
 
@@ -55,13 +55,13 @@
 
 \section{CDR Variables}
 
-If the channel has a cdr, that cdr record has its own set of variables which 
+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(src)}          Source
 ${CDR(dst)}          Destination
 ${CDR(dcontext)}     Destination context
 ${CDR(channel)}      Channel name

Modified: trunk/doc/tex/cdrdriver.tex
URL: http://svn.digium.com/view/asterisk/trunk/doc/tex/cdrdriver.tex?view=diff&rev=85547&r1=85546&r2=85547
==============================================================================
--- trunk/doc/tex/cdrdriver.tex (original)
+++ trunk/doc/tex/cdrdriver.tex Mon Oct 15 08:12:51 2007
@@ -14,6 +14,7 @@
 
 \subsection{ODBC using cdr\_odbc}
 	Compile, configure, and install the latest unixODBC package:
+\begin{astlisting}
 \begin{verbatim}
 	tar -zxvf unixODBC-2.2.9.tar.gz &&
 	cd unixODBC-2.2.9 &&
@@ -21,8 +22,10 @@
 	make &&
 	make install
 \end{verbatim}
+\end{astlisting}
 
 	Compile, configure, and install the latest FreeTDS package:
+\begin{astlisting}
 \begin{verbatim}
 	tar -zxvf freetds-0.62.4.tar.gz &&
 	cd freetds-0.62.4 &&
@@ -30,20 +33,23 @@
                  --with-unixodbc=/usr/lib &&
 	make && make install
 \end{verbatim}
+\end{astlisting}
 
 	Compile, or recompile, asterisk so that it will now add support
 	for cdr\_odbc.
+\begin{astlisting}
 \begin{verbatim}
 	make clean && ./configure --with-odbc &&
 	make update &&
 	make &&
 	make install
 \end{verbatim}
+\end{astlisting}
 
 	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{astlisting}
 \begin{verbatim}
 	/etc/odbcinst.ini
 	   [FreeTDS]
@@ -62,19 +68,23 @@
 	   tds_version         = 7.0
 	   language            = us_english
 \end{verbatim}
+\end{astlisting}
 
 		Only install one database connector.  Do not confuse asterisk
 		by using both ODBC (cdr\_odbc) and FreeTDS (cdr\_tds).
-		This command will erase the contents of cdr\_tds.conf 
+		This command will erase the contents of cdr\_tds.conf
+\begin{astlisting}
 \begin{verbatim}
 		[ -f /etc/asterisk/cdr_tds.conf ] > /etc/asterisk/cdr_tds.conf
 \end{verbatim}
+\end{astlisting}
 		NOTE:  unixODBC requires the freeTDS package, but asterisk does
 		not call freeTDS directly.
 
 		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{astlisting}
 \begin{verbatim}
 		/etc/asterisk/cdr_odbc.conf
 		   [global]
@@ -83,9 +93,11 @@
 		   password=voipdbpass
 		   loguniqueid=yes
 \end{verbatim}
+\end{astlisting}
 		And finally, create the 'cdr' table in your mssql database.
-\begin{verbatim}
-		CREATE TABLE cdr ( 
+\begin{astlisting}
+\begin{verbatim}
+		CREATE TABLE cdr (

[... 2209 lines stripped ...]



More information about the asterisk-commits mailing list