[SR-Users] xlog does not work as expected
Daniel-Constantin Mierla
miconda at gmail.com
Tue Apr 18 14:58:45 CEST 2017
Hello,
again, as written in the previous email, you are looking at the wrong
step, which is happening in the kamailio startup process, as opposite to
runtime processing.
I could bet a lot of money that when xlog() is broken, there will be a
lot of reports from many people.
Have you received sip traffic in kamailio and the xlog was not printing
anything? Just add an xlog() as first line inside 'request_route { ...
}' and you should see it for each request received by kamailio. If not,
be sure you don't have a firewall blocking sip traffic.
Cheers,
Daniel
On 16.04.17 14:01, gh wrote:
> Hi Alex,
>
> thanks but with debug=2 xlog() does not print anything.
>
> It seems in /usr/src/kamailio-5.0.1/src/core/route_struct.c
>
> case ACTIONS_ST work not as expected:
>
> #######################################################
>
> switch(t->val[2].type){
> case NOSUBTYPE:
> break;
> case STRING_ST:
> DBG(", \"%s\"", ZSW(t->val[2].u.string));
> break;
> case NUMBER_ST:
> DBG(", %lu",t->val[2].u.number);
> break;
> case EXPR_ST:
> print_expr((struct expr*)t->val[2].u.data);
> break;
> case ACTIONS_ST:
> print_actions((struct action*)t->val[2].u.data);
> break;
> case SOCKID_ST:
> #######################################################
>
>
>
> On 16.04.2017 12:42, Alex Balashov wrote:
>> This sounds like you have debug=3 or higher, and so are seeing debug
>> statements related to the internals of logging itself, in addition to
>> the log entry.
>>
>> I suggest you set debug=2 and try again.
>>
>> On Sun, Apr 16, 2017 at 12:34:53PM +0200, gh wrote:
>>
>>> Hi all,
>>> if i use xlog (Version 5.0.1) to print out some variables:
>>> xlog("L_NOTICE", "$fU time [$Tf] method ($rm) r-uri ($ru) 2nd via
>>> ($hdr(via[1]))\n");
>>>
>>> I get:
>>> Apr 16 10:22:51 sip kamailio: DEBUG: <core> [core/route_struct.c:524]:
>>> print_action(): , "L_NOTICE"
>>>
>>> Is that the expected result?
>>>
>>> Best regards
>>> Georg
>>>
>>>
>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing List
>>> sr-users at lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
More information about the sr-users
mailing list