Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-release > by-pkgid > aa0a0c745bf74bd0c70c4944117a40d3 > files > 172

gnugk-2.3.1-1mdv2010.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
 <TITLE>The GNU Gatekeeper: Accounting Configuration</TITLE>
 <LINK HREF="manual-10.html" REL=next>
 <LINK HREF="manual-8.html" REL=previous>
 <LINK HREF="manual.html#toc9" REL=contents>
</HEAD>
<BODY>
<A HREF="manual-10.html">Next</A>
<A HREF="manual-8.html">Previous</A>
<A HREF="manual.html#toc9">Contents</A>
<HR>
<H2><A NAME="s9">9.</A> <A HREF="manual.html#toc9">Accounting Configuration</A></H2>

<P>The following sections in the config file can be used to configure accounting.</P>

<H2><A NAME="gkacct"></A> <A NAME="ss9.1">9.1</A> <A HREF="manual.html#toc9.1">Section [Gatekeeper::Acct]</A>
</H2>

<P>This section defines a list of modules which may be used to perform
accounting.  The accounting function can be used for logging gatekeeper
on/off events and call start/stop/update events.  Each accounting module
logs received events to module-specific storage.  The various storage
options include plain text file, RADIUS server and many more.  The
configuration is very similar to the one for gatekeeper authentication (see
<A HREF="manual-8.html#gkauth">[Gatekeeper::Auth]</A>).</P>
<P>All CDRs are also sent to the status port and can be used by external applications.</P>
<P>
<DL>
<DT><B>Syntax:</B><DD><P>
<BLOCKQUOTE><CODE>
<PRE>
acctmod=actions

 &lt;acctmod> := FileAcct | RadAcct | SQLAcct | StatusAcct | SyslogAcct | CapacityControl | ...
 &lt;actions> := &lt;control>[;&lt;event>,&lt;event>,...]
 &lt;control> := optional | required | sufficient | alternative
 &lt;event>   := start | stop | connect | update | on | off
</PRE>
</CODE></BLOCKQUOTE>
</P>
</DL>

The event list tells the gatekeeper which events should trigger logging
with the given accounting module (if an event type is supported by the module):
<UL>
<LI><CODE>start</CODE> - a call has been started and a Setup message has been received (only available in routed mode)</LI>
<LI><CODE>connect</CODE> - a call has been connected (only available in routed mode)</LI>
<LI><CODE>update</CODE> - a call is active and a periodic update is performed
to reflect the new call duration. The frequency of these updates is determined
by the <B>AcctUpdateInterval</B> variable from the 
<A HREF="manual-12.html#calltable">[CallTable]</A>
section</LI>
<LI><CODE>stop</CODE> - a call has been disconnected (removed from the gatekeeper call table)</LI>
<LI><CODE>on</CODE> - the gatekeeper has been started</LI>
<LI><CODE>off</CODE> - the gatekeeper has been shut down</LI>
</UL>

An event logged by a module may results in one of three result codes:
<B>ok</B>, <B>fail</B>, <B>next</B>.
<UL>
<LI><CODE>ok</CODE> - the event has been logged successfully by this module</LI>
<LI><CODE>fail</CODE> - the module failed to log the event</LI>
<LI><CODE>next</CODE> - the event has not been logged by this module, because the module
is not configured for/does not support this event type</LI>
</UL>

Accounting modules can be stacked to log events by multiple modules or to create
failover setups. The <B>control</B> flag for each module, along with result codes,
define what is the final status of the event processing by the entire module stack.
If the final result is <B>failure</B>, some special actions may take place. Currently,
if a call <B>start</B> event logging fails, the call is disconnected immediately.
The following <B>control</B> flags are recognized:
<UL>
<LI><CODE>required</CODE> - if the module fails to log an event, the final status
is set to failure and the event is passed down to any remaining
modules.</LI>
<LI><CODE>optional</CODE> - the module tries to log an event, but the final status
is not affected by success or failure (except when the module
is last on the list). The event is always passed down
to any remaining modules.</LI>
<LI><CODE>sufficient</CODE> - the module determines the final status. If an event
is logged successfully, no remaining modules are processed.
Otherwise the final status is set to failure and the event
is passed down to any remaining modules.</LI>
<LI><CODE>alternative</CODE> - if the module logs an event successfully, no remaining
modules are processed. Otherwise the final status is
not modified and the event is passed down to any remaining
modules.</LI>
</UL>
</P>
<P>Currently supported accounting modules:
<UL>
<LI><CODE>FileAcct</CODE>
<P>A plain Call Detail Report ("CDR") text file logger. It outputs CDR status data to
a specified text file. This module only supports the <B>stop</B> accounting event.
Configuration settings are read from 
<A HREF="#fileacct">[FileAcct]</A> section.</P>

</LI>
<LI><CODE>RadAcct</CODE>
<P>This module performs RADIUS accounting. It supports all event types
(start, stop, update, on, off).
See section 
<A HREF="#radacct">[RadAcct]</A> for configuration details.</P>

</LI>
<LI><CODE>SQLAcct</CODE>
<P>This module performs direct SQL accounting. It supports (start, connect, stop, update)
event types. 
See section 
<A HREF="#sqlacct">[SQLAcct]</A> for configuration details.</P>

</LI>
<LI><CODE>StatusAcct</CODE>
<P>This module logs all accounting events on the status port. It can be used to interface to external application in real-time. It supports (start, connect, stop, update)
event types. 
See section 
<A HREF="#statusacct">[StatusAcct]</A> for configuration details.</P>

</LI>
<LI><CODE>SyslogAcct</CODE>
<P>This module logs all accounting events to the Unix syslog. It supports (start, connect, stop, update)
event types. 
See section 
<A HREF="#syslogacct">[SyslogAcct]</A> for configuration details.</P>

</LI>
<LI><CODE>CapacityControl</CODE>
<P>This module performs inbound call volume logging, required for the <CODE>CapacityControl</CODE>
authentication module to work correctly. See the section 
<A HREF="manual-8.html#capctrl">[CapacityControl]</A>
for details.</P>

