[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-dev
Subject:    Re: [asterisk-dev] app_fax.c :: Channel Hangup => TransmissionError
From:       "Serge Berney" <s.berney () kinonline ! net>
Date:       2009-08-25 13:29:26
Message-ID: A17DB08BD0118940A70B4532B25214B728967A () kinsv02 ! kinonline ! local
[Download RAW message or body]

Thanks for those information,

The problem is that each fax I receive are terminated like the log I sent... So never \
exit the loop with a result=0 !!

Every time :
	FAXSTATUS=SUCCESS !!
But :
	res=-1 => Returns -1

What cause the fax session "s" (fax_session *s) match to this condition :
	while (!s->finished) {		//Line 544
???
Where's defined "finished" member of s ?


Excepted this condition, I don't see any place where code detect transmission end...

Is there any change to implement to detect end fax data ? On ast_read function ?

Thanks,

Serge
Kin SA



-----Message d'origine-----
De : asterisk-dev-bounces@lists.digium.com \
[mailto:asterisk-dev-bounces@lists.digium.com] De la part de dimas@dataart.com Envoyé \
: mardi, 25. août 2009 14:37 Objet : Re: [asterisk-dev] app_fax.c :: Channel Hangup \
=> TransmissionError but fax transmitted successfully !

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@lists.digium.com \
                [mailto:asterisk-dev-bounces@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@kinonline.net
www.kinonline.net


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic