summaryrefslogtreecommitdiff
path: root/doc/billing.tex
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-03-15 22:29:45 +0000
committerRussell Bryant <russell@russellbryant.com>2007-03-15 22:29:45 +0000
commit1cf3a12047bb358a1645892454a43dbf611253a7 (patch)
tree7e44cd7d9a574a5cc64239ef2ef9132c63946efd /doc/billing.tex
parent4787adb4e9add47c2dbfac819810577483a484cb (diff)
Merged revisions 58931 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r58931 | russell | 2007-03-15 17:25:12 -0500 (Thu, 15 Mar 2007) | 13 lines Merge changes from svn/asterisk/team/russell/LaTeX_docs. * Convert most of the doc directory into a single LaTeX formatted document so that we can generate a PDF, HTML, or other formats from this information. * Add a CLI command to dump the application documentation into LaTeX format which will only be include if the configure script is run with --enable-dev-mode. * The PDF turned out to be close to 1 MB, so it is not included. However, you can simply run "make asterisk.pdf" to generate it yourself. We may include it in release tarballs or have automatically generated ones on the web site, but that has yet to be decided. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'doc/billing.tex')
-rw-r--r--doc/billing.tex87
1 files changed, 87 insertions, 0 deletions
diff --git a/doc/billing.tex b/doc/billing.tex
new file mode 100644
index 000000000..e1d3131fa
--- /dev/null
+++ b/doc/billing.tex
@@ -0,0 +1,87 @@
+\section{Applications}
+
+\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}
+
+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}
+
+\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.
+ \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)
+ 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
+in the middle will no longer be involved in the signaling path, and thus
+will not generate accurate CDRs for that call. If you can, use media-only
+transfers with IAX2 to avoid this problem, or turn off transfers completely
+(although this can result in a media latency increase since the media packets
+have to traverse the middle server(s) in the call).
+
+\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
+${CDR(dcontext)} Destination context
+${CDR(channel)} Channel name
+${CDR(dstchannel)} Destination channel
+${CDR(lastapp)} Last app executed
+${CDR(lastdata)} Last app's arguments
+${CDR(start)} Time the call started.
+${CDR(answer)} Time the call was answered.
+${CDR(end)} Time the call ended.
+${CDR(duration)} Duration of the call.
+${CDR(billsec)} Duration of the call once it was answered.
+${CDR(disposition)} ANSWERED, NO ANSWER, BUSY
+${CDR(amaflags)} DOCUMENTATION, BILL, IGNORE etc
+${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
+an example of how to do this.