</LI>
<LI><CODE>default</CODE>
<P>This is a special pseudo module - it is used to set the final status
if other modules have not determined it. The format is as follows:
<DL>
<DT><B>Syntax:</B><DD><P>
<BLOCKQUOTE><CODE>
<PRE>
 default=&lt;status>[;&lt;event>,&lt;event>,...]
 &lt;status> := accept | fail
 &lt;event>  := start | stop | update | on | off
</PRE>
</CODE></BLOCKQUOTE>
</P>
</DL>
</P>

</LI>
</UL>
</P>
<P>Sample configuration #1 (try to log call start/stop with RADIUS server,
and always write a CDR to a text file):
<DL>
<DT><B>Example:</B><DD><P><CODE>RadAcct=optional;start,stop</CODE><BR>
<CODE>FileAcct=required</CODE><BR></P>
</DL>
</P>
<P>Sample configuration #2 (try to log call start/stop with RADIUS server,
if it fails use a CDR log file):
<DL>
<DT><B>Example:</B><DD><P><CODE>RadAcct=alternative;start,stop</CODE><BR>
<CODE>FileAcct=sufficient;stop</CODE><BR>
<CODE>default=accept</CODE><BR></P>
</DL>

The <B>default</B> rule is required here to prevent calls from being rejected
because of RadAcct start event logging failure. If RadAcct responds with a <B>fail</B>
return code, it is passed down to the FileAcct module. The FileAcct module does not
support <B>start</B> events, so it returns a <B>next</B> code. If there were
no <B>default</B> rule, the final status would be failure, because no module
has been able to log the event.</P>
<P>Sample configuration #3 (always log call start and stop events with RADIUS
server, if it fails for call stop event, use a CDR file to store call info):
<DL>
<DT><B>Example:</B><DD><P><CODE>RadAcct=alternative;start,stop</CODE><BR>
<CODE>FileAcct=sufficient;stop</CODE><BR>
<CODE>default=fail;start</CODE><BR></P>
</DL>

The <B>default</B> rule is optional here. If RadAcct returns a <B>fail</B>
code for the <B>start</B> event, the code is passed to the FileAcct module.
The FileAcct module does not support <B>start</B> events, so it returns <B>next</B>
return code. The <B>default</B> rule ensures that the call is disconnected
if the call start event could not be logged with RadAcct. However, we still want
to store a CDR in a text file in case the RADIUS server is down when the call
disconnects, so we can fetch call duration into a billing system later.</P>

<H2><A NAME="fileacct"></A> <A NAME="ss9.2">9.2</A> <A HREF="manual.html#toc9.2">Section [FileAcct]</A>
</H2>

<P>This accounting module writes CDR lines to a specified text file. The CDR
format can be a standard one (the same as displayed by the status interface)
or a customized one (using parametrized query string).</P>
<P>
<UL>
<LI><CODE>DetailFile=FULL_PATH_AND_FILENAME</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>A full path to the CDR plain text file. If a file with the given name already 
exists, new CDRs will be appended at the end of the file.</P>

</LI>
<LI><CODE>StandardCDRFormat=0</CODE><BR>
Default: <CODE>1</CODE><BR>
<P>Use a CDR format compatible with the status interface CDR format (<CODE>1</CODE>)
or build a custom CDR string from the <B>CDRString</B> parametrized string.</P>
<P>The StandardCDRFormat is equivalent to this definition:
<DL>
<P><CODE>TimestampFormat=RFC822</CODE><BR>
<CODE>CDRString=CDR|%n|%{CallId}|%d|%{connect-time}|%{disconnect-time}|%{caller-ip}:%{caller-port}|%{caller-epid}|%{callee-ip}:%{callee-port}|{callee-epid}|%{dest-info}|%{src-info}|%g;</CODE><BR></P>
</DL>
</P>

