<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.14.1">
</HEAD>
<BODY>
Done. svn update tells me that I have revision 5602 of freeswitch and revision 308 of openzap.<BR>
<BR>
<BR>
I have pasted the full freeswitch output and the backtrace at:<BR>
<A HREF="http://pastebin.freeswitch.org/3186">http://pastebin.freeswitch.org/3186</A><BR>
<BR>
<BR>
In the gdb output you can see that (*frame)->codec is NULL which results in the core dump.<BR>
<BR>
>From my dialplan, the relevant extension is:<BR>
<BR>
<extension name="Mobile"><BR>
<condition field="destination_number" expression="^04([0-9]{8})$"><BR>
<action application="log" data="Mobile"/><BR>
<action application="set" data="effective_caller_id_name=Craig Kowald"/><BR>
<action application="set" data="effective_caller_id_number=11111111"/><BR>
<action application="bridge" data="sofia/gateway/PennyTel/$0"/><BR>
</condition><BR>
</extension><BR>
<BR>
<BR>
>From sofia.conf.xml, the relevant gateway is:<BR>
<BR>
<gateway name="PennyTel"><BR>
<param name="username" value="8881111111"/><BR>
<param name="password" value="password"/><BR>
<param name="realm" value="sip.pennytel.com"/><BR>
</gateway><BR>
<BR>
<BR>
<BR>
I know you did not ask, but here is my openzap.conf.xml:<BR>
<configuration name="openzap.conf" description="OpenZAP Configuration"><BR>
<settings><BR>
<param name="debug" value="0"/><BR>
</settings><BR>
<analog_spans><BR>
<span id="1"><BR>
</span><BR>
<span id="2"><BR>
</span><BR>
</analog_spans><BR>
</configuration><BR>
<BR>
and /etc/openzap/openzap.conf:<BR>
[span zt]<BR>
name => OpenZAP<BR>
number => 1<BR>
fxs-channel => 1<BR>
<BR>
[span zt]<BR>
name => OpenZAP<BR>
number => 1<BR>
fxo-channel => 4<BR>
<BR>
<BR>
In case it matters, I am using zaptel-1.4.4 and libpri-1.4.1.<BR>
<BR>
<BR>
<BR>
Let me know if there is anything else I can do to help.<BR>
<BR>
<BR>
Regards,<BR>
Craig.<BR>
<BR>
On Wed, 2007-08-15 at 11:56 -0400, Michael Jerris wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">On 8/15/07 2:15 AM, "Craig Kowald" <<A HREF="mailto:craig.kowald@cubemicrosystems.com">craig.kowald@cubemicrosystems.com</A>></FONT>
<FONT COLOR="#000000">wrote:</FONT>
<FONT COLOR="#000000">> I download mod_openzap on Aug 14 2007 and have been trying to use it</FONT>
<FONT COLOR="#000000">> with a Digium TDM400P card.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Sadly it has crashed on me in two places :(.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> I was going to raise a bug in Jira, but this module is not listed as a</FONT>
<FONT COLOR="#000000">> component under Project: endpoint modules, so I am just mentioning it</FONT>
<FONT COLOR="#000000">> here instead :).</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">I'll get that added to jira today</FONT>
<FONT COLOR="#000000">> The first crash I believe is due to the passing of an address to a</FONT>
<FONT COLOR="#000000">> pointer instead of just the pointer. mod_openzap.c:804 has the call:</FONT>
<FONT COLOR="#000000">> if (!(session = switch_core_session_request(&channel_endpoint_interface,</FONT>
<FONT COLOR="#000000">> NULL))) {</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> this should be:</FONT>
<FONT COLOR="#000000">> if (!(session = switch_core_session_request(channel_endpoint_interface,</FONT>
<FONT COLOR="#000000">> NULL))) {</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">This was the case on both line 804 and 734. This is now fixed in svn.</FONT>
<FONT COLOR="#000000">Sorry for the sloppy commit on that one.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> The second crash I do not fully understand :(. When I try to place a</FONT>
<FONT COLOR="#000000">> call using an analog phone connected to the TDM400P, freeswitch crashes</FONT>
<FONT COLOR="#000000">> after the first ring. I traced the crash to switch_core_io.c:152 due to</FONT>
<FONT COLOR="#000000">> (*frame)->codec being NULL.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> This should have been set via a preceding call which resolved to the</FONT>
<FONT COLOR="#000000">> function channel_read_frame in mod_openzap.c. Sadly this call returns at</FONT>
<FONT COLOR="#000000">> mod_openzap.c:464 without (*frame)->codec being set :(. This is because</FONT>
<FONT COLOR="#000000">> tech_pvt->cng_frame never has a value for codec. I do not understand</FONT>
<FONT COLOR="#000000">> anywhere near enough to know what the correct fix is for this. As a</FONT>
<FONT COLOR="#000000">> quick hack, I set a value for this at line 228 with:</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> tech_pvt->cng_frame.codec = &tech_pvt->read_codec;</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> but I am not sure this is the right solution :/.</FONT>
<FONT COLOR="#000000">Can you try this with updated code and post your backtrace and your dialplan</FONT>
<FONT COLOR="#000000">of the extension you are dialing, and the freeswitch log of the call please.</FONT>
<FONT COLOR="#000000">Thanks for the bug hunting!</FONT>
<FONT COLOR="#000000">Mike</FONT>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">Freeswitch-dev mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</A></FONT>
<FONT COLOR="#000000"><A HREF="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</A></FONT>
<FONT COLOR="#000000">UNSUBSCRIBE:<A HREF="http://lists.freeswitch.org/mailman/options/freeswitch-dev">http://lists.freeswitch.org/mailman/options/freeswitch-dev</A></FONT>
<FONT COLOR="#000000"><A HREF="http://www.freeswitch.org">http://www.freeswitch.org</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>