SailFin 2.0 / Sip Message Inspection Adapters
1.2. Name(s) and e-mail address of Document Author(s)/Supplier:
Peter Strand: peter.strand@ericsson.com
|
Version
|
Date
|
Comments
|
Author
|
|
0.1
| 2009-02-27 | First version | Peter Strand |
| 0.2 | 2009-03-09 | Added toc and changed name of config parameters | Peter Strand |
| 1.0 | 2009-04-15 | Updated w.r.t implemntation | Peter Strand |
The feature SipMessageInspection is based on Java Logging and is intended as a tool to trace Sip messages. The trace output information is stored in the server.log file.
This document describes some improvements to the existing feature SipMessageInspection. Note that there is also a related document "Enhancements to SMI and Access logging" Onepager describing some base improvements for the reporter framework
for example the base support to intercept outgoing requests and responses.
In addition to a improved default implementation a new feature is proposed: support of user configurable log adapter classes (runtime configurable).
With this feature integrators/developers/support staff can balance the amount of log information with respect to the load of the system.
See below for a more detailed technical description.
2.2. Risks and Assumptions:
N/A
- Modify Sip Message inspection with respect to the refined Reporter interface/framework.
- Provide a reasonable default implementation of Sip Message Inspection with more helpful information in less log records
- Add support for user configurable log adapters
SipMessageInspection feature is intended as a mean of troubleshooting Sip traffic through SGCS.
It is activated by setting the smi log domain to level FINE. When active it will log information
like the text representation of the request to the SGCS log, one record per inspection point per layer that has the
SipMessageInspection configured (with default stack config it is configured for GrizzlyNetworkManager and ApplicationDispatcher).
With the current implementation there are some problems:
- The current Sip Message Reporter does not log outgoing requests/responses
- The reporter logs one record per un-winded call stack (This duplicates the log records produced without being helpful for troubleshooting)
The aim is to provide a better default implementation of Sip Message Inspection with more helpful information in less log records.
For a OPTIONS/200 sequence this means that 4 log records will be stored:
- GrizzlyNetworkManager: log the Incoming request
- ServletDispatcher: log the Incoming request
- ServletDispatcher: log the sent outgoing response
- GrizzlyNetworkManager: log the outgoing response
In addition to some general improvements a user configurable adapter feature is proposed (runtime configurable).
This functionality lets integrators/developers/support staff to define their own configurable Adapters to
provide more fine grained control over what is being logged. This way the amount of log information can be balanced with respect to the load of the system.
The proposed interface is shown and further described in the Code example section.
This is the proposed interface which allows integrators/developers/support staff to define their own
configurable Adapters. Please note the similarities with Reporter proposed interface. The difference is that the methods return a String representation of the data which should be logged.
If the implementing class does not want anything to be logged then it just returns the method with a null value.
Also note that the Sip Message Inspection base functionality should do the actual logging (using a predefined log record including information about the context of the interception) .
With the help of SSA interfaces for storing attributes in SipServletRequests/SipSessions it should for example be possible to collect information
without logging and only log if an error response is received.
package org.jvnet.glassfish.comms.admin.reporter.smi;
public interface SmiLogMessageAdapter {
String getLogMessageIncomingRequest(SipServletRequest req);
String getLogMessageIncomingResponse(SipServletResponse resp);
String getLogMessageOutgoingRequest(SipServletRequest req);
String getLogMessageOutgoingResponse(SipServletResponse resp);
String getLogMessagePostIncomingRequest(SipServletRequest req, Exception exceptionInCaseOfException);
String getLogMessagePostIncomingResponse(SipServletResponse resp, Exception exceptionInCaseOfException);
}
N/A
N/A
SmiLogMessageAdapter, see section 4.1.1.2 Interface.
N/A
- Developers Guide
- Admin Guide
- Trouble shooting Guide
This configuration is implemented as "Additional properties" ( Admin GUI/ Configuration -> Sip Service ).
This means that no changes are needed in dtd for domain.xml.
One adapter class per SipMessageReporter should be configurable. By default there will be one Sip Message Reporter for LAYER interception on GrizzlyNetworkmanager and one for Servlet invocation on ApplicationDispatcher.
The path and/or name of the Adapter class for layers is intended to be supplied by integrators/customers/developers.
- smiServletAdapter
- smiLayerAdapter
- smiNetworkManagerAdapter
By default these parameters are not set (Sip Message Reporters will then use its default implementation/logging).
The values should be configurable in runtime.
The format of these parameters:
- <package.classname> (specified class should be available with container class loader)
- <package.classname ; external class path> (specified class should be available at supplied external class root)
By setting the smi log level it is possible control the amount of records which is logged:
( e.g. server-config.log-service.module-log-levels.property.smi=FINE ).
FINE:
FINER:
- SERVLET interception
- NetworkManager from/to cluster (i.e excluding Loadbalancer network hops)
FINEST:
- SERVLET interception
- NetworkManager including Loadbalancer network hops
No GUI changes are needed.
The classes implementing the base functionality of Sip Message Inspection feature is placed under sailfin/integration (ends up in comms-appserv-rt.jar).
The adapter classes may be packaged by the user in a jar file and be placed under glassfish/lib or
they may be provided from an external path.
N/A
The proposed changed feature reuses the smi log level ( e.g. server-config.log-service.module-log-levels.property.smi=FINE ).
N/A
No.
N/A
| Will this component work with Ipv6 addresses | Yes |
| Will this component work with JDK 64bit | Yes |
| Will this component require configuration using a sun-specific deployment descriptor.If yes, please specify below that configuration elements needed | No |
| Issue No | Description | Comments | Resolution |
| | | | |
SGCS 2.0