mod_h323 on FreeSWITCH
Posted: Fri Apr 25, 2014 5:52 am
I am setting up a h323 trunk between FreeSWITCH and Avaya. I figured this is probably a better place to discuss it than any other forum.
First of all, it works pretty well. But there are niggles. I am using mod_h323.cpp Version 0.0.58 on FreeSwitch 1.2.22 for now.
1) First I wanted to ensure there are no memory leaks. But that was impossible to figure out since mod_h323 was disabled from unloading. So I enabled unloading. Well, it unloads eventually, but takes about 2-3 minutes to do so. Does anyone know why it takes so long? Is some thread is locked?
2) But the late unloading allowed for a VLD report. I noticed couple of memory leaks right away.
And this one:
So I added switch_safe_free(tech_pvt->token) as the last line in FSH323Connection::~FSH323Connection(). The VLD log shows no leaks any more.
3) When I increase the number of simultaneous calls, the module goes into some strange state. It sometimes crashes the freeswitch or just hangs there doing nothing. I'll start looking into this.
Suggestions and hints are welcome...
First of all, it works pretty well. But there are niggles. I am using mod_h323.cpp Version 0.0.58 on FreeSwitch 1.2.22 for now.
1) First I wanted to ensure there are no memory leaks. But that was impossible to figure out since mod_h323 was disabled from unloading. So I enabled unloading. Well, it unloads eventually, but takes about 2-3 minutes to do so. Does anyone know why it takes so long? Is some thread is locked?
2) But the late unloading allowed for a VLD report. I noticed couple of memory leaks right away.
Code: Select all
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_h323_shutdown)
{
switch_safe_free(mod_h323_globals.context);
switch_safe_free(mod_h323_globals.dialplan);
switch_safe_free(mod_h323_globals.codec_string);
switch_safe_free(mod_h323_globals.rtp_timer_name); // This one was missing, leading to a leak.
.
.
}
Code: Select all
void FSH323Connection::AttachSignalChannel(const PString & token,
H323Transport * channel,
PBoolean answeringCall)
{
.
tech_pvt->token = strdup((const char *)token); // This is not freed later.
.
.
}
3) When I increase the number of simultaneous calls, the module goes into some strange state. It sometimes crashes the freeswitch or just hangs there doing nothing. I'll start looking into this.
Suggestions and hints are welcome...