Incoming faxes not saving/converting

Post your configuration issues while installing ictfax

Incoming faxes not saving/converting

Postby mdurant » Thu Aug 08, 2013 1:28 pm

After several hours of tweaking and adjusting settings, I have ICTFAX set up with a trunk from our existing phone system. Calls traverse the trunk properly, ringing is heard, Freeswitch/Plivo answer the call and fax tones are heard.

When I try to transmit a fax to ICTFAX using an actual fax machine (I've tried several different models, and test services, all with the same results), after the initial fax negotiation tones, the line remains open for roughly 30-45 seconds, then the fax machine indicates a communications error, and the plivo logs show that a fax was received and an email is transmitted, but the page count is missing and there is no attachment.

/var/www/ictfax/sites/default/files/ictfax/inbox/ remains empty throughout this process, despite a file name being logged in plivo-outbound.log and /tmp/mytest.txt that would indicate a tif file should be there.

The only errors/warnings that I have observed are:

/usr/plivo/tmp/plivo-outbound.log
Code: Select all
2013-08-07 20:58:26,396 plivo-outbound[3414]: INFO: (7) Fetching POST http://127.0.0.1/ictfax/index.php?q=ictfax/receive_fax with {'q': 'ictfax/receive_fax', 'To': '1931xxxxxxx', 'Direction': 'inbound', 'From': '1931xxxxxxx', 'variable_duration': '', 'CallerName': '+1931xxxxxxx', 'CallUUID': '039a154a-ffce-11e2-92d8-d55847b28f6f', 'CallStatus': 'ringing'}
2013-08-07 20:58:26,747 plivo-outbound[3414]: INFO: (7) Sent to POST http://127.0.0.1/ictfax/index.php?q=ictfax/receive_fax with {'q': 'ictfax/receive_fax', 'To': '1931xxxxxxx', 'Direction': 'inbound', 'From': '1931xxxxxxx', 'variable_duration': '', 'CallerName': '+1931xxxxxxx', 'CallUUID': '039a154a-ffce-11e2-92d8-d55847b28f6f', 'CallStatus': 'ringing'} -- Result:






<?xml version="1.0" encoding="UTF-8"?>
        <Response>
        <ReceiveFax>/usr/ictfax/sites/default/files/ictfax/inbox/26.tif</ReceiveFax>
        <Redirect>http://127.0.0.1/ictfax/index.php?q=ictfax/send_email/26</Redirect>
        </Response>
2013-08-07 20:58:26,747 plivo-outbound[3414]: INFO: (7) Requested RESTXML to http://127.0.0.1/ictfax/index.php?q=ictfax/receive_fax
2013-08-07 20:58:26,747 plivo-outbound[3414]: DEBUG: (7) Answering because Element ReceiveFax need it
2013-08-07 20:58:26,747 plivo-outbound[3414]: DEBUG: (7) Execute: answer args=, uuid='', lock=True, loops=1
2013-08-07 20:58:26,748 plivo-outbound[3414]: DEBUG: (7) Response: <CommandResponse headers={'Content-Type': 'command/reply', 'Reply-Text': '+OK'}, body=>
2013-08-07 20:58:26,748 plivo-outbound[3414]: INFO: (7) [ReceiveFax] /usr/ictfax/sites/default/files/ictfax/inbox/26.tif {'loop': 1}
2013-08-07 20:58:26,748 plivo-outbound[3414]: DEBUG: (7) Faxing 1 times
2013-08-07 20:58:26,749 plivo-outbound[3414]: DEBUG: (7) Execute: set args=fax_enable_t38=true, uuid='', lock=True, loops=1
2013-08-07 20:58:26,749 plivo-outbound[3414]: DEBUG: (7) Response: <CommandResponse headers={'Content-Type': 'command/reply', 'Reply-Text': '+OK'}, body=>
2013-08-07 20:58:26,749 plivo-outbound[3414]: DEBUG: (7) Execute: rxfax args=/usr/ictfax/sites/default/files/ictfax/inbox/26.tif, uuid='', lock=True, loops=1
2013-08-07 20:58:26,750 plivo-outbound[3414]: DEBUG: (7) Response: <CommandResponse headers={'Content-Type': 'command/reply', 'Reply-Text': '+OK'}, body=>
2013-08-07 20:58:57,815 plivo-outbound[3414]: DEBUG: (7) ReceiveFax done (_none_)
2013-08-07 20:58:57,816 plivo-outbound[3414]: INFO: (7) ReceiveFax Finished
2013-08-07 20:58:57,816 plivo-outbound[3414]: INFO: (7) [ReceiveFax] Done
2013-08-07 20:58:57,816 plivo-outbound[3414]: INFO: (7) [Redirect] http://127.0.0.1/ictfax/index.php?q=ictfax/send_email/26 {'method': 'POST'}
2013-08-07 20:58:57,817 plivo-outbound[3414]: INFO: (7) [Redirect] Done (redirect)
2013-08-07 20:58:57,817 plivo-outbound[3414]: INFO: (7) Redirecting to POST http://127.0.0.1/ictfax/index.php?q=ictfax/send_email/26 to fetch RESTXML
2013-08-07 20:58:57,817 plivo-outbound[3414]: DEBUG: (7) Execute: api args='uuid_getvar 039a154a-ffce-11e2-92d8-d55847b28f6f plivo_transfer_progress'
2013-08-07 20:58:57,820 plivo-outbound[3414]: DEBUG: (7) Response: <ApiResponse headers={'Content-Length': '7', 'Content-Type': 'api/response'}, body=_undef_>
2013-08-07 20:58:57,846 plivo-outbound[3414]: INFO: (7) Fetching RESTXML from http://127.0.0.1/ictfax/index.php?q=ictfax/send_email/26
2013-08-07 20:58:57,847 plivo-outbound[3414]: DEBUG: (7) Extra params found in url query for POST http://127.0.0.1/ictfax/index.php?q=ictfax/send_email/26
2013-08-07 20:58:57,847 plivo-outbound[3414]: INFO: (7) Fetching POST http://127.0.0.1/ictfax/index.php?q=ictfax/send_email/26 with {'q': 'ictfax/send_email/26', 'To': '1931xxxxxxx', 'Direction': 'inbound', 'From': '1931xxxxxxx', 'CallerName': '+1931xxxxxxx', 'CallUUID': '039a154a-ffce-11e2-92d8-d55847b28f6f', 'CallStatus': 'in-progress'}
2013-08-07 20:58:58,644 plivo-outbound[3414]: INFO: (7) Sent to POST http://127.0.0.1/ictfax/index.php?q=ictfax/send_email/26 with {'q': 'ictfax/send_email/26', 'To': '1931xxxxxxx', 'Direction': 'inbound', 'From': '1931xxxxxxx', 'CallerName': '+1931xxxxxxx', 'CallUUID': '039a154a-ffce-11e2-92d8-d55847b28f6f', 'CallStatus': 'in-progress'} -- Result:






Could not access file: /usr/ictfax/sites/default/files/ictfax/inbox/26.pdf
<?xml version="1.0" encoding="UTF-8"?>
    <Response>
      <Hangup />
    </Response>
2013-08-07 20:58:58,644 plivo-outbound[3414]: INFO: (7) Requested RESTXML to http://127.0.0.1/ictfax/index.php?q=ictfax/send_email/26
2013-08-07 20:58:58,645 plivo-outbound[3414]: ERROR: (7) Processing Call Failure !
2013-08-07 20:58:58,645 plivo-outbound[3414]: ERROR: (7) Invalid RESTXML Response Syntax: syntax error: line 1, column 0
2013-08-07 20:58:58,646 plivo-outbound[3414]: ERROR: (7) Traceback (most recent call last):
2013-08-07 20:58:58,646 plivo-outbound[3414]: ERROR: (7)   File "/usr/plivo/local/lib/python2.7/site-packages/plivo/rest/freeswitch/outboundsocket.py", line 447, in _run
2013-08-07 20:58:58,647 plivo-outbound[3414]: ERROR: (7)     self.process_call()
2013-08-07 20:58:58,647 plivo-outbound[3414]: ERROR: (7)   File "/usr/plivo/local/lib/python2.7/site-packages/plivo/rest/freeswitch/outboundsocket.py", line 484, in process_call
2013-08-07 20:58:58,647 plivo-outbound[3414]: ERROR: (7)     self.lex_xml()
2013-08-07 20:58:58,647 plivo-outbound[3414]: ERROR: (7)   File "/usr/plivo/local/lib/python2.7/site-packages/plivo/rest/freeswitch/outboundsocket.py", line 563, in lex_xml
2013-08-07 20:58:58,647 plivo-outbound[3414]: ERROR: (7)     % str(e))
2013-08-07 20:58:58,648 plivo-outbound[3414]: ERROR: (7) RESTSyntaxException: Invalid RESTXML Response Syntax: syntax error: line 1, column 0
2013-08-07 20:58:58,648 plivo-outbound[3414]: INFO: (7) Processing Call Ended
2013-08-07 20:58:58,648 plivo-outbound[3414]: DEBUG: (7) Releasing Connection ...
2013-08-07 20:59:00,658 plivo-outbound[3414]: DEBUG: (7) Releasing Connection Done
2013-08-07 20:59:00,659 plivo-outbound[3414]: INFO: (7) End request from ('127.0.0.1', 48730)


/usr/plivo/tmp/plivo-rest.log
Code: Select all
2013-08-07 20:59:01,028 plivo-rest[3403]: ERROR: Sending to POST http://127.0.0.1/ictfax/index.php?q=ictfax/receive_fax_billing with {'Direction': u'inbound', 'From': u'+1931xxxxxxx', 'HangupCause': u'NORMAL_CLEARING', 'To': u'1931xxxxxxx', 'variable_duration': u'34', 'CallUUID': u'039a154a-ffce-11e2-92d8-d55847b28f6f', 'CallStatus': 'completed'} -- Error: HTTP Error 403: Forbidden


/var/log/apache2/error.log
Code: Select all
sh: 1: -o: not found
Error: Couldn't open file '/usr/ictfax/sites/default/files/ictfax/inbox/26.pdf': No such file or directory.


I'm not sure if there's any more logging to be turned on about the fax negotiation/process itself (I've seen the logs that IAXmodem outputs, you can see verbose messages about what the fax process is doing at any point in time), but I'm stumped. Without being familiar with the internals of how Freeswitch/Plivo/ICTFAX is actually receiving faxes, it looks like it's negotiating and not receiving any data, so no tif image is written out. The apache errors I'm assuming are from the commands to convert the tif to a PDF, so that's expected, but I don't know what to make of the other errors. If that's the case, then the errors in the plivo-outbound.log file would be the same thing (RESTXML is erroring out because theres the extra echo'd line about not being able to find the PDF).

I can navigate to the URL that Plivo is POSTing to (http://127.0.0.1/ictfax/index.php?q=ict ... ax_billing) just fine, I don't get a 403.

Does anyone have any suggestions or a direction to look in? I'm really hoping I can get this in a working state, I want to eventually try out the T.38 capabilities of ICTFAX. I've heard good things and many success stories of businesses using ICTFAX as FOSS replacements for traditional fax server packages, and I hope I can do the same thing.
mdurant
 
Posts: 1
Joined: Thu Aug 08, 2013 1:49 am

Return to Configuration

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron