Oracle Server E10293-02 ユーザーズマニュアル
Accounting Event API
C-1
C
Accounting Event API
This appendix describes the OCMS Accounting Event API, in the following sections:
■
■
■
■
■
Introduction
OCMS provides the Accounting Event API, an interface to create SIP event data that
can be used for accounting and charging. The event output data can be post-processed
to create CDRs.
can be used for accounting and charging. The event output data can be post-processed
to create CDRs.
The Accounting Event API consists of the following two interfaces:
■
oracle.sdp.sipservletframework.eventlogger.EventLoggerFactory
■
oracle.sdp.sipservletframework.eventlogger.EventLogger
The container creates an EventLoggerFactory instance available trough a
ServletContext
ServletContext
attribute with the name,
oracle.sdp.sipservlet.EventLoggerFactory.EVENT_LOGGER_FACTORY
.
The string cannot be used by itself, but must be specified as follows:
EventLoggerFactory elf =
getServletContext().getAttribute(oracle.sdp.sipservletframework.eventlogger.
EventLoggerFactory.EVENT_LOGGER_FACTORY
The EventLogger interface is implemented by the loggers created by the
EventLoggerFactory.getLogger(String loggerName)
EventLoggerFactory.getLogger(String loggerName)
method. The
EventLogger
instances use Apache Log4j internally for the actual logging. Log4j
allows flexible logging for instance to a file or to a centralized log server using syslog.
The EventLogger interface has three methods for logging events (illustrated in
):
■
logEvent(SipServletRequest req, Map<Object, Object>
additional)
■
logEvent(SipServletResponse resp, Map<Object, Object>
additional)
■
logEvent(Map<Object, Object> event, String category
)