Hi All,
thought I would give you a small little perl program I quickly hacked up to
help with some memory leaks I was getting. Turns out I was forgetting to
call release_urecord after a get_urecord on the usrloc module. Because I use
Kamailio in DBOnly mode - the memory was never being freed. This little
program helped me to find the source in no time at all. I hope it helps you
too.
A little info:
The program works on the log file. NB you have to have memlog debugging
enabled for this program to do anything useful. Effectively the program
continuously monitors the log file looking for allocs and frees. It tallies
all the fragments in use and gives a report of all the fragments and where
they weer allocated. It also keeps a running counter of bytes used.
Here is an example of the output:
*****************************************************************************************************************************************************
DUMPING ALL UNFREED MEMORY FRAGMENTS (25)
*****************************************************************************************************************************************************
called from h_table.c: build_cell(251)
6 21312
called from dlg.c: new_dlg_uac(169) 1
128
called from t_msgbuilder.c: build_uac_req(921) 6
1896
called from pv_svar.c: set_var_value(104) 3
132
called from ../../ut.h: shm_str_dup(501)
2 48
called from reply.c: build_contact(127)
1 132
called from t_hooks.c: insert_tmcb(108) 6
144
************************************************************TOTAL BYTES HELD
IN FRAGMENTS:
23792***************************************************************
To use - simply untar into a directory and run ./memalyze.pl
Hope it helps
Cheers
Jason
I am getting the following error when attempting the compile Kamailio on Sun 4140 (Intel) running Solaris 10 . Has anyone encountered this error before?
cfg.lex: In function `yylex':
cfg.lex:557: error: `yylval' undeclared (first use in this function)
cfg.lex:557: error: (Each undeclared identifier is reported only once
cfg.lex:557: error: for each function it appears in.)
cfg.lex:557: error: `FORWARD' undeclared (first use in this function)
cfg.lex:558: error: `FORWARD_TCP' undeclared (first use in this function)
cfg.lex:559: error: `FORWARD_TLS' undeclared (first use in this function)
cfg.lex:560: error: `FORWARD_SCTP' undeclared (first use in this function)
cfg.lex:561: error: `FORWARD_UDP' undeclared (first use in this function)
cfg.lex:562: error: `DROP' undeclared (first use in this function)
cfg.lex:563: error: `EXIT' undeclared (first use in this function)
cfg.lex:564: error: `RETURN' undeclared (first use in this function)
cfg.lex:565: error: `BREAK' undeclared (first use in this function)
cfg.lex:566: error: `SEND' undeclared (first use in this function)
cfg.lex:567: error: `SEND_TCP' undeclared (first use in this function)
cfg.lex:568: error: `LOG_TOK' undeclared (first use in this function)
cfg.lex:569: error: `ERROR' undeclared (first use in this function)
cfg.lex:570: error: `SETFLAG' undeclared (first use in this function)
<Truncated cgf.lex errors>
gmake: *** [lex.yy.o] Error 1
Thanks,
-Christa
________________________________
CONFIDENTIALITY NOTICE: This e-mail may contain information that is privileged, confidential or otherwise protected from disclosure. If you are not the intended recipient of this e-mail, please notify the sender immediately by return e-mail, purge it and do not disseminate or copy it.
Dear All,
We have some cisco gw that they send to the Kamailio in the first invite and
inside the VIA header an x-route-tag="The Gateway that the call entered".
I'm trying to add this to the acc module in order to have it recorded but
without sucess.
My config is this:
if (search("x-route-tag"))
{
avp(s:xroutetag) = $sel(@via);
xlog("----- We have a x-route-tag in the SIP msg avp:
$avp(s:xroutetag) -----");
};
I'm trying to add the VIA header to an avp so I could manipulate the string
but i cannot implement this.
Does anyone can suggest a way to add the *x-route-tag* value to an AVP?
Thank you in advance
Alex
sample VIA header: Via: SIP/2.0/UDP 10.0.0.15:5060;*
x-route-tag="tgrp:TANDEM-KOR"*
Hello all, I have seen some other complaining about this issue, but the posts were over 4 years ago so I would think xlite would be fixed at this point. I wanted to ensure my formatting was correct before I started trying other phones.
All I am trying to do at the moment is a simple redirect. My config is:
xlog("tu= $tu || $(tU{s.select,0,-}) \n");rewritehost("pbx.newhost.com");xlog("host is now $rd; all is $ru\n");sl_send_reply("300","Redirect");exit;
Insanely simple, however xlite is not redirecting the actual ip of the next invite/register/whatever. It only changes the RURI, but not the actual ip. Per the RFC, it looks like I am doing this right, the new host is in the contact field of the 300 and the client should then redirect its next packet to the new host.
Any ideas what I am doing wrong here? Or is this a known redirect issue. And given that, how supported is redirect? Should any system be based upon it?
Thanks for the help!-Eric