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

Serge Berney s.berney at kinonline.net
Tue Aug 25 07:20:22 CDT 2009


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

[Aug 25 14:06:59] DEBUG[22144] app_fax.c: Fax transmitted successfully.

[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

[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 ?

 

 

Serge Berney
Kin SA
Knowledge Integrated Networks
Rue du Bois-du-Lan 8
Case Postale 221
1217 Meyrin 1
Tél: +41 22 989 0 999
Fax: +41 22 989 0 998
s.berney at kinonline.net <mailto:s.berney at kinonline.net> 
www.kinonline.net <http://www.kinonline.net/> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090825/3da809d6/attachment.htm 


More information about the asterisk-dev mailing list