[asterisk-dev] app_fax.c :: Channel Hangup => Transmission Error but fax transmitted successfully !
dimas at dataart.com
dimas at dataart.com
Tue Aug 25 07:36:49 CDT 2009
To my knowledge, all Asterisk applications finish with error if channel was hung up. So the app_fax was designed the same way.
This is to abort further dialplan execution.
I believe, remote party has means to signal that fax transmission is finished without hanging up the call. If it does so, app_fax will return success and Asterisk continues executing dialplan.
What you should do is to handle fax transmission result (successful or not) in h extension. This is explained in https://issues.asterisk.org/view.php?id=10815#c73041
Regards,
Dmitry Andrianov
From: asterisk-dev-bounces at lists.digium.com [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Serge Berney
Sent: Tuesday, August 25, 2009 4:20 PM
To: Asterisk Developers Mailing List
Subject: [asterisk-dev] app_fax.c :: Channel Hangup => Transmission Error but fax transmitted successfully !
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 channels 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, theres 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
Tel: +41 22 989 0 999
Fax: +41 22 989 0 998
s.berney at kinonline.net
www.kinonline.net
More information about the asterisk-dev
mailing list