Hey community,
I'm currently trying to config our new 5.1.2 kamailio server and I want to xlog $mb. Whenever I do this, I get an ERROR logged to my syslog
Dec 26 21:15:58 sjomainkama55 /usr/sbin/kamailio[5954]: {1 1 INVITE <padding>@<padding>} ERROR: <script>: INVITE sip:<padding>@ sjomainkama55.a.fuzemeeting.com:443
Does anyone know why this is?
Also, I noticed I can't get rid of #012#015 at all. I modified the rsyslogd.conf file as instructed here:
"i need to add the next line to /etc/rsyslog.conf "$EscapeControlCharactersOnReceive off"
and when I did this, the control characters disappear but all it printed out was the first line of the SIP message. I also try to assign $mb to a $var() and do a {re.replace} on that string and that didn't work either.
I ended up having to create a side script to parse the whole /var/log/syslog and do regex replace the #012#015 with real newline which is not what I really want for me or anyone else who needs to analyze the Kamailio logs.
Please advise.
Thanks.
Hello,
do you mean that it writes "ERROR" in the prefix of the log message?
That is the default log level for xlog() function. You can write to another log level by providing it as first parameter:
xlog("L_INFO", "$mb");
Cheers, Daniel
On 26.12.18 22:24, Andrew Chen wrote:
Ah ok. I thought L_INFO was default.
But, as for my other question, why the string manipulation doesn't work here?
On Thu, Dec 27, 2018 at 3:10 AM Daniel-Constantin Mierla miconda@gmail.com wrote:
I use syslog-ng instead of rsyslog, it logs multi line messages just fine.
On Thursday, December 27, 2018 9:14:23 AM EST Andrew Chen wrote:
Ah ok. I thought L_INFO was default.
But, as for my other question, why the string manipulation doesn't work here?
On Thu, Dec 27, 2018 at 3:10 AM Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello, do you mean that it writes "ERROR" in the prefix of the log message? That is the default log level for xlog() function. You can write to another log level by providing it as first parameter: xlog("L_INFO", "$mb"); Cheers, Daniel
On 26.12.18 22:24, Andrew Chen wrote:
Hey community,
I'm currently trying to config our new 5.1.2 kamailio server and I want to xlog $mb. Whenever I do this, I get an ERROR logged to my syslog
Dec 26 21:15:58 sjomainkama55 /usr/sbin/kamailio[5954]: {1 1 INVITE <padding>@<padding>} ERROR: <script>: INVITE sip:<padding>@sjomainkama55.a.fuzemeeting.com:443
Does anyone know why this is?
Also, I noticed I can't get rid of #012#015 at all. I modified the rsyslogd.conf file as instructed here:
"i need to add the next line to /etc/rsyslog.conf "$EscapeControlCharactersOnReceive off"
and when I did this, the control characters disappear but all it printed out was the first line of the SIP message. I also try to assign $mb to a $var() and do a {re.replace} on that string and that didn't work either.
I ended up having to create a side script to parse the whole /var/log/syslog and do regex replace the #012#015 with real newline which is not what I really want for me or anyone else who needs to analyze the Kamailio logs.
Please advise.
Thanks.
Unfortunately, I don't have that option to use syslog-ng as rsyslog is our standard setup here. Given this said, I'm back to string manipulation.
On Thu, Dec 27, 2018 at 9:24 AM Sergey Okhapkin sos@sokhapkin.dyndns.org wrote: