[Freeswitch-dev] mod_openzap using Digium TDM400P crashes

Craig Kowald craig.kowald at cubemicrosystems.com
Wed Aug 15 02:15:52 EDT 2007

I download mod_openzap on Aug 14 2007 and have been trying to use it
with a Digium TDM400P card.

Sadly it has crashed on me in two places :(.

I was going to raise a bug in Jira, but this module is not listed as a
component under Project: endpoint modules, so I am just mentioning it
here instead :).

The first crash I believe is due to the passing of an address to a
pointer instead of just the pointer. mod_openzap.c:804 has the call:
if (!(session = switch_core_session_request(&channel_endpoint_interface,
NULL))) {

this should be:
if (!(session = switch_core_session_request(channel_endpoint_interface,
NULL))) {

The second crash I do not fully understand :(. When I try to place a
call using an analog phone connected to the TDM400P, freeswitch crashes
after the first ring. I traced the crash to switch_core_io.c:152 due to
(*frame)->codec being NULL.

This should have been set via a preceding call which resolved to the
function channel_read_frame in mod_openzap.c. Sadly this call returns at
mod_openzap.c:464 without (*frame)->codec being set :(. This is because
tech_pvt->cng_frame never has a value for codec. I do not understand
anywhere near enough to know what the correct fix is for this. As a
quick hack, I set a value for this at line 228 with:

tech_pvt->cng_frame.codec = &tech_pvt->read_codec;

but I am not sure this is the right solution :/.

These two changes have allowed me to progress to the next stage of my
testing, but I would like to know if they are correct.


More information about the Freeswitch-dev mailing list