Hi experts,
In asterisk source code (such as chan_sip.c file), there are alot of code like these:
ast_log(…)
ast_debug(…)
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?
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?
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.
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.