You can enable and configure rotation for the access logs for the SIP service. These logs are in the as-install/domains/domain_dir/logs/sipaccess directory and are named as follows: sip_access_log.yyyy-mm-dd. This location can be changed by editing the accesslog property under the sip-service element.
The accessLoggingEnabled property under sip-service is used for enabling SIP access log. Restart the server after enabling or disabling the access log. Use the following command:
asadmin set config.sip-service.property.accessLoggingEnabled=true
The accesslogsize property under sip-service can be used for log rotation based on file size. The default value of this property if set to 2000000.
The following is the list of SIP service access log attributes (The actual attribute name as defined in the domain.xml file appears in brackets)
Rotation (rotation-enabled): Check the File Rotation box to enable file rotation.
Rotation Policy (rotation-policy): Choose a policy from the Rotation Policy drop-down list. (The only policy available is time).
Rotation Interval (rotation-interval-in-minutes): Enter a numeric value to specify the number of minutes between rotations of the access log. This field is valid only if the Rotation Policy is time. The default is 1440 minutes.
When you specify a rotation-interval, and the rotation interval has elapsed, the access log file will be rotated only if the resulting rotation suffix of the new access log file is different from the rotation suffix of the existing access log file. So, the rotation interval must coincide with the rotation suffix in order to see your access log file rotated within the expected time-frame interval.
Rotation Suffix (rotation-suffix): Enter a string value to specify the suffix to be added to the log file name after rotation. The default is YYYY-MM-DD.
Format(format): Enter a string value to specify the format of the access log. Use the formats shown in the following table. The default format is %client.name% %auth-user-name% %datetime% %request% %status% %response.length%.
The following SIP headers are also supported: client.name,auth-user-name,datetime, request, status, response.length, max.forwards, from, cseq, contact, to, content.type, via, call.id
To enable all headers, run the following command:
asadmin set server-config.sip-service.access-log.format="\"%client.name% %auth-user-name% %datetime% %request% %status% %response.length% %max.forwards% %from% %cseq% %contact% %to% %content.type% %via% %call.id%\""
Ensure that you escape the format string.
You can edit these properties through the Admin Console or through the following get and set commands
To get the values of all properties of the SIP service access log, use the following command: asadmin get server-config.sip-service.access-log.*
To set an attribute of the SIP service access log, use the set command as follows: asadmin set server-config.sip-service.access-log.rotation-enabled=false