trouble with the correct detection of fax transmission

Post bugs/issues that you found in ictfax

Re: trouble with the correct detection of fax transmission

Postby nasir » Thu Jan 21, 2016 7:38 am

From provided logs its seems that Freeswitch is incorrectly resolving "fax_success" variable into "success", so let us try with another approach

apply following patch

Code: Select all
Index: core/Gateway/Freeswitch.php
===================================================================
--- core/Gateway/Freeswitch.php   (revision 126)
+++ core/Gateway/Freeswitch.php   (working copy)
@@ -205,7 +205,9 @@
           'fax_enable_t38_request' => 'true',
           'fax_enable_t38'         => 'true',
           'fax_local_station_id'   => 'ICTCore',
-          'fax_file'               =>  $fax_file_tmp
+          'fax_file'               =>  $fax_file_tmp,
+          'execute_on_fax_success' => 'fax_result=success',
+          'execute_on_fax_failure' => 'fax_result=failed'
         );
         $template['batch'][1] = array(
           'name' => "playback",
@@ -216,7 +218,7 @@
           'data' => $fax_file_tmp
         );
         $template['output'] += array(
-          'result'   => 'fax_success',
+          'result'   => 'fax_result',
           'error'    => 'fax_result_text',
           'pages'    => 'fax_document_total_pages',
           'fax_file' => 'fax_file'
@@ -228,7 +230,9 @@
           'fax_enable_t38'         => 'true',
           'fax_local_station_id'   => 'ICTCore',
           'fax_header'             => '[parameter:header]',
-          'fax_ident'              => '[source:phone]'
+          'fax_ident'              => '[source:phone]',
+          'execute_on_fax_success' => 'fax_result=success',
+          'execute_on_fax_failure' => 'fax_result=failed'
         );
         $template['batch'][1] = array(
           'name' => "playback",
@@ -239,9 +243,9 @@
           'data' => "[parameter:message]"
         );
         $template['output'] += array(
-          'result' => 'fax_success',
+          'result' => 'fax_result',
           'error'  => 'fax_result_text',
-          'pages'  => 'fax_document_total_pages'
+          'pages'  => 'fax_document_transferred_pages'
         );
         break;
     }
nasir
 
Posts: 55
Joined: Mon Sep 09, 2013 12:11 pm

Return to Bug Reporting

Who is online

Users browsing this forum: No registered users and 1 guest

cron