Search code examples
sipasteriskasteriskami

How to log call (SIP) requests in asterisk?


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.


Solution

  • 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.