signalwire / freeswitch

FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
https://freeswitch.com/#getting-started
Other
3.61k stars 1.42k forks source link

Unable to receive fax #712

Open aloz opened 4 years ago

aloz commented 4 years ago

Hello,

Trying to receive faxes with FreeSWITCH (no T.38 support, fax machine -> PSTN -> Voip trunk -> FreeSWITCH) - but no luck: hangup with the status Unexpected message received, or Call terminated prematurely.

Have tested with a lot of fax machines - no luck (dialplan1.txt, freeswitch1.log)

the environment is: FreeSWITCH Version 1.10.3-release+git~20200511T105455Z~129de34d84~64bit (git 129de34 2020-05-11 10:54:55Z 64bit) Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-9-amd64 Architecture: x86-64

My the second approach was to use Hylafax with mod_spandsp (with the original config.FS per each softmodem instance provided with mod_spandsp to integrate it with FreeSWITCH, to bridge the call to the modem) - no luck as well (dialplan-hylafax,txt, hylafax-log.txt)

On receiving fax with FreeSWITCH - I hear how FS and the fax machine are negotiating. On receiving fax with faxgetty/Hylafax - I hear just single BEEP......BEEP......BEEP......

Please check the configuration and logs attached as a single ZIP file and advice.

Thank you!

p.s. One interesting thing: according the log, _FLOW T.30 Queuing phase C_NON_ECMRX but ECM status on

fs-fax-no-luck.zip

mjerris commented 4 years ago

try playing with ecm settings maybe? what codec? if anything but g711 don’t expect it to work at all, with g711 and low loss expect maybe 80% working without t.38

aloz commented 4 years ago

Thank you - the settings are g711 only. If to play with ecm - if no ecm than even no remote station id is received. Seems to me it was affected by the bad trunk quality, and may be is it possible to improve libspandsp or mod_spandsp to work with it ...

bwmarrin commented 4 years ago

@mjerris I'm curious, what's the percentage you'd estimate for t38? Unrelated to this specific issue, but I following the faxing questions a lot and I'm curious what numbers I should consider "normal".

aloz commented 4 years ago

You are right - my investigation shows that this is unable to receive PSTN inband T.30 fax even with g711... Thanks to Anthony Cosgrove - I have successfully received the fax over the pure SIP/RTP session Also have read an article in the past - one guy provided the statistics - some percents of success to receive T.30... Even have setup Asterisk with the latest spandsp library... Without success..,, So I think it was a miskake to receive T.30 over VOIP