I can use res_fax’ (or res_fax_digium) SendFAX command in my Asterisk 1.8 instance with decent reliability when only a single document is involved in the application. When multiple documents are involved, however, things break immediately.
I should not that the dialplan routing that causes faxes requires bookkeeping to be done on each document. Therefore, instead of using syntax like:
I actually invoke multiple SendFAX calls:
exten => s, n, SendFAX(doc1.tiff, fz)
exten => s, n, ; Misc func_odbc bookkeeping for doc1 delivery success + error messages
exten => s, n, SendFAX(doc2.tiff, fz)
exten => s, n, ; Misc func_odbc bookkeeping for doc2 delivery success + error messages
This, however, fails to send the second document every single time. Accompanying this failure is the following output in the CLI:
[May 28 11:50:55] ERROR[7641]: res_fax.c:1843 sendfax_t38_init: error reading frame while generating CNG tone on SIP/some-fax-host-0000002f
[May 28 11:50:55] ERROR[7641]: res_fax.c:2249 sendfax_exec: error initializing channel 'SIP/some-fax-host-0000002f' in T.38 mode
== Spawn extension (FAX_TX, s, 15) exited non-zero on 'SIP/some-fax-host-0000002f'
Is there some issue with invoking SendFAX multiple time within a single Originate that causes problems? As an aside entry into the FAX_TX dialplan context occurs via a AMI Action similar to the one below:
Action: Originate
Channel: SIP/1866MYFAXNUM@some-fax-host
Context: FAX_TX
Extension: s
Priority: 1
Variable: fax_file=doc1.tiff&doc2.tiff
Any help in understanding how to fax multiple documents in a single originate with multiple SendFAX calls is very welcome. Thanks.