Summary: | ASTERISK-15781: Bug in Calculating T.38 far max IFP? | ||
Reporter: | jasmin-annika (jasmin-annika) | Labels: | |
Date Opened: | 2010-03-09 14:21:54.000-0600 | Date Closed: | 2011-07-26 15:27:01 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/T.38 |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Hi, after having some problems with far_max_ifp, I noticed, that in the case of a supplied value of max_datagram (from the far end) of "200" the far_max_ifp is only 60. When I unterstand the comment of the calculate_far_max_ifp function in udptl.c correctly, it should try to produce a value greater than 80 (through decreasing the EC entries), but keep one EC entry in any way. So in our example of 200 (far_max_datagram) the correct result should be an IFP of 96 I think. (the main data (96B), One EC entry (96B), 8 Bytes other Info). But the function produces a value of 64 (the 5% extra space added later is not considered), but this value is smaller than 80 and we have more than one EC entry (exactly space for 2 of them, but the variable value is "1" (which is also incorrect)). Pls see additional information for code example and fix proposal. I hope the calculations are correct and I am not telling nonsense ;-) Thanks Jasmin ****** ADDITIONAL INFORMATION ****** current code: for ( ; (new_max < 80) && (udptl->error_correction_entries > 1); --udptl->error_correction_entries) { new_max = (udptl->far_max_datagram - 8) / (udptl->error_correction_entries + 1); } example: new_max=0 udptl->error_correction_entries=3 now the loop starts: new_max < 80 OK udptl->error_correction_entries > 1 OK new_max=192/4= 48 udptl->error_correction_entries=3-1=2 new_max < 80 OK udptl->error_correction_entries > 1 OK new_max=192/3=64 udptl->error_correction_entries=2-1=1 new_max < 80 OK udptl->error_correction_entries > 1 NOT OK new_max == 64 udptl->error_correction_entries == 1 So the values for IFP and correction entries count do not match, because the new_max value is calculated for 2 EC entries, but we have the result of only "1". May this works better? new_max = (udptl->far_max_datagram - 8) / (udptl->error_correction_entries + 1); // while new_max<80 sacrifice another error correction entry, but keep one of them in any case while(new_max<80 && udptl->error_correction_entries > 1) { --udptl->error_correction_entries; new_max = (udptl->far_max_datagram - 8) / (udptl->error_correction_entries + 1); }; | ||
Comments: | By: Matthew Nicholson (mnicholson) 2011-07-26 15:02:26.157-0500 Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch. For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions |