The following sections in the config file can be used to configure accounting.
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 [Gatekeeper::Auth]).
All CDRs are also sent to the status port and can be used by external applications.
acctmod=actions
<acctmod> := FileAcct | RadAcct | SQLAcct | StatusAcct | SyslogAcct | CapacityControl | ...
<actions> := <control>[;<event>,<event>,...]
<control> := optional | required | sufficient | alternative
<event> := start | stop | alert | connect | update | register | unregister | on | off
start
- a call has been started and a Setup message has been received (only available in routed mode)alert
- a call is alerting (only available in routed mode)connect
- a call has been connected (only available in routed mode)update
- 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 AcctUpdateInterval variable from the
[CallTable]
sectionregister
- an endpoint has registeredunregister
- an endpoint has unregisteredstop
- a call has been disconnected (removed from the gatekeeper call table)on
- the gatekeeper has been startedoff
- the gatekeeper has been shut downok
- the event has been logged successfully by this modulefail
- the module failed to log the eventnext
- the event has not been logged by this module, because the module
is not configured for/does not support this event typerequired
- 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.optional
- 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.sufficient
- 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.alternative
- 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.Currently supported accounting modules:
FileAcct
A plain Call Detail Report ("CDR") text file logger. It outputs CDR status data to a specified text file. This module only supports the stop accounting event. Configuration settings are read from [FileAcct] section.
RadAcct
This module performs RADIUS accounting. It supports the event types start, stop, update, on, off. See section [RadAcct] for configuration details.
SQLAcct
This module performs direct SQL accounting. It supports (start, connect, stop, update, alert, register, unregister) event types. See section [SQLAcct] for configuration details.
StatusAcct
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, alert, register, unregister) event types. See section [StatusAcct] for configuration details.
SyslogAcct
This module logs all accounting events to the Unix syslog. It supports (start, connect, stop, update) event types. See section [SyslogAcct] for configuration details.
CapacityControl
This module performs inbound call volume logging, required for the CapacityControl
authentication module to work correctly. See the section
[CapacityControl]
for details.
default
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:
default=<status>[;<event>,<event>,...]
<status> := accept | fail
<event> := start | stop | alert | connect | update | register | unregister | on | off
Sample configuration #1 (try to log call start/stop with RADIUS server, and always write a CDR to a text file):
RadAcct=optional;start,stop
FileAcct=required
Sample configuration #2 (try to log call start/stop with RADIUS server, if it fails use a CDR log file):
RadAcct=alternative;start,stop
FileAcct=sufficient;stop
default=accept
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):
RadAcct=alternative;start,stop
FileAcct=sufficient;stop
default=fail;start
Most accounting modules let you customize the CDR data they store. They use a common set of parameters to define the CDR string.
Parameters are specified using %
character and can be one letter
(like %n
) or longer (like %{CallId}
). Any remaining characters that
are not parameter names are simply copied to the final CDR string. The following
parameters are recognized:
%g
- gatekeeper name%n
- call number (not unique after gatekeeper restart)%d
- call duration (seconds)%t
- total call duration (from Setup to Release Complete)%c
- Q.931 disconnect cause (decimal integer) as originally received%{cause-translated}
- Q.931 disconnect cause (decimal integer) after translation rules%r
- who disconnected the call (-1 - unknown, 0 - the gatekeeper, 1 - the caller, 2 - the callee)%p
- PDD (Post Dial Delay) in seconds%s
- unique (for this gatekeeper) session identifier (Acct-Session-Id)%u
- H.323 ID of the calling party%{gkip}
- IP address of the gatekeeper%{CallId}
- H.323 call identifier (16 hex 8-bit digits)%{ConfId}
- H.323 conference identifier (16 hex 8-bit digits)%{CallLink}
- Linked H.323 conference identifier (billing account for H.450 call transfer)%{setup-time}
- timestamp string for Q.931 Setup message%{alerting-time}
- timestamp string for Q.931 Alerting message%{connect-time}
- timestamp string for a call connected event%{disconnect-time}
- timestamp string for a call disconnect event%{ring-time}
- time a remote phone was ringing for (from Alerting till Connect or Release Complete)%{caller-ip}
- signaling IP address of the caller%{caller-port}
- signaling port of the caller%{callee-ip}
- signaling IP address of the called party%{callee-port}
- signaling port of the called party%{src-info}
- a colon separated list of source aliases%{dest-info}
- a colon separated list of destination aliases%{Calling-Station-Id}
- calling party number%{Called-Station-Id}
- called party number (rewritten)%{Dialed-Number}
- dialed number (as received from the calling party)%{caller-epid}
- endpoint identifier of the calling party%{callee-epid}
- endpoint identifier of the called party%{call-attempts}
- number of attempts to establish the calls (with failover this can be > 1)%{last-cdr}
- is this the last CDR for this call ? (0 / 1) only when using failover this can be 0%{media-oip}
- caller's RTP media IP (only for H.245 routed/tunneled calls, not for encrypted calls or when firewall traversal is used)%{codec}
- audio codec used during the call (only for H.245 routed/tunneled calls)%{bandwidth}
- bandwidth for this call%{client-auth-id}
- a 64 bit integer ID provided to GnuGk when authenticating the call (through SQLAuth)%{caller-vendor}
- vendor and version info of the calling endpoint%{callee-vendor}
- vendor and version info of the called endpointThis 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).
DetailFile=FULL_PATH_AND_FILENAME
N/A
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.
StandardCDRFormat=0
1
Use a CDR format compatible with the status interface CDR format (1
)
or build a custom CDR string from the CDRString parametrized string.
The StandardCDRFormat is equivalent to this definition:
TimestampFormat=RFC822
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;
CDRString=%s|%g|%u|%{Calling-Station-Id}|%{Called-Station-Id}|%d|%c
N/A
If StandardCDRFormat is disabled (0) or not specified at all, this parametrized string instructs the gatekeeper on how to build a custom CDR. You can use the common CDR parameters to define what to include into your CDRs.
TimestampFormat=Cisco
N/A
Format of timestamp strings printed in CDR strings. If this setting is not specified, the global one from the main gatekeeper section is used.
Rotate=hourly | daily | weekly | monthly | L... | S...
N/A
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.
In addition, rotation per number of CDRs written (L...) and per file size (S...)
is supported. The L
prefix specifies a number of CDR lines written,
the S
prefix specifies CDR file size. k
and m
suffixes can
be used to specify thousands (kilobytes) and millions (megabytes).
[FileAcct]
DetailFile=/var/log/gk/cdr.log
[FileAcct]
DetailFile=/var/log/gk/cdr.log
Rotate=hourly
RotateTime=45
[FileAcct]
DetailFile=/var/log/gk/cdr.log
Rotate=daily
RotateTime=23:00
[FileAcct]
DetailFile=/var/log/gk/cdr.log
Rotate=weekly
RotateDay=Sun
RotateTime=00:59
[FileAcct]
DetailFile=/var/log/gk/cdr.log
Rotate=monthly
RotateDay=31
RotateTime=23:00
[FileAcct]
DetailFile=/var/log/gk/cdr.log
Rotate=L10000
[FileAcct]
DetailFile=/var/log/gk/cdr.log
Rotate=S10k
This accounting module sends accounting data to a RADIUS server. Module configuration is almost the same as for RADIUS authenticators (see [RadAuth] and [RadAliasAuth] for more details on the parameters).
Servers=SERVER1[:AUTH_PORT:ACCT_PORT[:SECRET]];SERVER2[:AUTH_PORT:ACCT_PORT[:SECRET]];...
N/A
RADIUS servers to send accounting data to. If no port information is given,
a port number from DefaultAcctPort
is be used. If no secret is set,
the default shared secret from SharedSecret
is used. Server names may be
specified by IP address or DNS name. IPv6 addresses must always be written in brackets.
Servers
lines:Servers=192.168.1.1
Servers=192.168.1.1:1645:1646
Servers=192.168.1.1:1645:1646:secret1
Servers=radius1.mycompany.com:1812:1813
Servers=radius1.mycompany.com;radius2.mycompany.com
Servers=radius1.mycompany.com:1812:1813:secret1;radius2.mycompany.com:1812:1813:secret2
Servers=[2501:4f3:61:2143::2]
Servers=[2501:4f3:61:2143::2]:1645
Servers=[2501:4f3:61:2143::2]:1645:1646
Servers=[2501:4f3:61:2143::2]:1645:1646:secret1
Servers=[2501:4f3:61:2143::2]:1645:1646:secret1;[2501:4f3:61:2143::3]:1645:1646:secret2
LocalInterface=IP_OR_FQDN
N/A
Specific local network interface that GnuGk should use in order to communicate with RADIUS servers.
RadiusPortRange=10000-11000
N/A
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.
DefaultAcctPort=PORT_NO
1813
Default port number to be used for RADIUS accounting requests.
May be overridden by the Servers
attribute.
SharedSecret=SECRET
N/A (empty string)
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 Servers
.
If EncryptAllPasswords
is enabled, or a KeyFilled
variable is defined
in this section, the password is in encrypted form and should be created using
the addpasswd
utility.
RequestTimeout=TIMEOUT_MS
2000
(milliseconds)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.
IdCacheTimeout=TIMEOUT_MS
9000
(milliseconds)Timeout (milliseconds) for RADIUS request 8-bit identifiers to be unique.
SocketDeleteTimeout=TIMEOUT_MS
60000
(milliseconds) - 60 sTimeout for unused RADIUS sockets to be closed.
RequestRetransmissions=NUMBER
2
How many times a single RADIUS request is transmitted to every configured RADIUS server (if no response is received).
RoundRobinServers=BOOLEAN
1
RADIUS requests retransmission method.
If set to 1, RADIUS request is transmitted in the following way (until response is received):
Server #1 Attempt #1, Server #2 Attempt #1, ..., Server #N Attempt #1
...
Server #1 Attempt #RequestRetransmissions, ..., Server #1 Attempt #RequestRetransmissions
If set to 0, the following sequence is preserved:
Server #1 Attempt #1, ..., Server #1 Attempt #RequestRetransmissions
...
Server #N Attempt #1, ..., Server #N Attempt #RequestRetransmissions
AppendCiscoAttributes=BOOLEAN
0
If set, Cisco Vendor Specific RADIUS attributes are included in RADIUS requests (h323-conf-id,h323-call-origin,h323-call-type).
TimestampFormat=ISO8601
N/A
Format of timestamp strings sent in RADIUS attributes. If this setting is not specified, the global one from the main gatekeeper section is applied.
UseDialedNumber=BOOLEAN
0
Select Called-Station-Id number type between the original one (as dialed
by the user) - UseDialedNumber=1
- and the rewritten one - UseDialedNumber=0
.
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.
Acct-Status-Type (start,update,stop,on,off)
The accounting event type (Start, Interim-Update, Stop, Accounting-On, Accounting-Off).
NAS-IP-Address (start,update,stop,on,off)
An IP address of the gatekeeper.
NAS-Identifier (start,update,stop,on,off)
The gatekeeper identifier (Name= gk parameter).
NAS-Port-Type (start,update,stop,on,off)
Fixed value Virtual.
Service-Type (start,update,stop)
Fixed value Login-User.
Acct-Session-Id (start,update,stop)
A unique accounting session identifier string.
User-Name (start,update,stop)
Calling party's account name.
Framed-IP-Address (start,update,stop)
An IP address for the calling party. Either an endpoint call signaling address or a remote socket address for the signaling channel.
Acct-Session-Time (update,stop)
Call duration (seconds) - for interim-update events this is the actual duration.
Calling-Station-Id (start,update,stop)
Calling party's number.
Called-Station-Id (start,update,stop)
Called party's number.
(optional) VSA: VendorId=Cisco, h323-gw-id (start,update,stop)
The same as NAS-Identifier.
(optional) VSA: VendorId=Cisco, h323-conf-id (start,update,stop)
H.323 Conference ID for the call.
(optional) VSA: VendorId=Cisco, h323-call-origin (start,update,stop)
Fixed string "proxy".
(optional) VSA: VendorId=Cisco, h323-call-type (start,update,stop)
Fixed string "VoIP".
(optional) VSA: VendorId=Cisco, h323-setup-time (start,update,stop)
Timestamp when the Q.931 Setup message has been received by the gk.
(optional) VSA: VendorId=Cisco, h323-connect-time (update,stop)
Timestamp when the call has been connected (Q.931 Setup message has been received or ACF has been sent in direct signaling mode).
(optional) VSA: VendorId=Cisco, h323-disconnect-time (stop)
Timestamp when the call has been disconnected (ReleaseComplete or DRQ has been received).
(optional) VSA: VendorId=Cisco, h323-disconnect-cause (stop)
Q.931 two digit hexadecimal disconnect cause.
(optional) VSA: VendorId=Cisco, h323-remote-address (start,update,stop)
An IP address of the called party (if known).
(optional) VSA: VendorId=Cisco, Cisco-AVPair, h323-ivr-out (start, update, stop)
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".
(optional) VSA: VendorId=Cisco, Cisco-AVPair, h323-ivr-out (start, update, stop)
rewritten-e164-num contains the rewritten called party's number (independent of the setting of the UseDialedNumber switch).
Acct-Delay-Time (start,update,stop)
Amount of time (seconds) the gatekeeper is trying to send the request. Currently always 0.
(optional) VSA: VendorId=Cisco, Cisco-AVPair, h323_rtp_proxy (stop)
Proxy mode of call (0=off, 1=on)
(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTP_source_IP (stop)
RTCP source report data
(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTP_destination_IP (stop)
RTCP source report data
(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_source_packet_count (stop)
RTCP source report data
(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_source_packet_lost (stop)
RTCP source report data
(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_source_jitter (stop)
RTCP source report data
(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_source_sdes_XXX (stop)
RTCP source report data (for each source description (sdes))
(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_destination_packet_count (stop)
RTCP destination report data
(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_destination_packet_lost (stop)
RTCP destination report data
(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_destination_jitter (stop)
RTCP destination report data
(optional) VSA: VendorId=Cisco, Cisco-AVPair, RTCP_destination_sdes_XXX (stop)
RTCP destination report data (for each source description (sdes))
The gatekeeper ignores all attributes present in Accounting-Response Radius packets.
This accounting module stores accounting information directly to a SQL database. Many configuration settings are common with other SQL modules.
Use the common database configuration options to define your database connection for this module.
StartQuery=INSERT ...
N/A
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. You can use the common CDR parameters to define what to include into your CDRs.
Sample query string:
INSERT INTO call (gkname, sessid, username, calling, called)
VALUES ('%g', '%s', '%u', '%{Calling-Station-Id}', '%{Called-Station-Id}')
StartQueryAlt=INSERT ...
N/A
Defines a SQL query used to insert a new call record to the database in case
the StartQuery
failed for some reason (the call already exists, for example).
The syntax and parameters are the same as for StartQuery
.
UpdateQuery=UPDATE ...
N/A
Defines a SQL query used to update a call record in the database with the current
call state. It is used for connect and update accounting events.
The syntax and parameters are the same as for StartQuery
.
Sample query string:
UPDATE call SET duration = %d WHERE gkname = '%g' AND sessid = '%s'
StopQuery=UPDATE ...
N/A
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 StartQuery
.
Sample query string:
UPDATE call SET duration = %d, dtime = '%{disconnect-time}' WHERE gkname = '%g' AND sessid = '%s'
StopQueryAlt=INSERT ...
N/A
Defines a SQL query used to update call record in the database when the call
is finished (disconnected) in case the regular StopQuery
failed (because
the call record does not yet exist, for example). The syntax and parameters
are the same as for StartQuery
.
Sample query string:
INSERT INTO call (gkname, sessid, username, calling, called, duration)
VALUES ('%g', '%s', '%u', '%{Calling-Station-Id}', '%{Called-Station-Id}', %d)
AlertQuery=UPDATE ...
N/A
Defines SQL query used to update a call record in the database when the call is alerting.
RegisterQuery=INSERT ...
N/A
Defines SQL query used to update the database when an endpoint registers.
Register and Unregister queries can use the following parameters:
%g
- gatekeeper name%u
- H.323 ID of the registering party%{endpoint-ip}
- IP number of the endpoint%{endpoint-port}
- port number of the endpoint%{epid}
- the endpoint ID%{aliases}
- the comma deparated list of aliases the endpoint has registered withUnregisterQuery=DELETE ...
N/A
Defines SQL query used to update the database when an endpoint unregisters.
OnQuery=UPDATE ...
N/A
Defines SQL query used to update a record in the database when the gatekeeper is starting.
OffQuery=UPDATE ...
N/A
Defines SQL query used to update a record in the database when the gatekeeper is stopping.
TimestampFormat=MySQL
N/A
Format of timestamp strings used in queries. If this setting is not specified, the global one from the main gatekeeper section is used.
MinPoolSize=5
1
Number of concurrent SQL connections in the pool. The first available connection in the pool is used to store accounting data.
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.
Create a new database; here we use the name 'GNUGK':
create database GNUGK;
Then create a table in this database to store you accounting data; we call the table 'CDR'.
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)
);
Then you need to create a username for accessing the data.
mysql> GRANT delete,insert,select,update ON GNUGK.* TO 'YourDesiredUsername'@'localhost' IDENTIFIED BY 'APassword';
mysql> flush privileges;
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.
For example, to permit access from the 192.168.1.0/24 network:
mysql> GRANT delete,insert,select,update ON GNUGK.* TO 'YourDesiredUsername'@'192.168.1.%' IDENTIFIED BY 'APassword';
mysql> flush privileges;
Then you can add the following settings into your gnugk.ini file to insert and update the history of the calls into your database.
[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
This accounting module sends all accounting information to the status port where it can be used to interface to external systems in real time.
You can use the common CDR parameters to define what to include into your event strings.
StartEvent=CALL|Start|%{CallId}
CALL|Start|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}
Defines the event to display for a new call. The string is parametrized with the same variables as the other accounting modules (See [SQLAcct]).
StopEvent=CALL|Stop|%{CallId}
CALL|Stop|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}
Defines the event when a call is finished (disconnected). The syntax and parameters are the same as for StartEvent
. This event is equivalent to the old status port CDR event, but more flexible.
UpdateEvent=CALL|Update|%{CallId}
CALL|Update|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}
Defines event used to update the current call state. The syntax and parameters are the same as for StartEvent
.
AlertEvent=CALL|Alert|%{CallId}
CALL|Alert|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}
Defines the event when a call is alerting. The syntax and parameters are the same as for StartEvent
.
ConnectEvent=CALL|Connect|%{CallId}
CALL|Connect|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}
Defines the event when a call is connected. The syntax and parameters are the same as for StartEvent
.
RegisterEvent=EP|Register|%{endpoint-ip}
EP|Register|%{endpoint-ip}:%{endpoint-port}|%{aliases}
Defines the event when an endpoint registers. The syntax and parameters are the same as for StartEvent
.
UnregisterEvent=EP|Unregister|%{endpoint-ip}
EP|Unregister|%{endpoint-ip}:%{endpoint-port}|%{aliases}
Defines the event when an endpoint registers. The syntax and parameters are the same as for StartEvent
.
TimestampFormat=MySQL
N/A
Format of timestamp strings used in events. If this setting is not specified, the global one from the main gatekeeper section is used.
In addition to the CDR parameters, Register and Unregister events can use the following parameters:
%{endpoint-ip}
- IP number of the endpoint%{endpoint-port}
- port number of the endpoint%{epid}
- the endpoint ID%{aliases}
- the comma deparated list of aliases the endpoint has registered withThis 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.
You can use the common CDR parameters to define what to include into your event strings.
SyslogFacility=LOG_LOCAL1
LOG_USER
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.
SyslogLevel=LOG_NOTICE
LOG_INFO
Set the syslog level to LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO or LOG_DEBUG.
StartEvent=CALL|Start|%{CallId}
CALL|Start|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}
Defines the event to display for a new call. The string is parametrized with the same variables as the other accounting modules (See [SQLAacct]).
StopEvent=CALL|Stop|%{CallId}
CALL|Stop|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}
Defines the event when a call is finished (disconnected). The syntax and parameters are the same as for StartEvent
. This event is equivalent to the old status port CDR event, but more flexible.
UpdateEvent=CALL|Update|%{CallId}
CALL|Update|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}
Defines event used to update the current call state. The syntax and parameters are the same as for StartEvent
.
ConnectEvent=CALL|Connect|%{CallId}
CALL|Connect|%{caller-ip}:%{caller-port}|%{callee-ip}:%{callee-port}|%{CallId}
Defines the event when a call is connected. The syntax and parameters are the same as for StartEvent
.
TimestampFormat=MySQL
N/A
Format of timestamp strings used in events. If this setting is not specified, the global one from the main gatekeeper section is used.