You are completely right!<br>You are my hero!<br>I'm experiencing the same error with hylafax + t38modem implementation, and t38modem ALLWAYS sends out at 2400!!!<br>I have 1.6.0.22 too, so this is definetly what's happening!<br>
<br>1 month looking for the error and now Alexandru has it...whoa!<br><br>regards,<br><br>Miguel Amez<br><br><div class="gmail_quote">2010/5/25 Alexandru Oniciuc <span dir="ltr"><<a href="mailto:Alexandru.Oniciuc@trivenet.it">Alexandru.Oniciuc@trivenet.it</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="IT">
<div>
<p class="MsoNormal"><span lang="EN-US">Hello List,</span></p>
<p class="MsoNormal"><span lang="EN-US"> </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.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </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.</span></p>
<p class="MsoNormal"><span lang="EN-US"> Patton
ignores the parameter and sends the fax at 9600.</span></p>
<p class="MsoNormal"><span lang="EN-US"> Grandstream
doesn’t, and all the faxes are going in and out at 2400.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US"> Looking
at the code I found this in chan_sip.c (line 7736):</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">if
((sscanf(a, "T38FaxMaxBuffer:%30u", &x) == 1)) {</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
ast_debug(3, "MaxBufferSize:%d\n", x);</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
found = TRUE;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
} else if ((sscanf(a, "T38MaxBitRate:%30u", &x) == 1) ||
(sscanf(a, "T38FaxMaxRate:%30u", &x) == 1)) {</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
ast_debug(3, "T38MaxBitRate: %d\n", x);</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
switch (x) {</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
case 14400:</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
p->t38.their_parms.rate = AST_T38_RATE_14400;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
break;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
case 12000:</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
p->t38.their_parms.rate = AST_T38_RATE_12000;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
break;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
case 9600:</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
p->t38.their_parms.rate = AST_T38_RATE_9600;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
break;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
case 7200:</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
p->t38.their_parms.rate = AST_T38_RATE_7200;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
break;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
case 4800:</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
p->t38.their_parms.rate = AST_T38_RATE_4800;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
break;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
case 2400:</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
p->t38.their_parms.rate = AST_T38_RATE_2400;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
break;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
}</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">
found = TRUE;</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">else if
{…</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="color: black;" lang="EN-US">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).</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="color: black;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="color: black;" lang="EN-US">Shouldn’t it be </span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="color: black;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="font-size: 7.5pt; color: black;" lang="EN-US">if((sscanf(a,
"T38FaxMaxBuffer:%30u", &x) == 1) && ((sscanf(a,
"T38MaxBitRate:%30u", &x) == 0) || (sscanf(a,
"T38FaxMaxRate:%30u", &x) == 0))) </span><span style="color: black;" lang="EN-US">??</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span style="color: black;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: black;" lang="EN-US">Thanks,</span></p>
<p class="MsoNormal"><span style="color: black;" lang="EN-US">Alex</span></p>
</div>
</div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br>