How to log call (SIP) requests in asterisk?

reederz picture reederz · Jan 22, 2014 · Viewed 12.4k times · Source

Is it possible to log SIP requests to a database in asterisk? I am interested in these details:

  • timestamp
  • SIP method
  • status code
  • source number/extension
  • destination number/extension

I am pretty sure that it's possible to translate queue_log events to SIP requests and get the above information from it. However, as not every call goes through calling queues, this solution does not work for me.

Perhaps it's possible to achieve by using AMI? Or writing custom dialplan? Please share your thoughts on this issue.

Answer

arheops picture arheops · Jan 22, 2014

No way to do that.

Asterisk does not record sip messages unless you have sip debug turned on.

If you need control on message level, check out kamailio/opensips project.