[SR-Users] logging sip messages

Karthik Srinivasan ksriniva2002 at gmail.com
Fri Mar 2 21:12:54 CET 2018


Hello:

I am trying to find a simple way to log each and every SIP message that
Kamailio receives or Kamailio sends. In a nutshell, here is what i'm trying
to accomplish:

- log sip message received;  log ip address and port of where message was
received from
- log sip message to be sent or sent;  log ip address and port of
destination.

I am trying to achieve this in the context of my general log file that
contains routing/event logic from the kamailio.cfg file.  By this i mean i
don't want to have to run an external program like tcpdump to capture the
packets and log them.

I have tried a few thing but haven't been able to capture all conditions.

examples:

i have included things like  event_routes for [tm:local-response];
[sl:local-response]; [sl:filtered-ack], onreply_route...   I can capture
most replies and responses via those but am not able to capture a 200ok
relayed response from Kamailio back to the originating UA for example.

I can log incoming messages without problem.

I have also tried to activate IO interrupt to route to
event_route[NETWORK:MSG] but unfortunately i can't access the source/dest
ip address/port info or other pseudo variables.

So back to the original question:  How does one log every SIP message that
Kamailio gets?  How does one log every SIP message that Kamailio sends?
via the context of the routing/replies/event routes in kamailio.cfg.

Thanks,

Karthik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180302/0e9f8cc7/attachment.html>


More information about the sr-users mailing list