Dialplan not proceeding after ReceiveFax

Community-based Support for users of Free Fax For Asterisk

Dialplan not proceeding after ReceiveFax

Postby arginite » Tue Jul 03, 2012 10:18 am

Asterisk version: 1.8.12 FFA installed and working. Receiving faxes work up to a point, once ReceiveFax is called execution of the dialplan stops and does not return from ReceiveFax .


exten => _[*#0-9]!,1,AGI(dialplan.php)

dialplan.php then takes care of all calls

dialplan.php -> ReceiveFax function:

function ReceiveFax()
global $agi;
$timeStamp = new DateTime;

msg('**** ReceiveFax Start****');

$agi->set_variable('FAXOPT(ecm)', 'yes');
$agi->set_variable('FAXOPT(headerinfo)', 'Received on ' . $timeStamp->format('Y-m-d\TH:i:sP'));
$agi->set_variable('FAXOPT(localstationid)', 'fax num removed');
$agi->set_variable('FAXOPT(maxrate)', '14400');
$agi->set_variable('FAXOPT(minrate)', '2400');

$fileStamp = $timeStamp->getTimestamp();
$fileName = $fileStamp . '.tif';
$path = '/var/spool/asterisk/fax/';

$agi->exec('ReceiveFAX', $path . $fileName);

msg('**** ReceiveFax End****');

return $path . $fileName;

Asterisk console output when receiving fax:

-- Executing [fax num removed@incoming:1] AGI("SIP/commsin-0000001d", "dialplan.php") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dialplan.php
dialplan.php: -->exten: fax num removed
dialplan.php: **** ReceiveFax Start****
-- AGI Script Executing Application: (ReceiveFAX) Options: (/var/spool/asterisk/fax/1341330933.tif)
-- Channel 'SIP/commsin-0000001d' receiving FAX '/var/spool/asterisk/fax/1341330933.tif'
[Jul 3 16:55:35] NOTICE[11619]: chan_sip.c:7508 sip_read: FAX CNG detected but no fax extension
== Using UDPTL CoS mark 5
-- Channel 'SIP/commsin-0000001d' FAX session '1' started
-- FAX handle 0: [ 024.448440 ], entering CLOSING state
-- FAX handle 0: [ 024.498446 ], entering CLOSING state
-- Channel 'SIP/commsin-0000001d' FAX session '1' is complete, result: 'SUCCESS' (FAX_SUCCESS), error: 'NO_ERROR', pages: 1, resolution: '204x196', transfer rate: '14400', remoteSID: 'phone number removed'
-- <SIP/commsin-0000001d>AGI Script dialplan.php completed, returning 4
== Spawn extension (incoming, fax num removed, 1) exited non-zero on 'SIP/commsin-0000001d'

So am I experiencing this issue: https://issues.asterisk.org/jira/browse/ASTERISK-17475 and if so how do I implement the fix described in the bug report, I have tried to implement it but I'm guessing it is in the wrong section of chan_sip.c.

All help appreciated.
Posts: 10
Joined: Fri Oct 21, 2011 4:31 am

Re: Dialplan not proceeding after ReceiveFax

Postby arginite » Wed Jul 11, 2012 7:32 am

Since no one seems to have an answer I have decided to do go the same route as this thread:
Posts: 10
Joined: Fri Oct 21, 2011 4:31 am

Return to Fax For Asterisk

Who is online

Users browsing this forum: No registered users and 1 guest