</LI>
<LI><CODE>CDRString=%s|%g|%u|%{Calling-Station-Id}|%{Called-Station-Id}|%d|%c</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>If <B>StandardCDRFormat</B> is disabled (0) or not specified at all, 
this parametrized string instructs the gatekeeper on how to build a custom
CDR. Parameters are specified using <CODE>%</CODE> character and can be one letter
(like <CODE>%n</CODE>) or longer (like <CODE>%{CallId}</CODE>). Any remaining characters that
are not parameter names are simply copied to the final CDR string. The following
parameters are recognized:
<UL>
<LI><CODE>%g</CODE> - gatekeeper name</LI>
<LI><CODE>%n</CODE> - call number (not unique after gatekeeper restart)</LI>
<LI><CODE>%d</CODE> - call duration (seconds)</LI>
<LI><CODE>%t</CODE> - total call duration (from Setup to Release Complete)</LI>
<LI><CODE>%c</CODE> - Q.931 disconnect cause (decimal integer) as originally received</LI>
<LI><CODE>%{cause-translated}</CODE> - Q.931 disconnect cause (decimal integer) after translation rules</LI>
<LI><CODE>%r</CODE> - who disconnected the call (-1 - unknown, 0 - the gatekeeper, 1 - the caller, 2 - the callee)</LI>
<LI><CODE>%p</CODE> - PDD (Post Dial Delay) in seconds</LI>
<LI><CODE>%s</CODE> - unique (for this gatekeeper) session identifier (Acct-Session-Id)</LI>
<LI><CODE>%u</CODE> - H.323 ID of the calling party</LI>
<LI><CODE>%{gkip}</CODE> - IP address of the gatekeeper</LI>
<LI><CODE>%{CallId}</CODE> - H.323 call identifier (16 hex 8-bit digits)</LI>
<LI><CODE>%{ConfId}</CODE> - H.323 conference identifier (16 hex 8-bit digits)</LI>
<LI><CODE>%{CallLink}</CODE> - Linked H.323 conference identifier (billing account for H.450 call transfer)</LI>
<LI><CODE>%{setup-time}</CODE> - timestamp string for Q.931 Setup message</LI>
<LI><CODE>%{alerting-time}</CODE> - timestamp string for Q.931 Alerting message</LI>
<LI><CODE>%{connect-time}</CODE> - timestamp string for a call connected event</LI>
<LI><CODE>%{disconnect-time}</CODE> - timestamp string for a call disconnect event</LI>
<LI><CODE>%{ring-time}</CODE> - time a remote phone was ringing for (from Alerting till Connect or Release Complete)</LI>
<LI><CODE>%{caller-ip}</CODE> - signaling IP address of the caller</LI>
<LI><CODE>%{caller-port}</CODE> - signaling port of the caller</LI>
<LI><CODE>%{callee-ip}</CODE> - signaling IP address of the called party</LI>
<LI><CODE>%{callee-port}</CODE> - signaling port of the called party</LI>
<LI><CODE>%{src-info}</CODE> - a colon separated list of source aliases</LI>
<LI><CODE>%{dest-info}</CODE> - a colon separated list of destination aliases</LI>
<LI><CODE>%{Calling-Station-Id}</CODE> - calling party number</LI>
<LI><CODE>%{Called-Station-Id}</CODE> - called party number (rewritten)</LI>
<LI><CODE>%{Dialed-Number}</CODE> - dialed number (as received from the calling party)</LI>
<LI><CODE>%{caller-epid}</CODE> - endpoint identifier of the calling party</LI>
<LI><CODE>%{callee-epid}</CODE> - endpoint identifier of the called party</LI>
<LI><CODE>%{call-attempts}</CODE> - number of attempts to establish the calls (with failover this can be > 1)</LI>
<LI><CODE>%{last-cdr}</CODE> - is this the last CDR for this call ? (0 / 1) only when using failover this can be 0</LI>
<LI><CODE>%{media-oip}</CODE> - caller's RTP media IP (only for H.245 routed/tunneled calls)</LI>
<LI><CODE>%{codec}</CODE> - audio codec used during the call (only for H.245 routed/tunneled calls)</LI>
<LI><CODE>%{bandwidth}</CODE> - bandwidth for this call</LI>
<LI><CODE>%{client-auth-id}</CODE> - an ID provided to GnuGk when authenticating the call (through SqlAuth)</LI>
</UL>
<BR></P>

</LI>
<LI><CODE>TimestampFormat=Cisco</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Format of timestamp strings printed in CDR strings. If this setting
is not specified, the global one from the main gatekeeper section is used.</P>

</LI>
<LI><CODE>Rotate=hourly | daily | weekly | monthly | L... | S...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>If set, the CDR file will be rotated based on this setting. Hourly rotation
enables rotation once per hour, daily - once per day, weekly - once per week
and monthly - once per month. An exact rotation moment is determined by a combination
of RotateDay and RotateTime. During rotation, an existing file is renamed 
to CURRENT_FILENAME.YYYYMMDD-HHMMSS, where YYYYMMDD-HHMMSS is replaced with 
the current timestamp, and new CDRs are logged to an empty file.<BR>
In addition, rotation per number of CDRs written (L...) and per file size (S...)
is supported. The <CODE>L</CODE> prefix specifies a number of CDR lines written,
the <CODE>S</CODE> prefix specifies CDR file size. <CODE>k</CODE> and <CODE>m</CODE> suffixes can
be used to specify thousands (kilobytes) and millions (megabytes). </P>
<P>
<DL>
<DT><B>Example 1 - no rotation:</B><DD><P><CODE>[FileAcct]</CODE><BR>
<CODE>DetailFile=/var/log/gk/cdr.log</CODE><BR></P>
</DL>
</P>
<P>
<DL>
<DT><B>Example 2 - rotate every hour (00:45, 01:45, ..., 23:45):</B><DD><P><CODE>[FileAcct]</CODE><BR>
<CODE>DetailFile=/var/log/gk/cdr.log</CODE><BR>
<CODE>Rotate=hourly</CODE><BR>
<CODE>RotateTime=45</CODE><BR></P>
</DL>
</P>
<P>
<DL>
<DT><B>Example 3 - rotate every day at 23:00 (11PM):</B><DD><P><CODE>[FileAcct]</CODE><BR>
<CODE>DetailFile=/var/log/gk/cdr.log</CODE><BR>
<CODE>Rotate=daily</CODE><BR>
<CODE>RotateTime=23:00</CODE><BR></P>
</DL>
</P>
<P>
<DL>
<DT><B>Example 4 - rotate every Sunday at 00:59:</B><DD><P><CODE>[FileAcct]</CODE><BR>
<CODE>DetailFile=/var/log/gk/cdr.log</CODE><BR>
<CODE>Rotate=weekly</CODE><BR>
<CODE>RotateDay=Sun</CODE><BR>
<CODE>RotateTime=00:59</CODE><BR></P>
</DL>
</P>
<P>
<DL>
<DT><B>Example 5 - rotate on the last day of each month:</B><DD><P><CODE>[FileAcct]</CODE><BR>
<CODE>DetailFile=/var/log/gk/cdr.log</CODE><BR>
<CODE>Rotate=monthly</CODE><BR>
<CODE>RotateDay=31</CODE><BR>
<CODE>RotateTime=23:00</CODE><BR></P>
</DL>
</P>
<P>
<DL>
<DT><B>Example 6 - rotate per every 10000 CDRs:</B><DD><P><CODE>[FileAcct]</CODE><BR>
<CODE>DetailFile=/var/log/gk/cdr.log</CODE><BR>
<CODE>Rotate=L10000</CODE><BR></P>
</DL>
</P>
<P>
<DL>
<DT><B>Example 7 - rotate per every 10 kilobytes:</B><DD><P><CODE>[FileAcct]</CODE><BR>
<CODE>DetailFile=/var/log/gk/cdr.log</CODE><BR>
<CODE>Rotate=S10k</CODE><BR></P>
</DL>
</P>

</LI>
</UL>
</P>

<H2><A NAME="radacct"></A> <A NAME="ss9.3">9.3</A> <A HREF="manual.html#toc9.3">Section [RadAcct]</A>
</H2>

<P>This accounting module sends accounting data to a RADIUS server. Module
configuration is almost the same as for RADIUS authenticators (see
<A HREF="manual-8.html#radauth">[RadAuth]</A> and 
<A HREF="manual-8.html#radaliasauth">[RadAliasAuth]</A>
for more details on the parameters).</P>
<P>
<UL>
<LI><CODE>Servers=SERVER1[:AUTH_PORT:ACCT_PORT[:SECRET]];SERVER2[:AUTH_PORT:ACCT_PORT[:SECRET]];...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>RADIUS servers to send accounting data to. If no port information is given,
a port number from <CODE>DefaultAcctPort</CODE> is be used. If no secret is set, 
the default shared secret from <CODE>SharedSecret</CODE> is used. Server names may be
specified by IP address or DNS name.</P>
<P>
<DL>
<DT><B>Sample <CODE>Servers</CODE> lines:</B><DD><P><CODE>Servers=192.168.1.1</CODE><BR>
<CODE>Servers=192.168.1.1:1645:1646</CODE><BR>
<CODE>Servers=192.168.1.1:1645:1646:secret1</CODE><BR>
<CODE>Servers=radius1.mycompany.com:1812:1813</CODE><BR>
<CODE>Servers=radius1.mycompany.com;radius2.mycompany.com</CODE><BR>
<CODE>Servers=radius1.mycompany.com:1812:1813:secret1;radius2.mycompany.com:1812:1813:secret2</CODE><BR></P>
</DL>
</P>

</LI>
<LI><CODE>LocalInterface=IP_OR_FQDN</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Specific local network interface that GnuGk should
use in order to communicate with RADIUS servers.</P>

</LI>
<LI><CODE>RadiusPortRange=10000-11000</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>By default (if this option is not set) GnuGk 
allocates ports dynamically as specified by the operating system.
In order to restrict the ports which GnuGk will use then configure this parameter appropriately.</P>

</LI>
<LI><CODE>DefaultAcctPort=PORT_NO</CODE><BR>
Default: <CODE>1813</CODE><BR>
<P>Default port number to be used for RADIUS accounting requests.
May be overridden by the <CODE>Servers</CODE> attribute.</P>

</LI>
<LI><CODE>SharedSecret=SECRET</CODE><BR>
Default: <CODE>N/A (empty string)</CODE><BR>
<P>A secret used to authenticate this GnuGk (NAS client) to a RADIUS
server. It should be a cryptographically strong password. This is the default
value used if no server-specific secret is set in the <CODE>Servers</CODE>.
If <CODE>EncryptAllPasswords</CODE> is enabled, or a <CODE>KeyFilled</CODE> variable is defined
in this section, the password is in encrypted form and should be created using
the <CODE>addpasswd</CODE> utility.</P>

</LI>
<LI><CODE>RequestTimeout=TIMEOUT_MS</CODE><BR>
Default: <CODE>2000</CODE> (milliseconds)<BR>
<P>Timeout (milliseconds) for a RADIUS server response to a request
sent by GnuGk. If no response is received within this time period,
then the next RADIUS server is queried.</P>

</LI>
<LI><CODE>IdCacheTimeout=TIMEOUT_MS</CODE><BR>
Default: <CODE>9000</CODE> (milliseconds)<BR>
<P>Timeout (milliseconds) for RADIUS request 8-bit identifiers to be
unique.</P>

</LI>
<LI><CODE>SocketDeleteTimeout=TIMEOUT_MS</CODE><BR>
Default: <CODE>60000</CODE> (milliseconds) - 60 s<BR>
<P>Timeout for unused RADIUS sockets to be closed.</P>

</LI>
<LI><CODE>RequestRetransmissions=NUMBER</CODE><BR>
Default: <CODE>2</CODE><BR>
<P>How many times a single RADIUS request is transmitted to every
configured RADIUS server (if no response is received).</P>

</LI>
<LI><CODE>RoundRobinServers=BOOLEAN</CODE><BR>
Default: <CODE>1</CODE><BR>
<P>RADIUS requests retransmission method.</P>
<P>If set to 1, RADIUS request
is transmitted in the following way (until response is received):
<BLOCKQUOTE><CODE>
<PRE>
Server #1 Attempt #1, Server #2 Attempt #1, ..., Server #N Attempt #1
...
Server #1 Attempt #RequestRetransmissions, ..., Server #1 Attempt #RequestRetransmissions
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>If set to 0, the following sequence is preserved:
<BLOCKQUOTE><CODE>
<PRE>
Server #1 Attempt #1, ..., Server #1 Attempt #RequestRetransmissions
...
Server #N Attempt #1, ..., Server #N Attempt #RequestRetransmissions
</PRE>
</CODE></BLOCKQUOTE>
</P>

</LI>
<LI><CODE>AppendCiscoAttributes=BOOLEAN</CODE><BR>
Default: <CODE>0</CODE><BR>
<P>If set, Cisco Vendor Specific RADIUS attributes are included
in RADIUS requests (h323-conf-id,h323-call-origin,h323-call-type).</P>

</LI>
<LI><CODE>TimestampFormat=ISO8601</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Format of timestamp strings sent in RADIUS attributes. If this setting
is not specified, the global one from the main gatekeeper section is applied.</P>

</LI>
<LI><CODE>UseDialedNumber=BOOLEAN</CODE><BR>
Default: <CODE>0</CODE><BR>
<P>Select Called-Station-Id number type between the original one (as dialed
by the user) - <CODE>UseDialedNumber=1</CODE> - and the rewritten one - <CODE>UseDialedNumber=0</CODE>.</P>

</LI>
</UL>
</P>


<H3>[RadAcct] Accounting-Request RADIUS Attributes</H3>

<P>For an Accounting-Request, the following RADIUS attributes are included
within Accounting-Request packets. Each attribute 
is followed by a list of accounting event types.</P>
<P>
<UL>
<LI><CODE>Acct-Status-Type (start,update,stop,on,off)</CODE><BR>
<P>The accounting event type (Start, Interim-Update, Stop, 
Accounting-On, Accounting-Off).</P>

</LI>
<LI><CODE>NAS-IP-Address (start,update,stop,on,off)</CODE><BR>
<P>An IP address of the gatekeeper.</P>

</LI>
<LI><CODE>NAS-Identifier (start,update,stop,on,off)</CODE><BR>
<P>The gatekeeper identifier (Name= gk parameter).</P>

</LI>
<LI><CODE>NAS-Port-Type (start,update,stop,on,off)</CODE><BR>
<P>Fixed value Virtual.</P>

</LI>
<LI><CODE>Service-Type (start,update,stop)</CODE><BR>
<P>Fixed value Login-User.</P>

</LI>
<LI><CODE>Acct-Session-Id (start,update,stop)</CODE><BR>
<P>A unique accounting session identifier string.</P>

</LI>
<LI><CODE>User-Name (start,update,stop)</CODE><BR>
<P>Calling party's account name.</P>

</LI>
<LI><CODE>Framed-IP-Address (start,update,stop)</CODE><BR>
<P>An IP address for the calling party. Either an endpoint call signaling
address or a remote socket address for the signaling channel.</P>

</LI>
<LI><CODE>Acct-Session-Time (update,stop)</CODE><BR>
<P>Call duration (seconds) - for interim-update events this is the actual
duration.</P>

</LI>
<LI><CODE>Calling-Station-Id (start,update,stop)</CODE><BR>
<P>Calling party's number.</P>

</LI>
<LI><CODE>Called-Station-Id (start,update,stop)</CODE><BR>
<P>Called party's number.</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, h323-gw-id (start,update,stop)</CODE><BR>
<P>The same as NAS-Identifier.</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, h323-conf-id (start,update,stop)</CODE><BR>
<P>H.323 Conference ID for the call.</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, h323-call-origin (start,update,stop)</CODE><BR>
<P>Fixed string "proxy".</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, h323-call-type (start,update,stop)</CODE><BR>
<P>Fixed string "VoIP".</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, h323-setup-time (start,update,stop)</CODE><BR>
<P>Timestamp when the Q.931 Setup message has been received by the gk.</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, h323-connect-time (update,stop)</CODE><BR>
<P>Timestamp when the call has been connected (Q.931 Setup message 
has been received or ACF has been sent in direct signaling mode).</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, h323-disconnect-time (stop)</CODE><BR>
<P>Timestamp when the call has been disconnected (ReleaseComplete or DRQ
has been received).</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, h323-disconnect-cause (stop)</CODE><BR>
<P>Q.931 two digit hexadecimal disconnect cause.</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, h323-remote-address (start,update,stop)</CODE><BR>
<P>An IP address of the called party (if known).</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, Cisco-AVPair, h323-ivr-out (start, update, stop)</CODE><BR>
<P>h323-call-id variable that contains an H.323 Call Identifier.
The syntax is as follows: "h323-ivr-out=h323-call-id:123FDE 12348765 9abc1234 12".</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, Cisco-AVPair, h323-ivr-out (start, update, stop)</CODE><BR>
<P>rewritten-e164-num contains the rewritten called party's number
(independent of the setting of the UseDialedNumber switch).</P>

</LI>
<LI><CODE>Acct-Delay-Time (start,update,stop)</CODE><BR>
<P>Amount of time (seconds) the gatekeeper is trying to send the request.
Currently always 0.</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, Cisco-AVPair, h323_rtp_proxy (stop)</CODE><BR>
<P>Proxy mode of call (0=off, 1=on)</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTP_source_IP (stop)</CODE><BR>
<P>RTCP source report data</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTP_destination_IP (stop)</CODE><BR>
<P>RTCP source report data</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_source_packet_count (stop)</CODE><BR>
<P>RTCP source report data</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_source_packet_lost (stop)</CODE><BR>
<P>RTCP source report data</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_source_jitter (stop)</CODE><BR>
<P>RTCP source report data</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_source_sdes_XXX (stop)</CODE><BR>
<P>RTCP source report data (for each source description (sdes))</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_destination_packet_count (stop)</CODE><BR>
<P>RTCP destination report data</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_destination_packet_lost (stop)</CODE><BR>
<P>RTCP destination report data</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_destination_jitter (stop)</CODE><BR>
<P>RTCP destination report data</P>

</LI>
<LI><CODE>(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_destination_sdes_XXX (stop)</CODE><BR>
<P>RTCP destination report data (for each source description (sdes))</P>

</LI>
</UL>
</P>

<H3>[RadAcct] Accounting-Response Radius Attributes</H3>

<P>The gatekeeper ignores all attributes present in Accounting-Response
Radius packets.</P>


<H2><A NAME="sqlacct"></A> <A NAME="ss9.4">9.4</A> <A HREF="manual.html#toc9.4">Section [SQLAcct]</A>
</H2>

<P>This accounting module stores accounting information directly
to a SQL database. Many configuration settings are common with
other SQL modules.</P>
<P>
<UL>
<LI><CODE>Driver=MySQL | PostgreSQL | Firebird | ODBC | SQLite</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>SQL database driver to use. Currently, <CODE>MySQL</CODE>, <CODE>PostgreSQL</CODE>, <CODE>Firebird</CODE>, <CODE>ODBC</CODE> and <CODE>SQLite</CODE> drivers
are implemented.</P>

</LI>
<LI><CODE>Host=DNS[:PORT] | IP[:PORT]</CODE><BR>
Default: <CODE>localhost</CODE><BR>
<P>SQL server host address. Can be in the form of <CODE>DNS[:PORT]</CODE> or <CODE>IP[:PORT]</CODE>.
Examples: <CODE>sql.mycompany.com</CODE> or <CODE>sql.mycompany.com:3306</CODE> or <CODE>192.168.3.100</CODE>.</P>

</LI>
<LI><CODE>Database=billing</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>The database name to connect to.</P>

</LI>
<LI><CODE>Username=gnugk</CODE><BR>
<P>The username used to connect to the database.</P>

</LI>
<LI><CODE>Password=secret</CODE><BR>
<P>The password used to connect to the database.
If the password is not specified, a database connection attempt 
without any password will be made.
If <CODE>EncryptAllPasswords</CODE> is enabled, or a <CODE>KeyFilled</CODE> variable is defined
in this section, the password is in an encrypted form and should be created 
using the <CODE>addpasswd</CODE> utility.</P>

</LI>
<LI><CODE>StartQuery=INSERT ...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Defines SQL query used to insert a new call record to the database. The query
is parametrized - that means parameter replacement is made before each query
is executed. Parameter placeholders are denoted by % character and can be one
letter (like %u) or whole strings (like %{src-info}). Specify %% to embed 
a percent character inside the query string (like <B>%%</B>).
For <CODE>SQLAcct</CODE> the following parameters are defined:
<UL>
<LI><CODE>%g</CODE> - gatekeeper name</LI>
<LI><CODE>%n</CODE> - call number (not unique after gatekeeper restart)</LI>
<LI><CODE>%d</CODE> - call duration (seconds)</LI>
<LI><CODE>%t</CODE> - total call duration (from Setup to Release Complete)</LI>
<LI><CODE>%c</CODE> - Q.931 disconnect cause (<B>hexadecimal</B> integer)</LI>
<LI><CODE>%r</CODE> - who disconnected the call (-1 - unknown, 0 - the gatekeeper, 1 - the caller, 2 - the callee)</LI>
<LI><CODE>%p</CODE> - PDD (Post Dial Delay) in seconds</LI>
<LI><CODE>%s</CODE> - unique (for this gatekeeper) call (Acct-Session-Id)</LI>
<LI><CODE>%u</CODE> - H.323 ID of the calling party</LI>
<LI><CODE>%{gkip}</CODE> - IP address of the gatekeeper</LI>
<LI><CODE>%{CallId}</CODE> - H.323 call identifier (16 hex 8-bit digits)</LI>
<LI><CODE>%{ConfId}</CODE> - H.323 conference identifier (16 hex 8-bit digits)</LI>
<LI><CODE>%{setup-time}</CODE> - timestamp string for Q.931 Setup message</LI>
<LI><CODE>%{alerting-time}</CODE> - timestamp string for Q.931 Alerting message</LI>
<LI><CODE>%{connect-time}</CODE> - timestamp string for a call connected event</LI>
<LI><CODE>%{disconnect-time}</CODE> - timestamp string for a call disconnect event</LI>
<LI><CODE>%{ring-time}</CODE> - time a remote phone was ringing for (from Alerting till Connect or Release Complete)</LI>
<LI><CODE>%{caller-ip}</CODE> - signaling IP address of the caller</LI>
<LI><CODE>%{caller-port}</CODE> - signaling port of the caller</LI>
<LI><CODE>%{callee-ip}</CODE> - signaling IP address of the called party</LI>
<LI><CODE>%{callee-port}</CODE> - signaling port of the called party</LI>
<LI><CODE>%{src-info}</CODE> - a colon separated list of source aliases</LI>
<LI><CODE>%{dest-info}</CODE> - a colon separated list of destination aliases</LI>
<LI><CODE>%{Calling-Station-Id}</CODE> - calling party number</LI>
<LI><CODE>%{Called-Station-Id}</CODE> - called party number (rewritten Dialed-Number)</LI>
<LI><CODE>%{Dialed-Number}</CODE> - dialed number (as received from the calling party)</LI>
<LI><CODE>%{caller-epid}</CODE> - endpoint identifier of the calling party</LI>
<LI><CODE>%{callee-epid}</CODE> - endpoint identifier of the called party</LI>
<LI><CODE>%{call-attempts}</CODE> - number of attempts to establish the calls (with failover this can be > 1)</LI>
<LI><CODE>%{last-cdr}</CODE> - is this the last CDR for this call ? (0 / 1) only when using failover this can be 0</LI>
<LI><CODE>%{media-oip}</CODE> - caller's RTP media IP (only for H.245 routed/tunneled calls)</LI>
<LI><CODE>%{codec}</CODE> - audio codec used during the call (only for H.245 routed/tunneled calls)</LI>
<LI><CODE>%{bandwidth}</CODE> - bandwidth for this call</LI>
<LI><CODE>%{client-auth-id}</CODE> - an ID provided to GnuGk when authenticating the call (through SqlAuth)</LI>
</UL>
</P>
<P>Sample query string:
<BLOCKQUOTE><CODE>
<PRE>
INSERT INTO call (gkname, sessid, username, calling, called) 
        VALUES ('%g', '%s', '%u', '%{Calling-Station-Id}', '%{Called-Station-Id}')
</PRE>
</CODE></BLOCKQUOTE>
</P>

</LI>
<LI><CODE>StartQueryAlt=INSERT ...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Defines a SQL query used to insert a new call record to the database in case
the <CODE>StartQuery</CODE> failed for some reason (the call already exists, for example).
The syntax and parameters are the same as for <CODE>StartQuery</CODE>.</P>

</LI>
<LI><CODE>UpdateQuery=UPDATE ...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Defines a SQL query used to update a call record in the database with the current 
call state. The syntax and parameters are the same as for <CODE>StartQuery</CODE>.</P>
<P>Sample query string:
<BLOCKQUOTE><CODE>
<PRE>
UPDATE call SET duration = %d WHERE gkname = '%g' AND sessid = '%s'
</PRE>
</CODE></BLOCKQUOTE>
</P>

</LI>
<LI><CODE>StopQuery=UPDATE ...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Defines SQL query used to update a call record in the database when the call
is finished (disconnected). The syntax and parameters are the same 
as for <CODE>StartQuery</CODE>.</P>
<P>Sample query string:
<BLOCKQUOTE><CODE>
<PRE>
UPDATE call SET duration = %d, dtime = '%{disconnect-time}' WHERE gkname = '%g' AND sessid = '%s'
</PRE>
</CODE></BLOCKQUOTE>
</P>

</LI>
<LI><CODE>StopQueryAlt=INSERT ...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Defines a SQL query used to update call record in the database when the call
is finished (disconnected) in case the regular <CODE>StopQuery</CODE> failed (because
the call record does not yet exist, for example). The syntax and parameters 
are the same as for <CODE>StartQuery</CODE>.</P>
<P>Sample query string:
<BLOCKQUOTE><CODE>
<PRE>
INSERT INTO call (gkname, sessid, username, calling, called, duration) 
        VALUES ('%g', '%s', '%u', '%{Calling-Station-Id}', '%{Called-Station-Id}', %d)
</PRE>
</CODE></BLOCKQUOTE>
</P>

</LI>
<LI><CODE>TimestampFormat=MySQL</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Format of timestamp strings used in queries. If this setting
is not specified, the global one from the main gatekeeper section is used.</P>

</LI>
<LI><CODE>MinPoolSize=5</CODE><BR>
Default: <CODE>1</CODE><BR>
<P>Number of concurrent SQL connections in the pool. The first available connection
in the pool is used to store accounting data.</P>

</LI>
</UL>
</P>

<H3><A NAME="mysqlscheme"></A> A Sample MySQL Schema</H3>

<P>The SQLAcct module is designed to adapt to whatever database structure you already have. You can define all queries so they fit your existing tables.
Here is an example of what those tables might look like in MySQL and which you can use as a starting point.</P>
<P>Create a new database; here we use the name 'GNUGK':</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
create database GNUGK;
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Then create a table in this database to store you accounting data; we call the table 'CDR'.</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
create table GNUGK.CDR (
        gatekeeper_name varchar(255),
        call_number int zerofill,
        call_duration mediumint unsigned zerofill,
                index duration_idx (call_duration),
        disconnect_cause smallint unsigned zerofill,
                index dcc_idx (disconnect_cause),
        acct_session_id varchar(255),
        h323_id varchar(255),
        gkip varchar(15),
        CallId varchar(255),
        ConfID varchar(255),
        setup_time datetime,
        connect_time datetime,
        disconnect_time datetime,
        caller_ip varchar(15),
                index srcip_idx (caller_ip),
        caller_port smallint unsigned zerofill,
        callee_ip varchar(15),
                index destip_idx (callee_ip),
        callee_port smallint unsigned zerofill,
        src_info varchar(255),
        dest_info varchar(255),
        Calling_Station_Id varchar(255),
        Called_Station_Id varchar(255),
                index dialednumber_idx (Called_Station_Id (20)),
        Dialed_Number varchar(255)
);
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Then you need to create a username for accessing the data.</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
mysql> GRANT delete,insert,select,update ON GNUGK.* TO 'YourDesiredUsername'@'localhost' IDENTIFIED BY 'APassword';
mysql> flush privileges;
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>With this command you will permit access to the data only from the local server. If you need to access the data from any other computer then you have to set the proper security options.</P>
<P>For example, to permit access from the 192.168.1.0/24 network:</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
mysql> GRANT delete,insert,select,update ON GNUGK.* TO 'YourDesiredUsername'@'192.168.1.%' IDENTIFIED BY 'APassword';
mysql> flush privileges;
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Then you can add the following settings into your gnugk.ini file to insert and update the history of the calls into your database. </P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
[Gatekeeper::Acct]
SQLAcct=optional;start,stop,update
FileAcct=sufficient;stop

[FileAcct]
DetailFile=Add your desire path here something like /var/log/cdr.log
StandardCDRFormat=0
CDRString=%g|%n|%d|%c|%s|%u|%{gkip}|%{CallId}|%{ConfId}|%{setup-time}|%{connect-time}|%{disconnect-time}|%{caller-ip}|%{caller-port}|%{callee-ip}|%{callee-port}|%{src-info}|%{dest-info}|%{Calling-Station-Id}|%{Called-Station-Id}|%{Dialed-Number}
Rotate=daily
RotateTime=23:59

[SQLAcct]
Driver=MySQL
Database=GNUGK
Username=YourDesiredUsername
Password=APassword
StartQuery= insert into CDR (gatekeeper_name, call_number, call_duration, disconnect_cause, acct_session_id, h323_id, gkip, CallId, ConfId, setup_time, connect_time, disconnect_time, caller_ip, caller_port, callee_ip, callee_port, src_info, dest_info, Calling_Station_Id, Called_Station_Id, Dialed_Number) values ('%g', '%n', %d, %c, '%s', '%u', '%{gkip}', '%{CallId}', '%{ConfId}', '%{setup-time}', '%{connect-time}', '%{disconnect-time}', '%{caller-ip}', '%{caller-port}', '%{callee-ip}', '%{callee-port}', '%{src-info}', '%{dest-info}', '%{Calling-Station-Id}', '%{Called-Station-Id}', '%{Dialed-Number}')

StartQueryAlt= insert into CDR (gatekeeper_name, call_number, call_duration, disconnect_cause, acct_session_id, h323_id, gkip, CallId, ConfID, setup_time, connect_time, disconnect_time, caller_ip, caller_port, callee_ip, callee_port, src_info, dest_info, Calling_Station_Id, Called_Station_Id, Dialed_Number) values ('%g', '%n', %d, %c, '%s', '%u', '%{gkip}', '%{CallId}', '%{ConfID}', '%{setup-time}', '%{connect-time}', '%{disconnect-time}', '%{caller-ip}', '%{caller-port}', '%{callee-ip}', '%{callee-port}', '%{src-info}', '%{dest-info}', '%{Calling-Station-Id}', '%{Called-Station-Id}', '%{Dialed-Number}')

UpdateQuery= update CDR set call_duration=%d where gatekeeper_name='%g' and acct_session_id='%s'

StopQuery= update CDR set call_duration=%d, disconnect_cause=%c, disconnect_time='%{disconnect-time}' where gatekeeper_name='%g' and acct_session_id='%s'

StopQueryAlt= insert into CDR (gatekeeper_name, call_number, call_duration, disconnect_cause, acct_session_id, h323_id, gkip, CallId, ConfID, setup_time, connect_time, disconnect_time, caller_ip, caller_port, callee_ip, callee_port, src_info, dest_info, Calling_Station_Id, Called_Station_Id, Dialed_Number) values ('%g STOP Alt', '%n', %d, %c, '%s', '%u', '%{gkip}', '%{CallId}', '%{ConfID}', '%{setup-time}', '%{connect-time}', '%{disconnect-time}', '%{caller-ip}', '%{caller-port}', '%{callee-ip}', '%{callee-port}', '%{src-info}', '%{dest-info}', '%{Calling-Station-Id}', '%{Called-Station-Id}', '%{Dialed-Number}')

TimestampFormat=MySQL
</PRE>
</CODE></BLOCKQUOTE>
</P>


<H2><A NAME="statusacct"></A> <A NAME="ss9.5">9.5</A> <A HREF="manual.html#toc9.5">Section [StatusAcct]</A>
</H2>

<P>This accounting module sends all accounting information to the
status port where it can be used to interface to
external systems in real time.</P>
<P>
<UL>
<LI><CODE>StartEvent=CALL|Start|%{CallId}</CODE><BR>
Default: <CODE>CALL|Start|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}</CODE><BR>
<P>Defines the event to display for a new call. The string is parametrized
with the same variables as the other accounting modules (See 
<A HREF="#sqlacct">[SQLAcct]</A>).</P>

</LI>
<LI><CODE>StopEvent=CALL|Stop|%{CallId}</CODE><BR>
Default: <CODE>CALL|Stop|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}</CODE><BR>
<P>Defines the event when a call is finished (disconnected). The syntax and parameters are the same as for <CODE>StartEvent</CODE>. This event is equivalent to the old status port CDR event, but more flexible.</P>

</LI>
<LI><CODE>UpdateEvent=CALL|Update|%{CallId}</CODE><BR>
Default: <CODE>CALL|Update|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}</CODE><BR>
<P>Defines event used to update the current call state. The syntax and parameters are the same as for <CODE>StartEvent</CODE>.</P>

</LI>
<LI><CODE>ConnectEvent=CALL|Connect|%{CallId}</CODE><BR>
Default: <CODE>CALL|Connect|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}</CODE><BR>
<P>Defines the event when a call is connected. The syntax and parameters are the same as for <CODE>StartEvent</CODE>.</P>

</LI>
<LI><CODE>TimestampFormat=MySQL</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Format of timestamp strings used in events. If this setting
is not specified, the global one from the main gatekeeper section is used.</P>

</LI>
</UL>
</P>

<H2><A NAME="syslogacct"></A> <A NAME="ss9.6">9.6</A> <A HREF="manual.html#toc9.6">Section [SyslogAcct]</A>
</H2>

