Add debug output to app module code

I’m playing with modifying Asterisk 11.19.0’s app_voicemail.c code. Specifically I want to modify one of the message features (forward voicemail option 8). To start with I am going to just use some of the variable values and pass them to my external application with a system() call.

However, I am having trouble determining which variables I need to use because I cannot output them to the CLI. I’ve tried things like the following (which I just copy/pasted from elsewhere in the module):

ast_log(AST_LOG_NOTICE, “Test transfer from %s@%s.\n”, vmu->mailbox, vmu->context);
ast_debug(“Test transfer from %s@%s.\n”, vmu->mailbox, vmu->context);

Neither works, and I have the CLI core set verbose set to 4. How can I update my debug output to actually show up in the CLI?

Please use the developer mailing list or IRC channel for developer support.

Debug output is controlled by core set debug… and logger.conf.

ast_log(AST_LOG_NOTICE, “Test transfer from %s@%s.\n”, vmu->mailbox, vmu->context);
ast_debug(“Test transfer from %s@%s.\n”, vmu->mailbox, vmu->context);

The log message you are outputting is a NOTICE message, not a VERBOSE message. If you aren’t seeing it on the CLI, then either you aren’t hitting that part of the code or the console in logger.conf was not configured to send NOTICE messages to the CLI.

David, Matt, indeed I did not have NOTICEs enabled in logger.conf.

Thanks again, see you in Glendale!

1 Like