<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Testo fumetto Carattere";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.StileMessaggioDiPostaElettronica17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.TestofumettoCarattere
        {mso-style-name:"Testo fumetto Carattere";
        mso-style-priority:99;
        mso-style-link:"Testo fumetto";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=IT link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US>Hello List,<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US> I
think I’ve discovered a little bug in t.38 bug in 1.6.0.22 regarding the
speed (T38MaxBitRate) used to send the faxes.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US> Asterisk
always responds with a=T38MaxBitRate:2400. I’ve tried with Patton
and Grandstream devices and the result is always the same.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> Patton
ignores the parameter and sends the fax at 9600.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> Grandstream
doesn’t, and all the faxes are going in and out at 2400.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US> Looking
at the code I found this in chan_sip.c (line 7736):<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>if
((sscanf(a, "T38FaxMaxBuffer:%30u", &x) == 1)) {<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
ast_debug(3, "MaxBufferSize:%d\n", x);<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
found = TRUE;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
} else if ((sscanf(a, "T38MaxBitRate:%30u", &x) == 1) ||
(sscanf(a, "T38FaxMaxRate:%30u", &x) == 1)) {<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
ast_debug(3, "T38MaxBitRate: %d\n", x);<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
switch (x) {<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
case 14400:<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
p->t38.their_parms.rate = AST_T38_RATE_14400;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
break;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
case 12000:<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
p->t38.their_parms.rate = AST_T38_RATE_12000;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
break;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
case 9600:<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
p->t38.their_parms.rate = AST_T38_RATE_9600;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
break;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
case 7200:<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
p->t38.their_parms.rate = AST_T38_RATE_7200;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
break;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
case 4800:<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
p->t38.their_parms.rate = AST_T38_RATE_4800;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
break;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
case 2400:<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
p->t38.their_parms.rate = AST_T38_RATE_2400;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
break;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
}<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>
found = TRUE;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>else if
{…<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='color:black'>If I’m not misteaking the second “if else”
condition will never be true if the other device sends “T38FaxMaxBuffer”
(wich they all usually do).<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='color:black'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='color:black'>Shouldn’t it be <o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='color:black'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:black'>if((sscanf(a,
"T38FaxMaxBuffer:%30u", &x) == 1) && ((sscanf(a,
"T38MaxBitRate:%30u", &x) == 0) || (sscanf(a,
"T38FaxMaxRate:%30u", &x) == 0))) </span><span lang=EN-US
style='color:black'>??<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='color:black'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='color:black'>Thanks,<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='color:black'>Alex<o:p></o:p></span></p>
</div>
</body>
</html>