[asterisk-dev] app_fax.c :: Channel Hangup => Transmission Error but fax transmitted successfully !

Steve Underwood steveu at coppice.org
Tue Aug 25 08:14:10 CDT 2009


Hi Serge,

Maybe things don't mean what you think they mean.

On 08/25/2009 08:20 PM, Serge Berney wrote:
>
> Hello,
>
> Is it normal that on app_fax.c, when remote party hangup communication 
> (because fax transmission is terminated), that cause a “Transmission 
> error” ?
>
> _Code in app_fax (line 407 & 566) :_
>
> inf = ast_read(s->chan);
>
> if (inf == NULL) {
>
> ast_debug(1, "Channel hangup\n");
>
> res = -1;
>
> break;
>
> }
>
> So, when channel’s hangup, res = -1
>
> _And after (line 654) :_
>
> if (res) {
>
> ast_log(LOG_WARNING, "Transmission error\n");
>
> res = -1;
>
> } else if (s->finished < 0) {
>
> ast_log(LOG_WARNING, "Transmission failed\n");
>
> } else if (s->finished > 0) {
>
> ast_debug(1, "Transmission finished Ok\n");
>
> }
>
>>
> return res;
>
> /Can we detect if communication is hangup after received or during 
> reception to handle error and success ?/
>
> So, there’s a “Transmission error”… but fax is received well and no 
> other error…
>
> _See log :_
>
>>
> [Aug 25 14:06:59] DEBUG[22144] app_fax.c: Channel hangup
>
> [Aug 25 14:06:59] DEBUG[22144] app_fax.c: Loop finished, res=-1
>
> [Aug 25 14:06:59] DEBUG[22144] app_fax.c: Fax phase E handler. result=0
>
That is the outcome of the FAX operation - 0 == success. You can find 
all the other codes in the header files of spandsp.
>
> [Aug 25 14:06:59] DEBUG[22144] app_fax.c: Fax transmitted successfully.
>
That's the same thing expressed as a short string.
>
> [Aug 25 14:06:59] DEBUG[22144] app_fax.c: Remote station ID: +xxxxxxxxxxxx
>
> [Aug 25 14:06:59] DEBUG[22144] app_fax.c: Pages transferred: 2
>
> [Aug 25 14:06:59] DEBUG[22144] app_fax.c: Image resolution: 8031 x 3850
>
> [Aug 25 14:06:59] DEBUG[22144] app_fax.c: Transfer Rate: 14400
>
> [Aug 25 14:06:59] WARNING[22144] app_fax.c: Transmission error
>
That essentially means the far end hung up. Not the most descriptive 
name, perhaps.
>
> [Aug 25 14:06:59] DEBUG[22144] app_macro.c: Spawn extension 
> (macro-rxfax,s,8) exited non-zero on 'SIP/yyyy-081f71c0' in macro 'rxfax'
>
>>
> _Sequence :_ Channel hangup => Loop finished, res=-1 => Fax 
> transmitted successfully => *Transmission error* !!!
>
> Maybe something goes wrong ?!?! mhmm ?
>
>
Steve




More information about the asterisk-dev mailing list