Asterisk segfault receive fax new install 5.211.65-2

I’ve just installed FreePBX distro 5.211.65-1 and ran the upgrade script 5.211.65-2. Asterisk segfaults when it attempts to receive a fax from the PRI and also if I dial 666. My guess is that I’m missing some config option since this is a clean install of the distro. I’ve filled in everything in Settings - Fax Configuration. Thank You in advance for any ideas so I can receive a fax.

[2013-12-20 14:29:44] VERBOSE[11258][C-00000001] pbx.c: – Executing [s@ext-fax:2] NoOp(“SIP/8500-00000001”, “Receiving Fax for: [email protected] , From: “Michael Hart” <8500>”) in new stack
[2013-12-20 14:29:44] VERBOSE[11258][C-00000001] pbx.c: – Executing [s@ext-fax:3] StopPlayTones(“SIP/8500-00000001”, “”) in new stack
[2013-12-20 14:29:44] VERBOSE[11258][C-00000001] pbx.c: – Executing [s@ext-fax:4] ReceiveFAX(“SIP/8500-00000001”, “/var/spool/asterisk/fax/1387571384.1.tif,f”) in new stack
[2013-12-20 14:29:44] VERBOSE[11258][C-00000001] res_fax.c: – Channel ‘SIP/8500-00000001’ receiving FAX ‘/var/spool/asterisk/fax/1387571384.1.tif’
[2013-12-20 14:29:51] Asterisk 11.7.0 built by root @ jenkins-el6-64.schmoozecom.net on a x86_64 running Linux on 2013-12-18 22:17:47 UTC

Dec 20 14:29:47 localhost kernel: asterisk[11258]: segfault at c02 ip 0000000000000c02 sp 00007fa7f58472e8 error 14 in asterisk[400000+232000]

As root:
yum install asterisk11-devel
wget http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.6pre21.tgz
tar -zxvf spandsp-0.0.6pre21.tgz
cd spandsp-0.0.6
./configure
make
make install
cd
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11.7.0.tar.gz
tar -zxvf asterisk-11.7.0.tar.gz
cp asterisk-11.7.0/res/res_fax_spandsp.c .
gcc -g -Wall -D_REENTRANT -D_GNU_SOURCE -fPIC -DAST_MODULE=“res_fax_spandsp” -c -o res_fax_spandsp.o res_fax_spandsp.c
gcc -shared -Xlinker -x /usr/lib/libspandsp.so -o res_fax_spandsp.so res_fax_spandsp.o
mv /usr/lib/asterisk/modules/res_fax_spandsp.so res_fax_spandsp.so.orig
cp res_fax_spandsp.so /usr/lib/asterisk/modules/res_fax_spandsp.so

Only issue now is res_fax_spandsp.c: WARNING T.30 ECM carrier not found errors while receiving a fax. At least the fax works now and Asterisk doesn’t segfault.

What version of Asterisk? And is this 32 or 64 bit?

Asterisk 11 both 32 & 64 bit have the issue

having the same issue. i posted in a few other threads about an earlier distro release. i’m having the same issue with the latest distro release. i will try recompiling spandsp and post my results.

typically, the T.30 ECM errors are fine if the fax is coming through.

Got to the gcc steps in your instructions and received the following errors:

[root@astrskuc1 ~]# gcc -g -Wall -D_REENTRANT -D_GNU_SOURCE -fPIC -DAST_MODULE=“res_fax_spandsp” -c -o res_fax_spandsp.o res_fax_spandsp.c
res_fax_spandsp.c: In function ‘t30_phase_e_handler’:
res_fax_spandsp.c:365: error: ‘res_fax_spandsp’ undeclared (first use in this function)
res_fax_spandsp.c:365: error: (Each undeclared identifier is reported only once
res_fax_spandsp.c:365: error: for each function it appears in.)
res_fax_spandsp.c: In function ‘spandsp_fax_read’:
res_fax_spandsp.c:623: error: ‘res_fax_spandsp’ undeclared (first use in this function)
res_fax_spandsp.c: At top level:
res_fax_spandsp.c:1119: error: ‘res_fax_spandsp’ undeclared here (not in a function)

Any insight would be greatly appreciated.

I figured out my errors.

The
-DAST_MODULE="res_fax_spandsp"
needs an escape before the quotes.

Also, if it’s for a 64 bit system, the paths are /usr/lib64/

I can also confirm that after recompiling spandsp, faxing is now working with the T.30 ECM error mentioned before.

OK I think we have this tracked down. We were asked to upgrade spandsp to solve a few problems another vendor was having and it looks like this is causing the problem. We should have this fixed shortly.

This should be resolved now. Just yum update to get the latest Asterisk that should have the fix.

Thanks for the quick fix Tony. If only I would of known about this solution a week ago it would have saved me a complete reload as suggested by your staff.

Sorry we were not seeing the issue here on our systems. It was a specific build of Asterisk that was causing it. Our build was slightly different then what you guys had.

Anyways I rolled a 5.211.65-3 upgrade just now that will resolve this issue for you.

Thank You, It’s working now.