Overview
Message logging records all SIP messages (request and responses) received and sent by Cipango.
Note: Logging messages increases CPU and disk usage. Use it carefully in a production system.
Enabling Access Logging
To configure a message logger:
<Get name="transportHandler">
...
<Set name="accessLog">
<New class="org.cipango.log.MessageLog">
<Set name="filename"><SystemProperty default="." name="cipango.home"/>/logs/yyyy_mm_dd.message.log</Set>
<Set name="append">true</Set>
<Set name="retainDays">31</Set>
</New>
</Set>
</Get>
This configures a message log in the logs directory of your Cipango installation with filenames including the date.
Log sample
2008-02-19 15:53:42 IN TCP 127.0.0.1:5060 < 127.0.0.1:2140
MESSAGE sip:addressing@127.0.0.1;transport=tcp SIP/2.0
Via: SIP/2.0/TCP 127.0.0.1:5071;branch=z9hG4bKy90dwh
Max-Forwards: 70
From: Alice <sip:alice@example.com>;tag=u7xjym
To: <sip:addressing@127.0.0.1;transport=tcp>
Call-ID: xfv024
CSeq: 1 MESSAGE
Content-Length: 0
2008-02-19 15:53:42 OUT TCP 127.0.0.1:5060 > 127.0.0.1:2140
SIP/2.0 200 OK
Via: SIP/2.0/TCP 127.0.0.1:5071;branch=z9hG4bKy90dwh
From: Alice <sip:alice@example.com>;tag=u7xjym
To: <sip:addressing@127.0.0.1;transport=tcp>;tag=3029980b
Call-ID: xfv024
CSeq: 1 MESSAGE
Content-Length: 0