GithubHelp home page GithubHelp logo

gonicus / gofaxip Goto Github PK

View Code? Open in Web Editor NEW
120.0 27.0 43.0 405 KB

GOfax.IP - T.38 / Fax Over IP backend for HylaFAX using FreeSWITCH

License: GNU General Public License v2.0

Go 98.28% Shell 0.97% Dockerfile 0.75%

gofaxip's Introduction

GOfax.IP

GOfax.IP is a HylaFAX backend/connector providing Fax over IP support for HylaFAX using FreeSWITCH and SpanDSP through FreeSWITCH's mod_spandsp.

In contrast to solutions like t38modem, iaxmodem and mod_spandsp's softmodem feature, GOfax.IP does not emulate fax modem devices but replaces HylaFAX's faxgetty and faxsend processes to communicate directly with FreeSWITCH using FreeSWITCH's Event Socket interface.

GOfax.IP is designed to provide a standalone fax server together with HylaFAX and a minimal FreeSWITCH setup; the necessary FreeSWITCH configuration is provided.

Features

  • SIP connectivity to PBXes, Media Gateways/SBCs and SIP Providers with or without registration
  • Failover using multiple gateways
  • Support for Fax over IP using T.38 and/or T.30 audio over G.711
  • Native SIP endpoint, no modem emulation
  • Support for an arbitrary number of lines (depending on the used hardware)
  • Extensive logging and reporting: Writing xferfaxlog for sent/received faxes; Writing session log files for all sent/received faxes
  • Support for modem status reporting/querying using HylaFAX native tools and clients: faxstat etc.
  • Call screening for incoming faxes using HylaFAX' DynamicConfig
  • Call screening for outgoing faxes using GOfax.IP' DynamicConfigOutgoing

Components

GOfax.IP consists of two commands that replace their native HylaFAX conterparts

  • gofaxsend is used instead of HylaFAX' faxsend
  • gofaxd is used instead of HylaFAX' faxgetty. Only one instance of gofaxd is necessary regardless of the number of receiving channels.

Installation

We recommend running GOfax.IP on Debian 12 ("bookworm"), so these instructions cover Debian in detail. Of course it is possible to install and use GOfax.IP on other Linux distributions and possibly other Unixes supported by golang, FreeSWITCH and HylaFAX.

Dependencies

The official FreeSWITCH Debian repository can be used to obtain and install all required FreeSWITCH packages. To access the Repo, you first need to create a Signalwire API Token. Follow this guide: https://freeswitch.org/confluence/display/FREESWITCH/HOWTO+Create+a+SignalWire+Personal+Access+Token

After you created the api token you can continue with adding the repository

TOKEN=YOURSIGNALWIRETOKEN

apt-get update && apt-get install -y gnupg2 wget lsb-release

wget --http-user=signalwire --http-password=$TOKEN -O /usr/share/keyrings/signalwire-freeswitch-repo.gpg https://freeswitch.signalwire.com/repo/deb/debian-release/signalwire-freeswitch-repo.gpg

echo "machine freeswitch.signalwire.com login signalwire password $TOKEN" > /etc/apt/auth.conf
echo "deb [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" >> /etc/apt/sources.list.d/freeswitch.list

apt-get update

Installing packages

apt-get update
apt-get install hylafax-server freeswitch freeswitch-mod-commands freeswitch-mod-dptools freeswitch-mod-event-socket freeswitch-mod-sofia freeswitch-mod-spandsp freeswitch-mod-tone-stream freeswitch-mod-db freeswitch-mod-syslog freeswitch-mod-logfile

GOfax.IP

See releases for amd64 Debian packages.

Use dpkg -i to install the latest package.

See Building for instructions on how to build the binaries or Debian packages from source. This is only necessary if you want to use the latest/untested version or if you need another architecture than amd64!

Configuration

FreeSWITCH

FreeSWITCH has to be able to place received faxes in HylaFAX' recvq spool. The simplest way to achieve this is to run FreeSWITCH as the uucp user.

sudo chown -R uucp:uucp /var/log/freeswitch
sudo chown -R uucp:uucp /var/lib/freeswitch
sudo cp /usr/share/doc/gofaxip/examples/freeswitch.service /etc/systemd/system/
sudo systemctl daemon-reload

A very minimal FreeSWITCH configuration for GOfax.IP is provided in the repository.

sudo cp -r /usr/share/doc/gofaxip/examples/freeswitch/* /etc/freeswitch/

The SIP gateway to use has to be configured in /etc/freeswitch/gateways/default.xml. It is possible to configure multiple gateways for GOfax.IP.

Depending on your installation/SIP provider you have to either:

  • edit /etc/freeswitch/vars.xml and adapt the IP address FreeSWITCH should use for SIP/RTP.
  • remove the entire section concerning the sofia_ip variable (parameters sip-port, rtp-ip, sip-ip, ext-rtp-ip, ext-sip-ip)

GOfax.IP

Currently GOfax.IP does not use HylaFAX configuration files at all. All configurations for both gofaxd and gofaxsend are made in the INI-style configuration file /etc/gofax.conf which has to be customized.

HylaFAX

To make HylaFAX use gofaxsend for sending, the SendFaxCmd option has to be added to /etc/hylafax/config:

SendFaxCmd:		"/usr/bin/gofaxsend"

As sending batches of multiple jobs in one transmission is not supported by mod_spandsp, it is recommended to disable Hylafax' Batchmode in /etc/hylafax/config:

MaxBatchJobs:		1

A sample FaxDispatch script is included in /usr/share/doc/gofaxip/examples/hylafax/FaxDispatch, the available CALLID values set by gofaxd are documented there.

To have faxstat show modem/channel usage in it's status output, a modem configuration file has to exist. Note that GOfax.IP currently does not use HylaFAX' modem configuration files, so they can be empty, but they have to exist for faxstat to show the modem.

If /etc/gofax.conf is configured to manage 5 (virtual) modems, you have to create the (empty) configuration files manually:

sudo touch /etc/hylafax/config.freeswitch{0..4}

Operation

Starting

sudo systemctl restart freeswitch hylafax gofaxip hfaxd faxq

Logging

GOfax.IP logs everything it does to syslog.

Advanced Features

As the virtual modems visible in HylaFAX are not tied to preconfigured lines but assigned dynamically, it is not possible to assign static telephone numbers to individual modems. Instead, GOfax.IP can query a DynamicConfig script before trying to send outgoing faxes which works similarly to the DynamicConfig feature in HylaFAX' faxgetty. Using the sender's user id (owner), it can be used to set the Callerid, TSI and Header for each individual outgoing fax. It is also possible to reject an outgoing fax.

DynamicConfig for incoming faxes

DynamicConfig as used and documented in HylaFAX can be used by GOfax.IP. One option per line can be set, comments are not allowed.

Parameters The following arguments are provided to the DynamicConfig script for incoming faxes:

  • Used modem name
  • Caller-ID number
  • Caller-ID name
  • Destination (SIP To-User)
  • Gateway name

Supported options

  • RejectCall: true will reject the call. Default is to allow the call
  • LocalIdentifier: +1 234 567 will assign a CSI (Called Station Identifier) that will be used for this fax reception. The Default CSI can be set in gofax.conf in the ident parameter.

DynamicConfig for outgoing faxes

This is a special feature of GOfax.IP, a similar mechanism does not exist in traditional HylaFAX installations.

Parameters The following arguments are provided to the DynamicConfig script for outgoing faxes:

  • Used modem name
  • Owner (User ID as set sendfax -o or the FAXUSER environment variable, optinally verified by PAM)
  • Destination number
  • Job ID

Supported options

  • RejectCall: true will reject the outgoing fax. The fax will instantly fail and not be retried.
  • LocalIdentifier: +1 234 567 will assign a TSI (Transmitting Station Identifier) for this call. The Default TSI can be set in gofax.conf in the ident parameter.
  • TagLine: ACME will assign a header string to be shown on the top of each page. This does not support format strings as used by HylaFAX; if defined a header string is always shown with the current timestamp and page number as set by SpanDSP.
  • FAXNumber: 1337 will set the outgoing caller id number as used by FreeSWITCH when originating the call.
  • Gateway: somegw or Gateway: gw1,gw2 will set the SIP Gateway to use for sending the fax. The gateway has to be configured in FreeSWITCH. When multiple comma delimited gateways are given they will be tried in order. By default the gateway configured in GOFax.IP's configuration file is used.
  • CallPrefix: 99 will be prefixed to the original destination number and override the parameter callprefix from gofax.conf

Fallback from T.38 to SpanDSP softmodem

In rare cases we noticed problems with certain remote stations that could not successfully work with some T.38 Gateways we tested. In the case we observed, the remote tried to use T.4 1-D compression with ECM enabled. After disabling T.38 the fax was successfully received.

To work around this rare sort of problem and improve compatiblity, GOfax.IP can identify failed transmissions and dynamically disable T.38 for the affected remote station and have FreeSWITCH use SpanDSP's pure software fax implementation. The station is identified by caller id and saved in FreeSWITCH's mod_db. To enable this feature, set softmodemfallback = true in gofax.conf.

Note that this will only affect all subsequent calls from/to the remote station, assuming that the remote station will retry a failed fax. Entries in the fallback list are persistant and will not be expired by GOfax.IP. It is possible however to manually expire entries from mod_db. The used <realm>/<key>/<value> is fallback/<callerid>/<unix_timestamp>, with unix_timestamp being the time when the entry was added. See https://freeswitch.org/confluence/display/FREESWITCH/mod_db for details on mod_db.

A transmission is regarded as failed and added to the fallback database if SpanDSP reports the transmission as not successful and one of the following conditions apply:

  • Negotiation has happened multiple times
  • Negotiation was successful but transmitted pages contain bad rows

Setting the Displayname for outgoing faxes

Normally the Displayname is populated with the content of the sender field from the qfile. If you dont want to expose this information you can use the parameter cidname in gofax.conf to set the Displayname to the Calleridnum or any static string.

Override transmission parameters for individual destinations

It is possible to override transmission parameters for individual destinations by inserting entries to FreeSWITCHs internal database (mod_db). Before originating the transmission, gofaxsend checks if a matching database entry exists. The realm is override-$destination, where $destination is the target number. The found keys are used as parameters for the outgoing channel of FreeSWITCH.

Example:

Disable T.38 transmission for destination 012345:

fs_cli -x 'db insert/override-012345/fax_enable_t38/false'

See https://freeswitch.org/confluence/display/FREESWITCH/mod_spandsp#mod_spandsp-Controllingtheapp for mod_spandsp parameters.

See https://freeswitch.org/confluence/display/FREESWITCH/mod_db for a reference on how to use mod_db.

Building

GOfax.IP is implemented in Go, it can be built using go get.

go get github.com/gonicus/gofaxip/...

This will produce the binaries gofaxd and gofaxsend.

Build debian package

You need golang and dh-golang from jessie-backports.

With golang package from debian repository:

apt update
apt install git dh-golang dh-systemd golang
git clone https://github.com/gonicus/gofaxip
cd gofaxip
dpkg-buildpackage -us -uc -rfakeroot -b

If you dont have golang from debian repository installed use -d to ignore builddeps.

gofaxip's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gofaxip's Issues

gofaxsend config is inflexible

dialstring (in transmission.go) should be completely read from the config file.

because "api originate sofia/gateway/..." is hardcoded a lot of stuff isn't possible: i.e. the dialplan is completely bypassed because of this.

Client shows wrong state during fax transmission

I want to switch from a Hylafax+ installation with t38modem to GOfax.IP because t38modem is a pain.

My tests with GOfax.IP look very promising. It seems to be smart not to emulate modems in software.

I only do outbound faxing using YajHFC (Yet another Java HylaFAX client). With GOfax.IP the client reports faxes that are being sent mostly as "Suspended" rather then "Running". However in the list of modems that the client is showing I can see that one of the modems is sending the fax. After a while I get an email from Hylafax saying the fax was delivered successfully. In that moment the client puts the fax from the "Transmitting" tab to the "Sent" tab. That's all correct but during the actual transmission the state is wrong.

Using my Hylafax+ installation with t38modem the client shows the correct state of a fax. During transmission it says "Running".

Fax is not hanging up after successful completion

Hi Team,
i have installed gofaxip and freeswitch as per your instructions and started testing it. After some tries and adjustments in the config i could create successfully my first faxes with Hylafax and freeswitch, gofaxip however in almost all the cases the fax keeps the voip connection open forever even if spandsp reports through the event socket that the fax was successfully delivered. I have to shutdown freeswitch to get the fax to hang up and complete. This happens in almost all my test cases. See one log attached:

2017/04/22 23:23:07.052553 Processing HylaFAX Job 440 as e1062558-b04b-4fc9-8a58-5336b6511b2b
2017/04/22 23:23:07.089390 Originating channel to (FAX NUMBER) using gateway default
2017/04/22 23:23:13.932231 Originate successful
2017/04/22 23:23:13.932649 Call state change: EARLY
2017/04/22 23:23:13.933085 Call state change: ACTIVE
2017/04/22 23:23:21.784950 Remote ID: "", Transfer Rate: 14400, ECM=true
2017/04/22 23:23:34.373968 Page 1 sent: Image Size: 1728x1162, Compression: T.6, Comp Size: 1701 bytes, Bad Rows: 0
2017/04/22 23:23:54.439536 Page 2 sent: Image Size: 1728x1162, Compression: T.6, Comp Size: 26519 bytes, Bad Rows: 0

Hangs up only because i shutdown freeswitch manually after waiting another 6 mins to see if fax will hang up automatically.
2017/04/22 23:29:27.862314 Call state change: HANGUP
2017/04/22 23:29:27.865432 Success: true, Hangup Cause: SYSTEM_SHUTDOWN, Result: OK

Regards
Rob

sending

hi,
thanks so much for an amazing project,
im using Gofax.ip for less then a day ,
receiving works perfect, but when trying to send job statys on status "Waiting" also my modems status are always Down when doing faxstat -s
m i missing something?

CircleCI on pull requests

TIFF file cannot be opened.

/usr/local/sbin/gofaxd[1641]: sessionlog.go:69: Success: false, Hangup Cause: NORMAL_CLEARING, Result: TIFF/F file cannot be opened

/usr/local/sbin/gofaxd[1641]: sessionlog.go:69: Calling bin/faxrcvd [bin/faxrcvd recvq/fax00000007.tif freeswitch 00000007 TIFF/F file cannot be opened anonymous Anonymous 0000000000]

/usr/local/sbin/gofaxd[1641]: sessionlog.go:69: bin/faxrcvd ended successfully

Not sure what I should I be checking wonder if its a simple permissions issue.

I am running freeswitch as freeswitch user and hylafax as uucp.

Problems with outgoing

Hello,
First of all congrats on this amazing piece of software.I have been struggling for months on find a lightweight and simple solution for my t.38 problems.

Having that said,

I am having problems getting outbound faxing work.
Inbound works as a charm .

My gofaxip installation talks to a cisco 2821 gateway.

The problem is that the moment the other fax pickup it gets a busy signal right away, no time to even try to handshake.

My log is at shows :

(numbers have been replaced with XXXXX)

2015-02-23 14:46:13.635928 [DEBUG] switch_ivr_originate.c:2103 Parsing global variables
2015-02-23 14:46:13.635928 [DEBUG] switch_event.c:1688 Parsing variable [fax_enable_t38]=[true]
2015-02-23 14:46:13.635928 [DEBUG] switch_event.c:1688 Parsing variable [ignore_early_media]=[true]
2015-02-23 14:46:13.635928 [DEBUG] switch_event.c:1688 Parsing variable [origination_uuid]=[2cc21e97-b0f2-4b48-add6-0a6688077437]
2015-02-23 14:46:13.635928 [DEBUG] switch_event.c:1688 Parsing variable [origination_caller_id_number]=[210XXXXXXX]
2015-02-23 14:46:13.635928 [DEBUG] switch_event.c:1688 Parsing variable [origination_caller_id_name]=[panic]
2015-02-23 14:46:13.635928 [DEBUG] switch_event.c:1688 Parsing variable [fax_header]=[Nicholas Papadakos]
2015-02-23 14:46:13.635928 [DEBUG] switch_event.c:1688 Parsing variable [fax_use_ecm]=[true]
2015-02-23 14:46:13.635928 [DEBUG] switch_event.c:1688 Parsing variable [fax_ident]=[+30 210XXXXXXX]
2015-02-23 14:46:13.635928 [DEBUG] switch_event.c:1688 Parsing variable [fax_verbose]=[true]
2015-02-23 14:46:13.635928 [NOTICE] switch_channel.c:1055 New Channel sofia/fax/211XXXXXXX [2cc21e97-b0f2-4b48-add6-0a6688077437]
2015-02-23 14:46:13.635928 [DEBUG] mod_sofia.c:4627 (sofia/fax/211XXXXXXX) State Change CS_NEW -> CS_INIT
2015-02-23 14:46:13.635928 [DEBUG] switch_core_session.c:1388 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:13.635928 [DEBUG] switch_core_session.c:612 sofia/fax/211XXXXXXX set UUID=2cc21e97-b0f2-4b48-add6-0a6688077437
2015-02-23 14:46:13.635928 [DEBUG] switch_core_state_machine.c:472 (sofia/fax/211XXXXXXX) Running State Change CS_INIT
2015-02-23 14:46:13.635928 [DEBUG] switch_core_state_machine.c:512 (sofia/fax/211XXXXXXX) State INIT
2015-02-23 14:46:13.635928 [DEBUG] mod_sofia.c:87 sofia/fax/211XXXXXXX SOFIA INIT
2015-02-23 14:46:13.635928 [DEBUG] sofia_glue.c:1232 sofia/fax/211XXXXXXX sending invite version: 1.4.15 -1 32bit
Local SDP:
v=0
o=FreeSWITCH 1424694537 1424694538 IN IP4 192.168.0.110
s=FreeSWITCH
c=IN IP4 192.168.0.110
t=0 0
m=audio 26236 RTP/AVP 8 0 101 13
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

2015-02-23 14:46:13.635928 [DEBUG] switch_core_state_machine.c:40 sofia/fax/211XXXXXXX Standard INIT
2015-02-23 14:46:13.635928 [DEBUG] switch_core_state_machine.c:48 (sofia/fax/211XXXXXXX) State Change CS_INIT -> CS_ROUTING
2015-02-23 14:46:13.635928 [DEBUG] switch_core_session.c:1388 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:13.635928 [DEBUG] switch_core_state_machine.c:512 (sofia/fax/211XXXXXXX) State INIT going to sleep
2015-02-23 14:46:13.635928 [DEBUG] switch_core_state_machine.c:472 (sofia/fax/211XXXXXXX) Running State Change CS_ROUTING
2015-02-23 14:46:13.635928 [DEBUG] switch_core_state_machine.c:528 (sofia/fax/211XXXXXXX) State ROUTING
2015-02-23 14:46:13.635928 [DEBUG] mod_sofia.c:123 sofia/fax/211XXXXXXX SOFIA ROUTING
2015-02-23 14:46:13.635928 [DEBUG] switch_ivr_originate.c:67 (sofia/fax/211XXXXXXX) State Change CS_ROUTING -> CS_CONSUME_MEDIA
2015-02-23 14:46:13.635928 [DEBUG] switch_core_session.c:1388 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:13.635928 [DEBUG] switch_core_state_machine.c:528 (sofia/fax/211XXXXXXX) State ROUTING going to sleep
2015-02-23 14:46:13.635928 [DEBUG] switch_core_state_machine.c:472 (sofia/fax/211XXXXXXX) Running State Change CS_CONSUME_MEDIA
2015-02-23 14:46:13.635928 [DEBUG] switch_core_session.c:1053 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:13.635928 [DEBUG] sofia.c:6614 Channel sofia/fax/211XXXXXXX entering state [calling][0]
2015-02-23 14:46:13.635928 [DEBUG] switch_core_state_machine.c:547 (sofia/fax/211XXXXXXX) State CONSUME_MEDIA
2015-02-23 14:46:13.635928 [DEBUG] switch_core_state_machine.c:547 (sofia/fax/211XXXXXXX) State CONSUME_MEDIA going to sleep
2015-02-23 14:46:13.715919 [DEBUG] switch_core_session.c:1053 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:13.715919 [DEBUG] switch_core_session.c:1053 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:13.715919 [DEBUG] sofia.c:6614 Channel sofia/fax/211XXXXXXX entering state [proceeding][183]
2015-02-23 14:46:13.715919 [NOTICE] sofia.c:6716 Ring-Ready sofia/fax/211XXXXXXX!
2015-02-23 14:46:13.715919 [DEBUG] switch_channel.c:3277 (sofia/fax/211XXXXXXX) Callstate Change DOWN -> RINGING
2015-02-23 14:46:14.015922 [DEBUG] switch_core_session.c:1053 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:14.015922 [DEBUG] switch_core_session.c:1053 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:14.015922 [DEBUG] sofia.c:6614 Channel sofia/fax/211XXXXXXX entering state [proceeding][183]
2015-02-23 14:46:32.655921 [DEBUG] switch_core_session.c:1053 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:32.655921 [DEBUG] switch_core_session.c:1053 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:32.655921 [DEBUG] sofia.c:6614 Channel sofia/fax/211XXXXXXX entering state [completing][200]
2015-02-23 14:46:32.655921 [DEBUG] sofia.c:6624 Remote SDP:
--uniqueBoundary
Content-Type: application/sdp
Content-Disposition: session;handling=required

v=0
o=CiscoSystemsSIP-GW-UserAgent 5785 1586 IN IP4 192.168.0.254
s=SIP Call
c=IN IP4 192.168.0.254
t=0 0
m=audio 19228 RTP/AVP 8 101
c=IN IP4 192.168.0.254
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20

--uniqueBoundary
Content-Type: application/x-q931
Content-Disposition: signal;handling=optional
Content-Length: 14

�))����0'

--uniqueBoundary
Content-Type: application/gtd
Content-Disposition: signal;handling=optional

ANM,
PRN,isdn*,,,


--uniqueBoundary--

2015-02-23 14:46:32.655921 [DEBUG] switch_core_session.c:1053 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:32.655921 [DEBUG] switch_core_session.c:1053 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:32.655921 [DEBUG] sofia.c:6614 Channel sofia/fax/211XXXXXXX entering state [terminating][500]
2015-02-23 14:46:32.655921 [NOTICE] sofia.c:7530 Hangup sofia/fax/211XXXXXXX [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]
2015-02-23 14:46:32.655921 [DEBUG] switch_channel.c:3222 Send signal sofia/fax/211XXXXXXX [KILL]
2015-02-23 14:46:32.655921 [DEBUG] switch_core_session.c:1388 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:472 (sofia/fax/211XXXXXXX) Running State Change CS_HANGUP
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:735 (sofia/fax/211XXXXXXX) Callstate Change RINGING -> HANGUP
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:737 (sofia/fax/211XXXXXXX) State HANGUP
2015-02-23 14:46:32.655921 [DEBUG] mod_sofia.c:413 Channel sofia/fax/211XXXXXXX hanging up, cause: NORMAL_TEMPORARY_FAILURE
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:60 sofia/fax/211XXXXXXX Standard HANGUP, cause: NORMAL_TEMPORARY_FAILURE
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:737 (sofia/fax/211XXXXXXX) State HANGUP going to sleep
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:504 (sofia/fax/211XXXXXXX) State Change CS_HANGUP -> CS_REPORTING
2015-02-23 14:46:32.655921 [DEBUG] switch_core_session.c:1388 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:472 (sofia/fax/211XXXXXXX) Running State Change CS_REPORTING
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:823 (sofia/fax/211XXXXXXX) State REPORTING
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:104 sofia/fax/211XXXXXXX Standard REPORTING, cause: NORMAL_TEMPORARY_FAILURE
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:823 (sofia/fax/211XXXXXXX) State REPORTING going to sleep
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:498 (sofia/fax/211XXXXXXX) State Change CS_REPORTING -> CS_DESTROY
2015-02-23 14:46:32.655921 [DEBUG] switch_core_session.c:1388 Send signal sofia/fax/211XXXXXXX [BREAK]
2015-02-23 14:46:32.655921 [DEBUG] switch_core_session.c:1615 Session 1 (sofia/fax/211XXXXXXX) Locked, Waiting on external entities
2015-02-23 14:46:32.655921 [DEBUG] switch_ivr_originate.c:3723 Originate Resulted in Error Cause: 41 [NORMAL_TEMPORARY_FAILURE]
2015-02-23 14:46:32.655921 [NOTICE] switch_core_session.c:1633 Session 1 (sofia/fax/211XXXXXXX) Ended
2015-02-23 14:46:32.655921 [NOTICE] switch_core_session.c:1637 Close Channel sofia/fax/211XXXXXXX [CS_DESTROY]
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:626 (sofia/fax/211XXXXXXX) Running State Change CS_DESTROY
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:636 (sofia/fax/211XXXXXXX) State DESTROY
2015-02-23 14:46:32.655921 [DEBUG] mod_sofia.c:323 sofia/fax/211XXXXXXX SOFIA DESTROY
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:111 sofia/fax/211XXXXXXX Standard DESTROY
2015-02-23 14:46:32.655921 [DEBUG] switch_core_state_machine.c:636 (sofia/fax/211XXXXXXX) State DESTROY going to sleep

Kind Regards,

Retry when call dropped prematurely

Hello,
sometimes I get the error "The call dropped prematurely" when sending a fax. Unfortunately no attempt is made to resend the fax. Is there a setting to enable resend when this error happen?

Regards
Sascha

Hide outgoing fax jobs for other users

I have configured GOfax.IP with a "dynamicconfig" script. Works great. The last features missing in my configuration is hiding outgoing fax jobs between users.

User A should not see fax jobs (completed and currently sending) from user B.

Hylafax has a permission model for that:
http://www.hylafax.org/index.php?title=Handbook:Advanced_Server_Configuration:Job_Protection&oldid=3297

I'm using the "JobProtection" option in my current Hylafax+ setup (which I want to replace by GOfax.IP).

How does JobProtection work with GOfax.IP? Where do I have to configure it?

Looking for documentation and mailing list etc

Hi,

made my way through my first gofaxip+freeswitch install, sent the first faxes, great work :-)

On the way, I had quite a few stumbling points, mostly related to "freeswitch not talking to our 3CX PBX" - something for which the answers are not easy to find, because 3CX people do not know anything about freeswitch, and freeswitch documentation is way larger than the subset required to make GoFaxIP work. So, what I would have liked is a GoFaxIP mailing list or forum to discuss this sort of questions... is there something? Or is "github issues" what you recommend for "end user questions"?

While at it :-) - is there some sort of highlevel documentation how the different components interact? Like, which component is responsible for ECM handling? Is this done by GoFaxIP, or is the fax "just handed over" to FreeSwitch, and something there (spandsp?) handles it?

From what I read between the lines, it seems FreeSwitch/SpanDSP do all the heavy lifting - not only software DSP stuff, but also T.30 handling, ECM, etc. - but I might have misinterpreted something.

Another thing that would be very nice to have is a list of "sample gateway/default.xml" files for various PBXes people use - like, 3CX. Willing to contribute to that.

gofaxip cannot send faxes to itself

We would like to replace our analogue faxes with gofaxip and hylafax :). There will be scenarios where users send a fax with hylafax that hylafax itself has to receive again. However, the PBX (fusionPBX/freeswitch) says that the channel is BUSY. The fax server (hylafax/gofaxip/freeswitch) is registered as an extension on the PBX. Do I have to look for the solution on the hylafax side or on the PBX side?

Thanks in advance & kind regards

ATA

Hi I know that gofaxip hooks into the event socket and controls the dialplan. Is it possible to fax to a gateway from an ATA using FS?

Automated Tests

Hi guys,

I planned to create an automated tests for your app. I'm not sure if it is easy or not. Any advice?

Thanks,
Michael

gofax seemingly ignores answerafter

Hello,
In my /etc/gofax.conf, I have:
answerafter = 3000
and
waittime = 1000

In /etc/hylafax/config:
RingsBeforeAnswer: 4

Yet gofax picks up the call after the first ring:

Jun 14 19:36:08 example.com /usr/bin/gofaxd[16015]: server.go:81: Incoming Event Socket connection from 127.0.0.1:34048
Jun 14 19:36:08 example.com /usr/bin/gofaxd[16015]: server.go:109: Incoming call to 18675309 from 15555555 <15555555> via gateway default
Jun 14 19:36:08 example.com /usr/bin/gofaxd[16015]: server.go:163: 59e5cd39-2478-4878-8dbf-ca8024431062 Logging events for commid 00000010 to log/c00000010
Jun 14 19:36:08 example.com /usr/bin/gofaxd[16015]: sessionlog.go:70: Inbound channel UUID:  59e5cd39-2478-4878-8dbf-ca8024431062
Jun 14 19:36:08 example.com /usr/bin/gofaxd[16015]: sessionlog.go:70: Accepting call to 18675309 from 15555555 <15555555> via gateway default with commid 00000010

I use my SIP line for both gofaxip (on my Debian box)
and X-Lite (Win7 latop).

Any idea what could be wrong?

UNALLOCATED_NUMBER

Hi,

first of all, thanks for this project, it seems for me to be the best approach for getting Hylafax to work with a SIP account.

My problem: Receiving faxes is no problem at all, but sending always fails with an error UNALLOCATED_NUMBER.

Does anyone have an idea how to solve this? I don't even have an idea which further information could be helpful.

Best reagrds,
Markus

Nov 28 21:41:25 p20030057E80FF30002155DFFFE4B013C FaxQueuer[748]: SUBMIT JOB 5
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C /usr/bin/gofaxd[463]: device.go:101: /var/spool/hylafax/FIFO.freeswitch2 received message: L
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C /usr/bin/gofaxd[463]: device.go:208: Changing state of modem freeswitch2 to LOCKED
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C /usr/bin/gofaxd[463]: device.go:101: /var/spool/hylafax/FIFO.freeswitch2 received message: SB
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C /usr/bin/gofaxd[463]: device.go:183: Changing state of modem freeswitch2 to BUSY
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C /usr/bin/gofaxd[463]: faxq.go:73: Sending message to /var/spool/hylafax/FIFO: +freeswitch2:U
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C gofaxsend[2110]: sendqfile.go:140: Logging events for commid 00000014 to log/c00000014
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C gofaxsend[2110]: sessionlog.go:70: Processing HylaFAX Job 5 as f84dcaea-170d-4255-8f0d-0b1ae4086f78
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C gofaxsend[2110]: sessionlog.go:70: Originating channel to +49123456789 using gateway default
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C gofaxsend[2110]: sessionlog.go:70: Originate failed with hangup cause UNALLOCATED_NUMBER
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C gofaxsend[2110]: main.go:86: Error processing qfile sendq/q5: UNALLOCATED_NUMBER
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C gofaxsend[2110]: main.go:93: Exiting with status 0
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C FaxQueuer[748]: NOTIFY: bin/notify "sendq/q5" "requeued" "" "21:47"
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C /usr/bin/gofaxd[463]: device.go:101: /var/spool/hylafax/FIFO.freeswitch2 received message: SR
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C /usr/bin/gofaxd[463]: device.go:174: Changing state of modem freeswitch2 to READY
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C /usr/bin/gofaxd[463]: faxq.go:73: Sending message to /var/spool/hylafax/FIFO: +freeswitch2:N
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C /usr/bin/gofaxd[463]: faxq.go:73: Sending message to /var/spool/hylafax/FIFO: +freeswitch2:Rpcbffff01
Nov 28 21:41:26 p20030057E80FF30002155DFFFE4B013C FaxQueuer[748]: NOTIFY exit status: 0 (2117)

Known good FreeSWITCH versions

Have you got a list of FreeSWITCH versions that you've tested and where you're sure they work properly regarding T.38?

TIA

integration question for home usage

Can this work if I only have a dynamic WAN IP and no domain name mapped to your WAN.

Please correct me where i am probably wrong here:

  1. WAN IP will change occasionally, and so need any other external devices to be told when it does ?
  • so that callers calling in have the right IP.
  1. For PSTN, i need to sign up somewhere to get a DID ( a real phone number termination), and then do some config ?
  • The idea is so that people can call me from normal telephones, and i can call out.

Is this still maintained?

Hi gonicus,

Is this project still being maintained? Just don't see a lot of activity - of course that could be because it just works ;-)

Thanks,

Alex

Can't send or receive faxes

I installed everything according to the README and freeswitch according to https://freeswitch.org/confluence/display/FREESWITCH/Debian
freeswitch and gofaxip are running, but the status of hylafax is active (exited).
When running "faxstat" I get "Can not reach service hylafax at host "localhost"."
Also Calls to the registered number aren't answered.
In freeswitch I get this message when I call the number: "54d46b24-a772-4d34-83fe-8afde69b96c3 2022-04-04 19:53:13.214376 99.20% [ERR] switch_core_media.c:5517 a=crypto in RTP/AVP, refer to rfc3711"

What am I doing wrong?

I am using Debian11, everything is running inside a priviledged LXC container.

Dynamic Send

I'm looking to rewrite the CSID of outbound faxes dependent on the email address supplied to the hylafax client.

In Hylafax/T38Modem/FS I've been using a JobControl script like this:

!/bin/bash

JOBID=$1

GetJobParam ()
{
grep "^$1:" sendq/q$JOBID | cut -d : -f 2-
}

SetControlParam ()
{
echo "$1: "$2""
}

OWNER=$(GetJobParam owner)
EMAIL=$(GetJobParam mailaddr)

if EMAIL="[email protected]"
then

    SetControlParam LocalIdentifier "020 7666 6601"

else
SetControlParam LocalIdentifier "020 7666 6600"
fi

Am I correct in assuming that this will not work if I use it with gofaxip - and that the CSID will be overwritten with the static value in gofax.conf?

If so, I've had a look at the DynamicConfig stuff in gofax, eg:

Parameters The following arguments are provided to the DynamicConfig script for outgoing faxes:

Used modem name
Owner (User ID as set sendfax -o or the FAXUSER environment variable, optinally verified by PAM)
Destination number

I presume these are respectively the positional parameters supplied to the script, ie $1 to $3? If so, can a 4th parameter be added that supplies the script with the job ID number? This would mean I could reuse the same script with minor changes. The current parameters supplied would make for a much more complicated script to extract the email address of the client.

Best regards

Alex

Unable to open scheduler FIFO: No such device or address.

Not sure whether hylafax or gofax.ip is at fault, but now every sendfax command fails:
460 Failed to submit job 8: Unable to open scheduler FIFO: No such device or address.
I see the following in syslog trying to start gofax.ip:

Mai 31 15:05:41 musicbox /usr/local/sbin/gofaxd[2611]: main.go:70: GOfax.IP gofaxd development version starting
Mai 31 15:05:41 musicbox /usr/local/sbin/gofaxd[2611]: device.go:173: Changing state of modem freeswitch0 to READY
Mai 31 15:05:41 musicbox /usr/local/sbin/gofaxd[2611]: faxq.go:72: Sending message to /var/spool/hylafax/FIFO: +freeswitch0:N
Mai 31 15:06:29 musicbox HylaFAX[2645]: -> Got a: 127.0.0.1[13] Mai 31 15:06:29 musicbox HylaFAX[2645]:-> Got a: 53805[19]
Mai 31 15:06:29 musicbox HylaFAX[2645]: Filesystem has SysV-style file creation semantics.
Mai 31 15:06:29 musicbox HylaFAX[2645]: -> Got a: 127.0.0.1[13] Mai 31 15:06:29 musicbox HylaFAX[2645]:-> Got a: 43231[19]

Also, while freeswitch is registered as a sip client, according to the sip provider, gofax never seems to pick up any call, whether phone or fax. It just remains silent and I see no notifications in the system journal.

Instructions to add on to an existing asterisk pbxinaflash hylafax system

Congrats on your project, this seems like a great improvement over using spandsp analog modem emulator and going digital replacing hylafax's binaries with ones that go direct.
Could this be added on to an existing asterisk / freepbx / pbxinaflash / hylafax system. This seems possible since ultimately it's an add-on to hylafax which then talks to freeswitch to accomplish the fax send/receive.
Just asking if you have insight into doing this in the interest of providing maximum possible fax send/receive speed and quality.

DynamicConfigOutgoing and external

Inside DynamicConfigOutgoing i am calling a external script like this:
/usr/bin/php /script/dcu.php

I have set up postfix fax2mail with and postfix to block unautorised senders with spf and so on.
So inside this php script i like to connect to the database and se if the sender is autorised to send and if he is i can echo "RejectCall: false"; and if he is not i want to echo "RejectCall: false";

i databasen har jeg feks en tabell som innholder [email protected] or *@domain2.tld wich means [email protected] can send fax to mail. and all users of domain2.tld can also use fax to mail.

Anyone done something like this? is this the correct method todo this or should i make a script that postfix calls to check before running the /usb/bin/faxmail command?

appreciate all the help

DynamicConfig

Hi,
I'm not sure how to use the DynamicConfig.
Do you have an example?
Thx
Thomas

Need Help

Hi!

First of all .. Great software! I like it really much!

The question:
In your documentation i found:
"TagLine: ACME will assign a header string to be shown on the top of each page. This does not support format strings as used by HylaFAX; if defined a header string is always shown with the current timestamp and page number as set by SpanDSP."

Is it possible to change the TagLine format somehow? I did not find any further information about this!

Best regards from Austria!!!
David

can't find file /dev/freeswitch

Hi,
I have installed gofaxip on debian jessie on one system. There it work's with no problems.
On a second system I can receive fax but I'm unable to send a fax. I always get "file /dev/freeswitchx" not found. Is there a problem with the gofaxsend ?

Thx
Regards Thomas

build error on raspberrypi

Trying to build on a raspberrypi b+, with raspbian, Jessie:

jr@raspbian:/src $ git clone https://github.com/gonicus/gofaxip
Klone nach 'gofaxip'...
remote: Counting objects: 544, done.
remote: Total 544 (delta 0), reused 0 (delta 0), pack-reused 544
Empfange Objekte: 100% (544/544), 199.72 KiB | 0 bytes/s, Fertig.
Löse Unterschiede auf: 100% (267/267), Fertig.
Prüfe Konnektivität... Fertig.
jr@raspbian:
/src $ cd gofaxip
jr@raspbian:/src/gofaxip $ dpkg-buildpackage -us -uc -rfakeroot -b
dpkg-buildpackage: Quellpaket gofaxip
dpkg-buildpackage: Quellversion 1.1-1
dpkg-buildpackage: Quelldistribution unstable
dpkg-buildpackage: Quellen geändert durch Sebastian Denz [email protected]
dpkg-buildpackage: Host-Architektur armhf
dpkg-source --before-build gofaxip
fakeroot debian/rules clean
dh clean --buildsystem=golang --with=golang --with=systemd
dh_testdir -O--buildsystem=golang
dh_auto_clean -O--buildsystem=golang
dh_clean -O--buildsystem=golang
debian/rules build
dh build --buildsystem=golang --with=golang --with=systemd
dh_testdir -O--buildsystem=golang
dh_update_autotools_config -O--buildsystem=golang
dh_auto_configure -O--buildsystem=golang
debian/rules override_dh_auto_build
make[1]: Entering directory '/home/jr/src/gofaxip'
dh_auto_build -- -ldflags "-X main.version=1.1"
warning: "/..." matched no packages
go install -v -ldflags "-X main.version=1.1"
can't load package: package .: no buildable Go source files in /home/jr/src/gofaxip/obj-arm-linux-gnueabihf
dh_auto_build: go install -v -ldflags -X main.version=1.1 returned exit code 1
debian/rules:8: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 1
make[1]: Leaving directory '/home/jr/src/gofaxip'
debian/rules:5: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: Fehler: Fehler-Exitstatus von debian/rules build war 2
jr@raspbian:
/src/gofaxip $

Help wanted

Markus, thank you so much for this new twist and improvement on hylafax.

I believe there is a little typo in your documentation. Under the freeswitch header, you wrote:

sudo cp -r config/freeswitch /etc/freeswitch/

but on the following line, you talk about the sip gateway at /etc/freeswitch/gateways/default.xml

So the copy line should have been to /etc/ not /etc/freeswitch/ because that created /etc/freeswitch/freeswitch

Here is my question: would it be easy to integrate gofaxip with Avantfax?

Thanks. Keep up the good work with this project.

E: Sub-process /usr/bin/dpkg returned an error code (2)

Hi,
Can you help me to fix this error while installing packages.

root@admin:/gofaxip# apt install dh-golang dh-systemd git-buildpackage
Reading package lists... Done
Building dependency tree
Reading state information... Done
dh-golang is already the newest version.
git-buildpackage is already the newest version.
dh-systemd is already the newest version.
The following extra packages will be installed:
libmodem-vgetty-perl
The following packages will be upgraded:
libmodem-vgetty-perl
1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
Need to get 24.9 kB of archives.
After this operation, 45.1 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.nz.debian.org/debian/ jessie/main libmodem-vgetty-perl all 0.03-2 [24.9 kB]
Fetched 24.9 kB in 0s (29.6 kB/s)
Reading changelogs... Done
(Reading database ... 160016 files and directories currently installed.)
Preparing to unpack .../libmodem-vgetty-perl_0.03-2_all.deb ...
E: Sub-process /usr/bin/dpkg returned an error code (2)

Fax send fails on real modems configured to Hylafax

This is somewhat like a feature request.

Well, gofaxip works great to connect a Hylafax server to a modern sip based PBX system. However, if the Hylafax server has a real modem configured besides freeswitch modems, sending out faxes throgh the other modem will fail, as long as the globally configured SendFaxCmd always pipes the fax send request to "gofaxsend". I tried configured SendFaxCmd per modem basis, but unfortunatley this won't work.

I'm thinking about writing a wrapper script which is used in SendFaxCmd, calling (original) faxsend or gofaxsend dependig on the addressed modem.

However, could it be possible to make this descision inside of gofaxsend? If modem line is something else than freeswitch[0-9], a (configurable) fallback SendFaxCmd is called, defaulting to faxsend...

SIP Display Name

By default, the SIP Display Name (used in SIP From: attribute) is set to Hylafax username.

bildschirmfoto_2017-02-01_um_12_26_10

Is it possible to disable the display-info attribute or defaulting it to the username value or something else? Maybe this is possible by manipulating freeswitch / mod_sofia parameters, but I did not found anything working in the documentation.

Install instructions could use some improvement

Let me start by saying thank you for authoring this project and posting it. The amount of time, effort and will to prioritize open source coding over other personal priorities is commendable and I really appreciate your effort.

I'm more of a freeswitch guy who is/was trying to maintain a faxserver on Asterisk and really looking forward to just using freeswitch. I'm not a complete newbie but had some trouble with the initial parts of the instructions. Starting with a clean Debian install, here are some of the things I had to do:

Please correct / update if there is a better way or its not the correct way....

sudo apt-get install git
sudo apt-get install build-essential
wget https://storage.googleapis.com/golang/go1.4.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.4.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin

mkdir ~/gofaxip
cd ~/gofaxip
git init
git clone https://github.com/gonicus/gofaxip.git
export GOPATH=$(pwd)
go install gofaxd gofaxsend
sudo cp bin/* /usr/local/sbin/

Feature request: Support Asterisk

It seems, Freeswitch is lagging behind quite a bit. It does not support Debian 9, which includes current Raspbian. Plus, it is not part of Debian, and for non x86 platforms needs to be built from source.
Would it be possible to instead use Asterisk, which seems to be much better integrated with Debian, it is available directly from the repos for any Debian and Ubuntu version.

Call gets dropped before data is transmitted

I have been trying to send a fax from a raspi 3 with Hylafax, Freeswitch and gofax.ip to a PC with Hylafax and Capi4hylafax (the only fax machine I have available for testing)
The sending machine says:

Mai 25 11:06:34 musicbox gofaxsend[28173]: sessionlog.go:69: Call state change: ACTIVE
Mai 25 11:06:40 musicbox gofaxsend[28173]: sessionlog.go:69: Remote ID: "+49 331 7048219", Transfer Rate: 14400, ECM=true
Mai 25 11:06:45 musicbox gofaxsend[28173]: sessionlog.go:69: Call state change: HANGUP
Mai 25 11:06:45 musicbox gofaxsend[28173]: main.go:92: Exiting with status 0
Mai 25 11:06:45 musicbox /usr/local/sbin/gofaxd[22464]: device.go:100: /var/spool/hylafax/FIFO.freeswitch3 received message: SR
Mai 25 11:06:45 musicbox /usr/local/sbin/gofaxd[22464]: device.go:173: Changing state of modem freeswitch3 to READY
Mai 25 11:06:45 musicbox /usr/local/sbin/gofaxd[22464]: faxq.go:72: Sending message to /var/spool/hylafax/FIFO: +freeswitch3:N
Mai 25 11:06:45 musicbox /usr/local/sbin/gofaxd[22464]: faxq.go:72: Sending message to /var/spool/hylafax/FIFO: +freeswitch3:Rpcbffff01
Mai 25 11:06:45 musicbox FaxQueuer[22075]: NOTIFY: bin/notify "sendq/q5" "requeued" "" "11:13"
Mai 25 11:06:45 musicbox FaxQueuer[22075]: NOTIFY exit status: 0 (28185)

the receiving machine says:

May 25 11:04:41.30: [ 5212]: c2faxrecv - INFO: The SpoolDirectory is /var/spool/hylafax.
May 25 11:04:41.30: [ 5212]: c2faxrecv - INFO: Changed to effective user "uucp" and group "dialout" succesfully.
May 25 11:04:41.30: [ 5212]: c2faxrecv - INFO: 
Device "faxCAPI" uses 2 receive thread(s) with the following config:
May 25 11:04:41.30: [ 5212]: c2faxrecv - INFO: Controller=1 : accept all
May 25 11:04:41.30: [ 5212]: c2faxrecv - INFO: 
Started in Hylafax mode and waiting on incoming calls.
May 25 11:06:33.36: [ 5212]: c2faxrecv - INFO: SESSION BEGIN 000000675 +49.331.7048219
May 25 11:06:33.36: [ 5212]: c2faxrecv - INFO: Incoming analog call on controller 1 to 7048219.
May 25 11:06:46.45: [ 5212]: c2faxrecv - INFO: Connection is droped with reason 0x3490 (Normal call clearing).
May 25 11:06:46.45: [ 5212]: c2faxrecv - INFO: SESSION END

So clearly it isn't working, but I can't figure out which side is at fault. How can I find out which one is?

gofaxip and IAXmodem mixed usage

Hello,

I have a question regarding gofaxip and IAXmodem mixed usage.

What I am trying to achieve is to send some fax'es via gofaxsend and some via IAXmodems.

Is it possible for gofaxip to use IAXmodems' configs?

Best regards,
Dragan Saraginov

DynamicConfig

Hello,

I need to change the outgoing caller id (faxnummer in the config) based on the source email adress where the fax is coming from. Is this possible with DynamicConfigOutgoing? If yes, how do i access the email adress/domain in the script?

And another thing. In your example config you wrote

; Support for rejecting calls and setting CSI for incoming faxes
;dynamicconfig = etc/DynamicConfig

and

; Support for settings TSI/Header and Callerid for outgoing faxes
;dynamicconfig = etc/DynamicConfigOutgoing

how can the same option have two values? Or is it either that or that? Does the script get called every time a fax is beeing send and received so you have one script for both?

Fax incorrectly reported as completed by hylafax

Hi,

I've experienced some intermittent issues where we have had a fax fail with no pages sent, yet Hylfax has returned an email to the sender indicating the fax is complete (Subject: Notification of facsimile job Trade (6809) to 90035316130401: done) - here's the content of the email:

 ------- job status -------
  Destination: 90035316130401
        JobID: 6809
      GroupID: 6809
       Sender: jds
     Mailaddr: [email protected]
       CommID: 00009069
        Modem: any

Submitted From: 172.17.40.163
Page Width: 210 (mm)
Page Length: 297 (mm)
Resolution: 196 (lpi)
Status: The HDLC carrier did not stop in a timely manner
Dialogs: 1
Dials: 0
Calls: 1
Pages: 0
TotPages: 1
Attempts: 0
Dirnum:

Here's the relevant line in xferfaxlog:
09/11/17 14:41 SEND 00009069 freeswitch0 6809 Trade [email protected] "90035316130401" "+11 111 111111" 65576 0 00:00:40 00:00:40 The HDLC carrier did not stop in a timely manner jds ""

And the last part of the logs from freeswitch:

8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:276 FLOW T.30 T4-flagged expired in phase B_RX, state D_POST_TCF. An HDLC frame lasted too long.
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:276 FLOW T.30 Status changing to The HDLC carrier did not stop in a timely manner
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:496 ==============================================================================
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:508 Fax processing not successful - result (5) The HDLC carrier did not stop in a timely manner.
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:513 Remote station id: +11 111 111111
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:514 Local station id: 020 7063 8601
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:515 Pages transferred: 0
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:517 Total fax pages: 1
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:518 Image resolution: 8040x7700
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:519 Transfer Rate: 14400
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:521 ECM status on
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:522 remote country:
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:523 remote vendor:
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:524 remote model:
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:526 ==============================================================================
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:276 FLOW T.30 Changing from state D_POST_TCF to CALL_FINISHED
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:276 FLOW T.30 Changing from phase B_RX to CALL_FINISHED
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:276 FLOW T.38T Set rx type 9
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:276 FLOW T.38T Set tx type 9
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:276 FLOW T.38T FAX exchange complete
8753919e-9db6-4cac-b133-9e2108c201c4 2017-09-11 14:42:05.290999 [DEBUG] mod_spandsp_fax.c:276 FLOW T.30 Call completed

I've not seen this on another fax server we use that uses T38Modem - however I much prefer gofax as it's an awful lot easier to build and maintain!

I've had a look at the go code and I've not been able to see where there might be an issue or quite where I would insert an extra check to make sure Hylafax definitively fails such a job.

Any ideas?

Best regards
Alex

DynamicConfigOutgoing

It is not clear how to use DynamicConfigOutgoing and how to connect to the users in hylafax.

A little howto or just simple examples could be very nice

Thank you.

Avantfax and gofaxip

Not really a problem, just wanted to comment that a pretty much avantfax stock install on debian works wonderfully with gofaxip for OUTBOUND faxing. I was able to send almost 400 faxes today during our tests.

Heres my /var/spool/hylafax/etc/config

LogFacility:            daemon
CountryCode:            1
AreaCode:               787
LongDistancePrefix:     1
InternationalPrefix:    011
DialStringRules:        etc/dialrules
ServerTracing:          1

MaxBatchJobs: 0
MaxConcurrentCalls: 5

# GOFAX

SendFaxCmd:     "/usr/local/sbin/gofaxsend"

#
## AvantFAX
#
NotifyCmd:      bin/notify.php

Inbound faxing is another story however, later on I will tackle that.

Thanks a lot!

compile error

Hi,

I'm trying to set up your program on Ubuntu 12.04.5 with freeswitch 1.4 and hylafax because the modem emulation didn't work out for me.
However when I try to compile the program with make I get this

go install -ldflags "-X main.version 'git-625c3ed'" gofaxsend
'# gofaxlib/logger
src/gofaxlib/logger/logger.go:26: undefined: syslog.LOG_DAEMON
'# github.com/fiorix/go-eventsocket/eventsocket
src/github.com/fiorix/go-eventsocket/eventsocket/eventsocket.go:87: function ends without a return statement
src/github.com/fiorix/go-eventsocket/eventsocket/eventsocket.go:261: function ends without a return statement
src/github.com/fiorix/go-eventsocket/eventsocket/eventsocket.go:325: function ends without a return statement
src/github.com/fiorix/go-eventsocket/eventsocket/eventsocket.go:371: function ends without a return statement
src/github.com/fiorix/go-eventsocket/eventsocket/eventsocket.go:454: function ends without a return statement
make: *** [bin/gofaxsend] Error 2`

Did I miss something?

docker build

any chance we can have a docker built to make it easier for people to get involved ?

I can help bring one up, but do you want this as a PR ?

faxrcvd modem#

gofaxd is not using the correct name for the modem when running faxrcvd. it then using default "freeswitch" instead of freeswitch0, freeswitch2 etc.
faxes are received.

playing around in avantfax, it wants that otherwise creates a "new unconfigure modem" to show up.

Is that by design, gofaxd to omit the modem # to faxrcvd ?

Thanks! Cool project!!

..
30.12.2019 01:03 | ArchiveIn> fax '/var/www/avantfax/faxes/recvd/2019/12/30/Fax/00000006' from fax number 'Fax' - freeswitch
..
30.12.2019 01:03 | faxrcvd> executing: recvq/fax00000006.tif freeswitch '00000072' '' CIDNum: '' CIDName: '' DID: ''

Need to setup the gateway to be used with DynamicConfigOutgoing

It's possible from the DynamicConfigOutgoing script to setup the gateway to be used in and outbound fax send?

For the pourpose of accounting, we need to send out faxes by diferent gateways definitions on freeswitch, we are able to setup the CallerID from the DynamicConfigOugoing script, but don't find a way to setup witch gw to use.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.