Asterisk Source code

Hi experts,
In asterisk source code (such as chan_sip.c file), there are alot of code like these:
I think there are some file in which the logs are recored to. Is it true?
because i turn on asterisk debug "core set debud chanel all " but i didn’t any logs.
I want trace some lines code in source code (such as chan_sip.c), how can i do it?


The routing of logging is specified in /etc/asterisk/logger.conf

The older format: core set debug
and variants still seems to be supported.

This is not an appropriate forum for support questions; please use Asterisk Support, in future.

Thanks for your replying.
How can i trace some my code in asterisk source code? I added some code to chan_sip.c file, now i want logged them to file, as like asterisk do (ast_log() of ast_debug() functions), but i dont know where loggs is saved?

One more try, see … nformation

However, if you can’t work out what to do from my original instructions, you are going to have difficulty with your main project. Most ordinary end users work out how to get logging without needing detailed instructions.

Hi all,
Currently I start work with Asterisk, I have a question, please help me have answer.

  • How to debug source code same as can set break point in src?

Hi all,
When develop or fix bug of asterisk how to debug? and we can set breakpoint in source code?

Thank you so much


However this is not a support forum and this board is not a developer board.

Also, please do not tail end existing threads.

Hi david55,
you mean we can use gdb asterisk -r
Thanks for your help

Hello everyone,
How to debug source code of asterisk? Same as set breakpoint in src.
Thanks for your help.

If you need to ask how to invoke gdb, you should not be attempting to debug Asterisk. Understanding Asterisk is a lot more difficult than reading the gdb man page and basic documentation.

There is no -r option in the version of gdb I have, so I don’t know what it means.

Debugging rasterisk is not likely to be useful if you are actually interested in the main daemon.

Thank david55,
I can debug with gdb.
Thank you .