Can't get ReceiveFax to work

Gives the following error.

[Nov 5 22:05:25] WARNING[21173]: pbx.c:3082 pbx_extension_helper: No application ‘ReceiveFAX’ for extension

exited non-zero on …

I am using Asterisk 1.6.0.1

Command core show application ReceiveFax gives following output.
Your application(s) is (are) not registered
Command ‘core show application ReceiveFax’ failed.

apps folder does have app_fax.so file

Any Idea what may be wrong?

If you do:

does it list RecieveFax as an application?

when I do core show application (PUSH TAB)

It doesn’t show ReceiveFax

Thanks

So, we know from this that the application is not loaded by Asteirsk. What fax integration app are you using?

From what I read ReceiveFAX works with Spandsp and I have spandsp-0.0.5pre4

I tried spandsp-0.0.6pre2 too but Asterisk doesn’t compile with it. Without Spandsp Asterisk doesn’t compile app_fax.c either.

With my current setup Asterisk compiles without any problem and app_fax.c also compiles without any problem. But somehow it doesn’t load. From what I read if app_fax loads it should provide ReceiveFax and SendFax functions.

But can’t see them loaded in asterisk. I hope somebody can help.

I ran into this same issue today. I found these steps on another site. I adapted them to solve this issue on 1.6.0.1.

#cd /usr/lib

rm -rf spandsp

cd /usr/include

rm -rf spandsp

cd /usr/src

wget soft-switch.org/downloads/sp … .5pre4.tgz

tar xzvf spandsp-0.0.5pre4.tgz

cd spandsp-0.0.5

./configure

make

make install

ldconfig -v

Once this was done. I did a make clean on my asterisk install then I did the ./configure, make menuselect, make, make install

I could not get asterisk to comple and run correctly if I used spandsp-0.0.6preX that is why I used the 0.0.5 version

These steps fixed the problem for me and should for you as well based on what your description.

zktech

Thanks zktech,

It worked. Only change I did was
./configure --prefix=/usr

because spandsp was installing in /usr/local/lib and ldconfig was not checking in /usr/local/lib folder.

disconnects giving phase_e_handler: Error transmitting fax. result=48:

Here is a partial debug.

Any clue how to fix it?

[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:385 transmit_audio: frame 2/64, len=320
[Nov 7 12:17:54] DEBUG[31428]: dsp.c:497 tone_detect: tone 1100, Ew=0.000000, Et=0.000000, s/n= nan
[Nov 7 12:17:54] DEBUG[31428]: channel.c:2780 ast_internal_timing_enabled: Internal timing is disabled (option_internal_timing=0 chan->timingfd=-1)
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:385 transmit_audio: frame 2/64, len=320
[Nov 7 12:17:54] DEBUG[31428]: dsp.c:497 tone_detect: tone 1100, Ew=0.000000, Et=0.000000, s/n= nan
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:385 transmit_audio: frame 5/0, len=0
[Nov 7 12:17:54] DEBUG[31428]: channel.c:2780 ast_internal_timing_enabled: Internal timing is disabled (option_internal_timing=0 chan->timingfd=-1)
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:385 transmit_audio: frame 2/64, len=320
[Nov 7 12:17:54] DEBUG[31428]: dsp.c:497 tone_detect: tone 1100, Ew=0.000000, Et=0.000000, s/n= nan
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:385 transmit_audio: frame 5/0, len=0
[Nov 7 12:17:54] DEBUG[31428]: channel.c:2780 ast_internal_timing_enabled: Internal timing is disabled (option_internal_timing=0 chan->timingfd=-1)
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:126 span_message: FLOW T.30 Send complete in phase T30_PHASE_E, state 2
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:161 phase_e_handler: Fax phase E handler. result=48
[Nov 7 12:17:54] WARNING[31428]: app_fax.c:173 phase_e_handler: Error transmitting fax. result=48: Disconnected after permitted retries.
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:126 span_message: FLOW T.30 Changing from state 2 to 32
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:126 span_message: FLOW T.30 Changing from phase T30_PHASE_E to T30_PHASE_CALL_FINISHED
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:126 span_message: FLOW FAX Set rx type 13
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:126 span_message: FLOW FAX FAX exchange complete
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:126 span_message: FLOW FAX Set tx type 13
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:126 span_message: FLOW FAX FAX exchange complete
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:385 transmit_audio: frame 2/64, len=320
[Nov 7 12:17:54] DEBUG[31428]: dsp.c:497 tone_detect: tone 1100, Ew=0.000000, Et=0.000000, s/n= nan
[Nov 7 12:17:54] DEBUG[31428]: app_fax.c:445 transmit_audio: Loop finished, res=0
[Nov 7 12:17:54] DEBUG[31428]: channel.c:3255 set_format: Set channel SIP/66.54.140.46-08ccf590 to write format ulaw
[Nov 7 12:17:54] DEBUG[31428]: channel.c:3255 set_format: Set channel SIP/66.54.140.46-08ccf590 to read format ulaw
[Nov 7 12:17:54] WARNING[31428]: app_fax.c:621 transmit: Transmission failed
– Auto fallthrough, channel ‘SIP/66.54.140.46-08ccf590’ status is ‘UNKNOWN’
[Nov 7 12:17:54] DEBUG[31428]: channel.c:1543 ast_softhangup_nolock: Soft-Hanging up channel ‘SIP/66.54.140.46-08ccf590’
[Nov 7 12:17:54] DEBUG[31428]: channel.c:1636 ast_hangup: Hanging up channel ‘SIP/66.54.140.46-08ccf590’
[Nov 7 12:17:54] DEBUG[31428]: chan_sip.c:4794 sip_hangup: Hangup call SIP/66.54.140.46-08ccf590, SIP callid 6d3a21fa2049c771413f10c3675c3e24@66.54.140.46
[Nov 7 12:17:54] DEBUG[31428]: chan_sip.c:2582 __sip_xmit: Trying to put ‘BYE sip:20’ onto UDP socket destined for 66.54.140.46:5060

I am having the same issue as well. I got it to work twice and then now everthing is as yours. I am banging on it tyring to figure it out. If I get any thing I will post it up. If you get somthing first please post your findings.

zktech

So far Couldn’t make any progress.

It looks it is not able to detect the fax tone.

in the debug dsp.c:497 tone_detect: tone 1100, Ew=0.000000, Et=0.000000, s/n= nan

Et and Ew are 0 so I am wondering if it is getting the audio signal properly. If some how raw PCM data can be saved from dsp.c probably it can be run and listened to see if CNG tone can be heard or not.

From debug it looks frame is voice frame of type Raw PCM data at 8000 Hz. Can’t figure out if it is completely silent or fax tone sound is there.

Are you attempting to use a codec like gsm?

No in my sip.conf I have
allow=ulaw

I don’t know why it still have frames in SLINEAR format.

debug data I posted in it frame 2/64 tells that fram is of type 2 and subclass 64. 2 represents Voice frame and 64 represents Slinear frame type.

Just a note.

in sip.conf

disallow=all
allow=alaw

worked this time. I will have to test more to see if it works every time or it worked just one time.