Re: [SR-Users] log_prefix missing

2019-03-07 Thread Daniel-Constantin Mierla
Hello,

I haven't had the time to check the logs and relate from where they are
printed in the code, but as a general rule: the log prefix is used when
executing route blocks. If a log messages is printed from a part of the
code executed out of routing blocks actions (e.g., can be timer, evapi
worker process, ...), there is no log prefix set, because this one
requires a valid sip message structure to work with.

Cheers,
Daniel

On 07.03.19 10:36, Mikko Lehto wrote:
> Joonas wrote:
>
>> I am having a problem where log_prefix is missing on acc_cdr log row when
>> call is canceled.
> Hi, I didn't look at your specific case, but as a general note:
>
> there was similar issue earlier on tm failure_route as well.
> Reported on GH issue 1531, fixed in commit 
> eb2f25ca0810f966d089da3aa1e32e3e98a4ab16
>
> Maybe solution is somehow similar or maybe I am just wasting bandwidth.
>
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] log_prefix missing

2019-03-07 Thread Mikko Lehto
Joonas wrote:

> I am having a problem where log_prefix is missing on acc_cdr log row when
> call is canceled.

Hi, I didn't look at your specific case, but as a general note:

there was similar issue earlier on tm failure_route as well.
Reported on GH issue 1531, fixed in commit 
eb2f25ca0810f966d089da3aa1e32e3e98a4ab16

Maybe solution is somehow similar or maybe I am just wasting bandwidth.

-- 
Mikko

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] log_prefix missing

2019-03-07 Thread Joonas Kamailio

Dear List,

I am having a problem where log_prefix is missing on acc_cdr log row 
when call is canceled.


Here is an example of two lines of acc_cdr log file, first one is 
completed normally and second one is canceled before 200 OK:


Mar  6 12:04:48 edge3 kamailio[27669]: NOTICE: {2 1 BYE 
23d4e04c0c79ff6950accbd1706b9...@example.com} acc [acc_cdr.c:367]: 
log_write_cdr(): start_time=1551873885.018; end_time=1551873888.379; 
duration=3.361;
Mar  6 12:03:40 edge3 kamailio[27707]: NOTICE: acc [acc_cdr.c:367]: 
log_write_cdr(): start_time=1551873809.148; end_time=1551873809.148; 
duration=0;


I tried to take a debug on this matter and noticed that log_prefix is 
lost at this point:


Mar  6 13:54:25 edge3 kamailio[10665]: DEBUG: {1 102 INVITE 
6917f51f0955bd8b3a1aa62361a47...@example.com} tm [t_lookup.c:1019]: 
t_check_msg(): msg (0x7f1a889a8a30) id=0 global id=0 T start=0x7f1a8899b450
Mar  6 13:54:25 edge3 kamailio[10665]: DEBUG: {1 102 INVITE 
6917f51f0955bd8b3a1aa62361a47...@example.com} tm [t_lookup.c:1092]: 
t_check_msg(): T (0x7f1a8899b450) already found for msg (0x7f1a889a8a30)!
Mar  6 13:54:25 edge3 kamailio[10665]: DEBUG: {1 102 INVITE 
6917f51f0955bd8b3a1aa62361a47...@example.com} dialog [dlg_var.c:97]: 
cb_dlg_locals_reset(): resetting the local dialog shortcuts on script 
callback: 2147483650
Mar  6 13:54:25 edge3 kamailio[10665]: DEBUG: tm [t_reply.c:1806]: 
relay_reply(): branch=0, save=0, relay=0 icode=0 msg status=487
Mar  6 13:54:25 edge3 kamailio[10665]: DEBUG:  
[core/msg_translator.c:2288]: generate_res_buf_from_sip_res(): old size: 
483, new size: 399


On normal call the prefix stays in intact:

Mar  6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE 
03cd8f3464d42b7b01966e6b1154e...@example.com} tm [t_lookup.c:1088]: 
t_check_msg(): msg (0x7f1a95baad10) id=2 global id=2 T end=0x7f1a8899f8f0
Mar  6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE 
03cd8f3464d42b7b01966e6b1154e...@example.com} tm [t_reply.c:2237]: 
reply_received(): org. status uas=0, uac[0]=0 local=0 is_invite=0)
Mar  6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE 
03cd8f3464d42b7b01966e6b1154e...@example.com} tm [t_reply.c:1263]: 
t_should_relay_response(): -> T_code=0, new_code=200
Mar  6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE 
03cd8f3464d42b7b01966e6b1154e...@example.com} tm [t_reply.c:1806]: 
relay_reply(): branch=0, save=0, relay=0 icode=0 msg status=200
Mar  6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE 
03cd8f3464d42b7b01966e6b1154e...@example.com}  
[core/msg_translator.c:2288]: generate_res_buf_from_sip_res(): old size: 
491, new size: 407


The problem exists at least in the following version:

version: kamailio 5.2.0 (x86_64/linux) c5216b
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, 
Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, 
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, 
USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, 
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB

poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: c5216b
compiled on 13:05:00 Jan  7 2019 with gcc 6.3.

Best Regards,
Joonas Keskitalo



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users