[Freeswitch-dev] mod_openzap using Digium TDM400P crashes

Craig Kowald craig.kowald at cubemicrosystems.com
Wed Aug 15 22:49:16 EDT 2007


Done. svn update tells me that I have revision 5602 of freeswitch and
revision 308 of openzap.


I have pasted the full freeswitch output and the backtrace at:
http://pastebin.freeswitch.org/3186


In the gdb output you can see that (*frame)->codec is NULL which results
in the core dump.

>From my dialplan, the relevant extension is:

<extension name="Mobile">
 <condition field="destination_number" expression="^04([0-9]{8})$">
  <action application="log" data="Mobile"/>
  <action application="set" data="effective_caller_id_name=Craig
Kowald"/>
  <action application="set" data="effective_caller_id_number=11111111"/>
  <action application="bridge" data="sofia/gateway/PennyTel/$0"/>
 </condition>
</extension>


>From sofia.conf.xml, the relevant gateway is:

<gateway name="PennyTel">
 <param name="username" value="8881111111"/>
 <param name="password" value="password"/>
 <param name="realm" value="sip.pennytel.com"/>
</gateway>



I know you did not ask, but here is my openzap.conf.xml:
<configuration name="openzap.conf" description="OpenZAP Configuration">
 <settings>
  <param name="debug" value="0"/>
 </settings>
 <analog_spans>
   <span id="1">
   </span>
   <span id="2">
   </span>
 </analog_spans>
</configuration>

and /etc/openzap/openzap.conf:
[span zt]
name => OpenZAP
number => 1
fxs-channel => 1

[span zt]
name => OpenZAP
number => 1
fxo-channel => 4


In case it matters, I am using zaptel-1.4.4 and libpri-1.4.1.



Let me know if there is anything else I can do to help.


Regards,
Craig.

On Wed, 2007-08-15 at 11:56 -0400, Michael Jerris wrote:

> 
> 
> On 8/15/07 2:15 AM, "Craig Kowald" <craig.kowald at cubemicrosystems.com>
> wrote:
> 
> > 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!
> 
> Mike
> 
> 
> _______________________________________________
> Freeswitch-dev mailing list
> Freeswitch-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20070816/7512f2d4/attachment.html 


More information about the Freeswitch-dev mailing list