is there a way to add debug statements in kamailio.cfg? I'd like to be able to dump some of the variables and also see which path the calls are taking. thanks
You can set the 'debug' core config parameter to something higher than 2. But be warned that even 3 is very verbose. Start there:
debug=3
On 26 March 2014 15:53:31 GMT-04:00, mark li limark67@yahoo.com wrote:
is there a way to add debug statements in kamailio.cfg? I'd like to be able to dump some of the variables and also see which path the calls are taking. thanks
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0671 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
does this get logged to a file too or just the console? i've tried checking /var/log/syslog but it doesn't contain the same entries that are shown on the console. thanks.
On Wednesday, March 26, 2014 4:08:16 PM, Alex Balashov abalashov@evaristesys.com wrote:
You can set the 'debug' core config parameter to something higher than 2. But be warned that even 3 is very verbose. Start there:
debug=3
On 26 March 2014 15:53:31 GMT-04:00, mark li limark67@yahoo.com wrote: is there a way to add debug statements in kamailio.cfg? I'd like to be able to dump some of the variables and also see which path the calls are taking.
thanks
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0671 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
I find that raising the debug level only helps when I have issues with connections to 3rd party systems, like LDAP, Radius and databases. Otherwise, XLOG is your best friend.
Kamailio logging goes to the syslog.
/O
On 26 Mar 2014, at 21:20, mark li limark67@yahoo.com wrote:
does this get logged to a file too or just the console? i've tried checking /var/log/syslog but it doesn't contain the same entries that are shown on the console. thanks.
On Wednesday, March 26, 2014 4:08:16 PM, Alex Balashov abalashov@evaristesys.com wrote: You can set the 'debug' core config parameter to something higher than 2. But be warned that even 3 is very verbose. Start there:
debug=3
On 26 March 2014 15:53:31 GMT-04:00, mark li limark67@yahoo.com wrote: is there a way to add debug statements in kamailio.cfg? I'd like to be able to dump some of the variables and also see which path the calls are taking. thanks
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0671 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
To see which lines from configuration file are executed per sip message, set cfgtrace parameter for debugger module.
Cheers, Daniel
On 26/03/14 22:01, Olle E. Johansson wrote:
I find that raising the debug level only helps when I have issues with connections to 3rd party systems, like LDAP, Radius and databases. Otherwise, XLOG is your best friend.
Kamailio logging goes to the syslog.
/O
On 26 Mar 2014, at 21:20, mark li <limark67@yahoo.com mailto:limark67@yahoo.com> wrote:
does this get logged to a file too or just the console? i've tried checking /var/log/syslog but it doesn't contain the same entries that are shown on the console. thanks.
On Wednesday, March 26, 2014 4:08:16 PM, Alex Balashov <abalashov@evaristesys.com mailto:abalashov@evaristesys.com> wrote: You can set the 'debug' core config parameter to something higher than 2. But be warned that even 3 is very verbose. Start there:
debug=3
On 26 March 2014 15:53:31 GMT-04:00, mark li <limark67@yahoo.com mailto:limark67@yahoo.com> wrote:
is there a way to add debug statements in kamailio.cfg? I'd like to be able to dump some of the variables and also see which path the calls are taking. thanks ------------------------------------------------------------------------ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0671 Web: http://www.evaristesys.com http://www.evaristesys.com//, http://www.alexbalashov.com http://www.alexbalashov.com/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 26 Mar 2014, at 20:53, mark li limark67@yahoo.com wrote:
is there a way to add debug statements in kamailio.cfg? I'd like to be able to dump some of the variables and also see which path the calls are taking.
What you really want is to add your own debugging using the xlog module. Look at the documentation for that module, the example configuration for Kamailio and the power of pseudovariables in the pseudovariable cookbok on the documentation web site.
/O
Olle I've added some debug statements using the XLOG function like so:
xlog("L_INFO", "my custom message");
but none of my debug statements appear in syslog. I don't get any errors either when I restart kamailio. any suggestion? I am loading the module in kamailio.cfg... I see a line that says "loadmodule xlog.so" and i've also added a modparam for the log like so:
modparam("xlog", "buf_size", 8192)
Thank you.
________________________________ From: Olle E. Johansson oej@edvina.net To: mark li limark67@yahoo.com; Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Cc: Olle E Johansson oej@edvina.net Sent: Wednesday, March 26, 2014 4:59:35 PM Subject: Re: [SR-Users] How to turn on debugging in kamailio?
On 26 Mar 2014, at 20:53, mark li limark67@yahoo.com wrote:
is there a way to add debug statements in kamailio.cfg? I'd like to be able to dump some of the variables and also see which path the calls are taking.
What you really want is to add your own debugging using the xlog module. Look at the documentation for that module, the example configuration for Kamailio and the power of pseudovariables in the pseudovariable cookbok on the documentation web site.
/O
On Thu, Mar 27, 2014 at 2:31 PM, mark li limark67@yahoo.com wrote:
Olle I've added some debug statements using the XLOG function like so:
xlog("L_INFO", "my custom message");
but none of my debug statements appear in syslog. I don't get any errors either when I restart kamailio. any suggestion? I am loading the module in kamailio.cfg... I see a line that says "loadmodule xlog.so" and i've also added a modparam for the log like so:
modparam("xlog", "buf_size", 8192)
Do you have log_facaility set?
log_facility=LOG_LOCAL0
From there, I would suggest looking at your syslog configuration and verify
that your chosen facility is routed to a file.
Corey
yep, i do. I have the following entries in my config: modparam("xlog", "log_facility", "LOG_DAEMON")
and closer to the top of the file i have log_facility=LOG_LOCAL0
________________________________ From: Corey Edwards tensai@zmonkey.org To: mark li limark67@yahoo.com; Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Sent: Thursday, March 27, 2014 5:53:16 PM Subject: Re: [SR-Users] How to turn on debugging in kamailio?
On Thu, Mar 27, 2014 at 2:31 PM, mark li limark67@yahoo.com wrote:
Olle
I've added some debug statements using the XLOG function like so:
xlog("L_INFO", "my custom message");
but none of my debug statements appear in syslog. I don't get any errors either when I restart kamailio. any suggestion? I am loading the module in kamailio.cfg... I see a line that says "loadmodule xlog.so" and i've also added a modparam for the log like so:
modparam("xlog", "buf_size", 8192) Do you have log_facaility set?
log_facility=LOG_LOCAL0
From there, I would suggest looking at your syslog configuration and verify that your chosen facility is routed to a file.
Corey
On 27 Mar 2014, at 21:31, mark li limark67@yahoo.com wrote:
Olle I've added some debug statements using the XLOG function like so:
xlog("L_INFO", "my custom message");
but none of my debug statements appear in syslog. I don't get any errors either when I restart kamailio. any suggestion? I am loading the module in kamailio.cfg... I see a line that says "loadmodule xlog.so" and i've also added a modparam for the log like so: modparam("xlog", "buf_size", 8192)
Start kamailio in the foreground with "-D 1 -E" and you'll see the log messages on your console if Kamailio runs. If you haven't got a listen address in the config, you might want to add a "-l <param>" to force kamailio to listen to the right IP address (replace <param> with a listen address, run "kamailio -h" for docs).
/O
Here's a copy of my cfg file: http://pastebin.com/GtDwWKWr I tried to run with the switches you mentioned... but i still don't get anything logged to syslog. ? sorry... and thanks for your patience.
________________________________ From: Olle E. Johansson oej@edvina.net To: mark li limark67@yahoo.com Cc: Olle E Johansson oej@edvina.net; Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Sent: Friday, March 28, 2014 2:55:22 AM Subject: Re: [SR-Users] How to turn on debugging in kamailio?
On 27 Mar 2014, at 21:31, mark li limark67@yahoo.com wrote:
Olle
I've added some debug statements using the XLOG function like so:
xlog("L_INFO", "my custom message");
but none of my debug statements appear in syslog. I don't get any errors either when I restart kamailio. any suggestion? I am loading the module in kamailio.cfg... I see a line that says "loadmodule xlog.so" and i've also added a modparam for the log like so:
modparam("xlog", "buf_size", 8192)
Start kamailio in the foreground with "-D 1 -E" and you'll see the log messages on your console if Kamailio runs. If you haven't got a listen address in the config, you might want to add a "-l <param>" to force kamailio to listen to the right IP address (replace <param> with a listen address, run "kamailio -h" for docs).
/O
Does anyone have any other suggestions / ideas on what I might be doing wrong / missing? I can't any log entries to show up in my syslog file. I'm trying to add custom messages to debug a specific scenario... I prefer to log it to a file instead of to the console because there's a lot of debug data on the console and it's hard to scroll through.
thanks.
________________________________ From: mark li limark67@yahoo.com To: Olle E. Johansson oej@edvina.net Cc: Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Sent: Friday, March 28, 2014 8:47:51 AM Subject: Re: [SR-Users] How to turn on debugging in kamailio?
Here's a copy of my cfg file: http://pastebin.com/GtDwWKWr I tried to run with the switches you mentioned... but i still don't get anything logged to syslog. ? sorry... and thanks for your patience.
________________________________ From: Olle E. Johansson oej@edvina.net To: mark li limark67@yahoo.com Cc: Olle E Johansson oej@edvina.net; Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Sent: Friday, March 28, 2014 2:55:22 AM Subject: Re: [SR-Users] How to turn on debugging in kamailio?
On 27 Mar 2014, at 21:31, mark li limark67@yahoo.com wrote:
Olle
I've added some debug statements using the XLOG function like so:
xlog("L_INFO", "my custom message");
but none of my debug statements appear in syslog. I don't get any errors either when I restart kamailio. any suggestion? I am loading the module in kamailio.cfg... I see a line that says "loadmodule xlog.so" and i've also added a modparam for the log like so:
modparam("xlog", "buf_size", 8192)
Start kamailio in the foreground with "-D 1 -E" and you'll see the log messages on your console if Kamailio runs. If you haven't got a listen address in the config, you might want to add a "-l <param>" to force kamailio to listen to the right IP address (replace <param> with a listen address, run "kamailio -h" for docs).
/O
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users