Summary: | ASTERISK-14944: [patch] failed to negiotate t38 | ||
Reporter: | Maciej Krajewski (jamicque) | Labels: | |
Date Opened: | 2009-10-06 10:16:35 | Date Closed: | 2009-10-12 10:35:52 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/T.38 |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) asterisk.log ( 1) debug.patch ( 2) full.log ( 3) full.new ( 4) full.SPA ( 5) log.newest ( 6) mk.cap | |
Description: | I found a problem today, after upgrading from 1.4.x to 1.6.0.15. When I try to send fax using t38 with ZOIPER softphone thru asterisk to mu VoIP operator, asterisk fails to negotiate T38. I found that after the ZOIPER send reinvite with t38, asterisk sends this reinvite to operator. And then Asterisk send reinvite to operator with g711 ?? The asterisk LOG and cap file is in attachment. | ||
Comments: | By: Kevin P. Fleming (kpfleming) 2009-10-06 14:43:33 Clearly something went wrong, but your log does not contain enough information to try to figure it out. Please ensure that your logger.conf has all logger levels enabled for the 'full' log file (notice,warning,verbose,debug,error) and test a call again after enabling 'core set verbose 10', 'core set debug 10' and 'sip set debug on'. Thanks. By: Maciej Krajewski (jamicque) 2009-10-07 04:03:48 Hi, what I've found is that when I'm sending fax behind NAT ZOIPER ---NAT--> ASTERISK -NAT---> COMETREX fax fails. Sending fax thru the same network ZOIPER ----> ASTERISK ---NAT ---> COMETREX fails. localnet and externip are set. I've attached the log. By: Maciej Krajewski (jamicque) 2009-10-07 04:39:17 I've done some new test, and problem with negotiating t38 can happen in the second scenario also: ZOIPER ----> ASTERISK ---NAT ---> COMETREX I've attached log full.new from this scenario. By: Maciej Krajewski (jamicque) 2009-10-07 05:31:49 In full.SPA is a scenario SIPURA --- ASTERISK ---NAT----SIPURA and the same problem... reinvites t38, and the asterisk reinvites one side to g711... By: Kevin P. Fleming (kpfleming) 2009-10-09 16:30:02 In full.log, the Zoiper client fails to ACK the 200 OK sent by Asterisk (which is retransmitted six times), so the call fails completely. In full.new, I can see the problem you are talking about. Do you have 'directmedia' (also known as 'canreinvite') enabled for these SIP peers? If so, please run a test with that disabled for one or both of them as I suspect it will correct this broken behavior and we'll know what needs to be fixed. By: Maciej Krajewski (jamicque) 2009-10-09 16:44:43 Hi, actually canreinvite is disabled on both peers. By: Kevin P. Fleming (kpfleming) 2009-10-09 17:01:25 OK, on closer inspection of the log I see now that something is changing the T.38 state of the 'jamicque' peer's channel to T38_DISABLED, which causes the reinvite back to audio. Please apply the attached patch and test again; this patch will cause the T.38 state change message to include the function (and line number) that triggered the change. Thanks! By: Maciej Krajewski (jamicque) 2009-10-09 18:02:32 The newest log log.patch added By: Maciej Krajewski (jamicque) 2009-10-09 18:03:55 I had to change the name to log.newest coz i can't attach files with patch extension :) By: Maciej Krajewski (jamicque) 2009-10-10 06:01:02 the same problem occurs in 1.4.26.2 By: Kevin P. Fleming (kpfleming) 2009-10-12 09:26:22 Thanks for the log; the problem is now apparent, and is due to some code we've been planning to remove anyway. I'll commit fixes to trunk and the 1.6.x branches shortly. Thanks for testing! By: Digium Subversion (svnbot) 2009-10-12 09:29:11 Repository: asterisk Revision: 223652 U trunk/apps/app_fax.c U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r223652 | kpfleming | 2009-10-12 09:29:10 -0500 (Mon, 12 Oct 2009) | 13 lines Remove automatic switching from T.38 to voice mode in chan_sip. chan_sip has some code to automatically switch from T.38 mode to voice mode when a voice frame is written to the channel while it is in T.38 mode; this was intended to handle the situation when a FAX transmission has ended and the channel is not yet hung up, but is causing problems at the beginning of FAX sessions as well when there are still voice frames 'in flight' at the time the T.38 negotiation completes. This patch removes the automatic switchover, and changes app_fax to explicitly switch off T.38 mode when the FAX transmission process ends. (closes issue ASTERISK-14944) Reported by: jamicque ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=223652 By: Digium Subversion (svnbot) 2009-10-12 09:31:41 Repository: asterisk Revision: 223653 _U branches/1.6.0/ U branches/1.6.0/apps/app_fax.c U branches/1.6.0/channels/chan_sip.c ------------------------------------------------------------------------ r223653 | kpfleming | 2009-10-12 09:31:41 -0500 (Mon, 12 Oct 2009) | 20 lines Merged revisions 223652 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r223652 | kpfleming | 2009-10-12 09:25:29 -0500 (Mon, 12 Oct 2009) | 13 lines Remove automatic switching from T.38 to voice mode in chan_sip. chan_sip has some code to automatically switch from T.38 mode to voice mode when a voice frame is written to the channel while it is in T.38 mode; this was intended to handle the situation when a FAX transmission has ended and the channel is not yet hung up, but is causing problems at the beginning of FAX sessions as well when there are still voice frames 'in flight' at the time the T.38 negotiation completes. This patch removes the automatic switchover, and changes app_fax to explicitly switch off T.38 mode when the FAX transmission process ends. (closes issue ASTERISK-14944) Reported by: jamicque ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=223653 By: Digium Subversion (svnbot) 2009-10-12 09:36:03 Repository: asterisk Revision: 223654 _U branches/1.6.1/ U branches/1.6.1/apps/app_fax.c U branches/1.6.1/channels/chan_sip.c ------------------------------------------------------------------------ r223654 | kpfleming | 2009-10-12 09:36:03 -0500 (Mon, 12 Oct 2009) | 20 lines Merged revisions 223652 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r223652 | kpfleming | 2009-10-12 09:25:29 -0500 (Mon, 12 Oct 2009) | 13 lines Remove automatic switching from T.38 to voice mode in chan_sip. chan_sip has some code to automatically switch from T.38 mode to voice mode when a voice frame is written to the channel while it is in T.38 mode; this was intended to handle the situation when a FAX transmission has ended and the channel is not yet hung up, but is causing problems at the beginning of FAX sessions as well when there are still voice frames 'in flight' at the time the T.38 negotiation completes. This patch removes the automatic switchover, and changes app_fax to explicitly switch off T.38 mode when the FAX transmission process ends. (closes issue ASTERISK-14944) Reported by: jamicque ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=223654 By: Maciej Krajewski (jamicque) 2009-10-12 09:40:38 kpfleming the same thing happens in 1.4.26.2 By: Digium Subversion (svnbot) 2009-10-12 09:40:59 Repository: asterisk Revision: 223655 _U branches/1.6.2/ U branches/1.6.2/apps/app_fax.c U branches/1.6.2/channels/chan_sip.c ------------------------------------------------------------------------ r223655 | kpfleming | 2009-10-12 09:40:58 -0500 (Mon, 12 Oct 2009) | 20 lines Merged revisions 223652 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r223652 | kpfleming | 2009-10-12 09:25:29 -0500 (Mon, 12 Oct 2009) | 13 lines Remove automatic switching from T.38 to voice mode in chan_sip. chan_sip has some code to automatically switch from T.38 mode to voice mode when a voice frame is written to the channel while it is in T.38 mode; this was intended to handle the situation when a FAX transmission has ended and the channel is not yet hung up, but is causing problems at the beginning of FAX sessions as well when there are still voice frames 'in flight' at the time the T.38 negotiation completes. This patch removes the automatic switchover, and changes app_fax to explicitly switch off T.38 mode when the FAX transmission process ends. (closes issue ASTERISK-14944) Reported by: jamicque ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=223655 By: Digium Subversion (svnbot) 2009-10-12 10:34:23 Repository: asterisk Revision: 223692 U branches/1.4/channels/chan_sip.c ------------------------------------------------------------------------ r223692 | kpfleming | 2009-10-12 10:34:23 -0500 (Mon, 12 Oct 2009) | 13 lines Remove automatic switching from T.38 to voice mode in chan_sip. chan_sip has some code to automatically switch from T.38 mode to voice mode when a voice frame is written to the channel while it is in T.38 mode; this was intended to handle the situation when a FAX transmission has ended and the channel is not yet hung up, but is causing problems at the beginning of FAX sessions as well when there are still voice frames 'in flight' at the time the T.38 negotiation completes. This patch removes the automatic switchover. (issue ASTERISK-14944) Reported by: jamicque ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=223692 By: Digium Subversion (svnbot) 2009-10-12 10:35:52 Repository: asterisk Revision: 223693 _U trunk/ ------------------------------------------------------------------------ r223693 | kpfleming | 2009-10-12 10:35:52 -0500 (Mon, 12 Oct 2009) | 19 lines Recorded merge of revisions 223692 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r223692 | kpfleming | 2009-10-12 10:30:40 -0500 (Mon, 12 Oct 2009) | 13 lines Remove automatic switching from T.38 to voice mode in chan_sip. chan_sip has some code to automatically switch from T.38 mode to voice mode when a voice frame is written to the channel while it is in T.38 mode; this was intended to handle the situation when a FAX transmission has ended and the channel is not yet hung up, but is causing problems at the beginning of FAX sessions as well when there are still voice frames 'in flight' at the time the T.38 negotiation completes. This patch removes the automatic switchover. (issue ASTERISK-14944) Reported by: jamicque ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=223693 |