Capture SIP trace per call

I would like to provide the SIP trace with each call in the call detail record (or some reasonable place).

  • I have looked at sip history, but that not a SIP trace.
  • I don’t want to use Voipmonitor. Although it does capture exactly what I want.
  • I I don’t need the RPT packets
  • I I would rather not use some sort of network sniffer or have to rely on 3rd party tools. It seems all the information is right there in Asterisk, im just not sure how to get it out.
  • I don’t need all the other messages like REGISTER, SUBSCRIBE etc
  • I CAN do some sort of post-processing, and match up the {SIPCALLID} at a later point - as im capturing this to the CDR.
  • I have seen all that I need if I: sip set debug on.

I was thinking about setting up logger.conf with an additional sip-debug.log, would that be possible / practical? Whats the best way?

On your logger.conf file sip-debug.log=>debug that will log all SIP messages,

I tried that, it doesn’t work. I have:

console => notice,warning,error
messages => notice,warning,error
full => verbose
debug => debug

sipdebug = yes

  • Sip messages are being written out to the CLI - if possible I would like this not to do that - T.M.I.
  • debug.log is empty
  • full.log seems to have everything that the CLI has, including the sip messages mixed in-between the dial-plan messages.
  • default verbosity was 7.
  • default debug is 0.

Both chan_sip and chan_pjsip place their SIP trace messages as verbose messages to the logger, so you’d have to store verbose messages in a log file. There is no ability to access/use/store these from the dialplan though or place them with the CDR out of the box. You’d need to write something.

I would really like to put this forward as a feature request… With TLS and WebSockets becoming more prevalent, the old school tools of wireshark and tcpdump cant be used any more. It’s now only Asterisk that would have the complete SIP message trace/pcap. It would great if there was an option in the logger.conf for an additional log type, like notice,warning,error etc called “sip”, that could write the pcap/sip messages to a specific log file, without necessarily writing it to the CLI.

sip-debug => sip
console => notice,warning,error
messages => notice,warning,error
full => verbose


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.