<P>This accounting module sends accounting information to the
Unix syslog and is not available on Windows. The local syslog daemon will then route the messages according to its configuration, generally specified in /etc/syslog.conf.</P>
<P>
<UL>
<LI><CODE>SyslogFacility=LOG_LOCAL1</CODE><BR>
Default: <CODE>LOG_USER</CODE><BR>
<P>Set the syslog facility to one of LOG_USER, LOG_DAEMON, LOG_AUTH, LOG_LOCAL0, LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3, LOG_LOCAL4, LOG_LOCAL5, LOG_LOCAL6, LOG_LOCAL7.</P>

</LI>
<LI><CODE>SyslogLevel=LOG_NOTICE</CODE><BR>
Default: <CODE>LOG_INFO</CODE><BR>
<P>Set the syslog level to LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO or LOG_DEBUG.</P>

</LI>
<LI><CODE>StartEvent=CALL|Start|%{CallId}</CODE><BR>
Default: <CODE>CALL|Start|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}</CODE><BR>
<P>Defines the event to display for a new call. The string is parametrized
with the same variables as the other accounting modules (See 
<A HREF="#sqlacct">[SQLAacct]</A>).</P>

</LI>
<LI><CODE>StopEvent=CALL|Stop|%{CallId}</CODE><BR>
Default: <CODE>CALL|Stop|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}</CODE><BR>
<P>Defines the event when a call is finished (disconnected). The syntax and parameters are the same as for <CODE>StartEvent</CODE>. This event is equivalent to the old status port CDR event, but more flexible.</P>

</LI>
<LI><CODE>UpdateEvent=CALL|Update|%{CallId}</CODE><BR>
Default: <CODE>CALL|Update|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}</CODE><BR>
<P>Defines event used to update the current call state. The syntax and parameters are the same as for <CODE>StartEvent</CODE>.</P>

</LI>
<LI><CODE>ConnectEvent=CALL|Connect|%{CallId}</CODE><BR>
Default: <CODE>CALL|Connect|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}</CODE><BR>
<P>Defines the event when a call is connected. The syntax and parameters are the same as for <CODE>StartEvent</CODE>.</P>

</LI>
<LI><CODE>TimestampFormat=MySQL</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Format of timestamp strings used in events. If this setting
is not specified, the global one from the main gatekeeper section is used.</P>

</LI>
</UL>

</P>
<HR>
<A HREF="manual-10.html">Next</A>
<A HREF="manual-8.html">Previous</A>
<A HREF="manual.html#toc9">Contents</A>
</BODY>
</HTML>