[Freeswitch-dev] mod_openzap using Digium TDM400P crashes

Michael Jerris mike at jerris.com
Wed Aug 15 11:56:48 EDT 2007

On 8/15/07 2:15 AM, "Craig Kowald" <craig.kowald at cubemicrosystems.com>

> 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 :).
I'll get that added to jira today

> 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))) {
This was the case on both line 804 and 734.  This is now fixed in svn.
Sorry for the sloppy commit on that one.

> 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 :/.

Can you try this with updated code and post your backtrace and your dialplan
of the extension you are dialing, and the freeswitch log of the call please.

Thanks for the bug hunting!


More information about the Freeswitch-dev mailing list