Hi, in most of my deployments I see myself adding xlog lines to imitate
an "access" log (like Apache/Nginx/Squid do).
Note that this is not the same as a CDR. Also, using xlog for this purpose
is not very cool as the logs are mixed with other logs generated by SR/Kamailio
itself (or its modules) as warnings, errors, other custom xlog's...
I'm reading a draft called "The Common Log File (CLF) format for SIP":
http://tools.ietf.org/html/draft-gurbani-sipping-clf
It seems really interesting for me and I'd love to have something similar in
SR/Kamailio.
The only "similar" approach would be using the siptrace module storing all
the SIP flows into database, however it's not recommended for scenarios with
high traffic.
An example of this kind of log would be the following (extracted from the
draft):
- Alice calls Bob.
- The proxy does parallel forking to two locations.
- Bob-1 replies 500.
- Bob-2 replies 200.
- Alice sends the ACK for the 200.
The common log generated by the proxy would look as follows:
------------------------------------------------------------------------
### Received request (server transaction):
1230756560 192.168.1.10 - INVITE sip:bob@example.net sip:alice@example.com;tag=hy7
sip:bob@example.net 7yhgt1(a)example.com - uyt67h FORK/-
### 100 replied upstream:
1230756560 uyt67h - 100 INVITE + -
# First INVITE generated by the proxy (client transaction):
1230756563 - - INVITE sip:bob@home.example.net sip:alice@example.com;tag=hy7
sip:bob@example.net 7yhgt1(a)example.com - uyt67h CLIENT/hb76
### Second INVITE generated by the proxy (client transaction):
1230756564 - - INVITE sip:bob@carphone.example.net sip:alice@example.com;tag=hy7
sip:bob@example.net 7yhgt1(a)example.com - uyt67h CLIENT/hb77
### Replies received from Bob-1 and Bob-2:
1230756565 uyt67h hb76 100 INVITE sip:bob@example.net;tag=876v -
1230756565 uyt67h hb77 100 INVITE sip:bob@example.net;tag=561t -
1230756565 uyt67h hb76 180 INVITE sip:bob@example.net;tag=876v -
1230756565 uyt67h hb77 180 INVITE sip:bob@example.net;tag=561t -
1230756567 uyt67h hb77 182 INVITE sip:bob@example.net;tag=561t -
1230756568 uyt67h hb76 500 INVITE sip:bob@example.net;tag=876v -
1230756568 uyt67h hb77 200 INVITE sip:bob@example.net;tag=561t
"sip:bob@home.example.net"
### 200 replied upstream:
1230756569 uyt67h - 200 INVITE sip:bob@example.net;tag=561t
"sip:bob@home.example.net"
### ACK sent to Bob-1 to acknoledge the 500 response:
1230756569 + - ACK sip:bob@home.example.net + + + - uyt67h CLIENT/hb76
### ACK received by the proxy and relayed to Bob-2:
1230756570 192.168.1.10 - ACK sip:bob@home.example.net sip:alice@example.com;tag=hy7
sip:bob@example.net;tag=76y 7yhgt1(a)example.com - t6y5 FORK/-
1230756570 - - ACK sip:bob@home.example.net sip:alice@example.com;tag=hy7
sip:bob@example.net;tag=76y 7yhgt1(a)example.com - t6y5 CLIENT/hb89
------------------------------------------------------------------------
Would make sense a SR module to achieve this purpose? Such module should
write these logs into a file (not syslog).
Regards.
--
Iñaki Baz Castillo <ibc(a)aliax.net>