Hi Kevin,<br><br>Thanks for your quick reply.<br>I have been trying to find a good configuration for T38modem + hylafax + asterisk for almost 1 month, and the issue is allways the same: just syncs at 2400 bpps.<br>Help on this issue would be apreciated.<br>
<br>Regards,<br>Miguel Amez<br><br><div class="gmail_quote">2010/5/25 Kevin P. Fleming <span dir="ltr"><<a href="mailto:kpfleming@digium.com">kpfleming@digium.com</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><div></div><div class="h5">On 05/25/2010 05:48 AM, Alexandru Oniciuc wrote:<br>
> Hello List,<br>
><br>
><br>
><br>
> I think I’ve discovered a little bug in t.38 bug in<br>
> 1.6.0.22 regarding the speed (T38MaxBitRate) used to send the faxes.<br>
><br>
><br>
><br>
> Asterisk always responds with a=T38MaxBitRate:2400.<br>
> I’ve tried with Patton and Grandstream devices and the result is always<br>
> the same.<br>
><br>
> Patton ignores the parameter and sends the fax at 9600.<br>
><br>
> Grandstream doesn’t, and all the faxes are going in and<br>
> out at 2400.<br>
><br>
><br>
><br>
> Looking at the code I found this in chan_sip.c (line 7736):<br>
><br>
><br>
><br>
> if ((sscanf(a, "T38FaxMaxBuffer:%30u", &x) == 1)) {<br>
><br>
> ast_debug(3, "MaxBufferSize:%d\n", x);<br>
><br>
> found = TRUE;<br>
><br>
> } else if ((sscanf(a, "T38MaxBitRate:%30u", &x) == 1) ||<br>
> (sscanf(a, "T38FaxMaxRate:%30u", &x) == 1)) {<br>
><br>
> ast_debug(3, "T38MaxBitRate: %d\n", x);<br>
><br>
> switch (x) {<br>
><br>
> case 14400:<br>
><br>
> p->t38.their_parms.rate = AST_T38_RATE_14400;<br>
><br>
> break;<br>
><br>
> case 12000:<br>
><br>
> p->t38.their_parms.rate = AST_T38_RATE_12000;<br>
><br>
> break;<br>
><br>
> case 9600:<br>
><br>
> p->t38.their_parms.rate = AST_T38_RATE_9600;<br>
><br>
> break;<br>
><br>
> case 7200:<br>
><br>
> p->t38.their_parms.rate = AST_T38_RATE_7200;<br>
><br>
> break;<br>
><br>
> case 4800:<br>
><br>
> p->t38.their_parms.rate = AST_T38_RATE_4800;<br>
><br>
> break;<br>
><br>
> case 2400:<br>
><br>
> p->t38.their_parms.rate = AST_T38_RATE_2400;<br>
><br>
> break;<br>
><br>
> }<br>
><br>
> found = TRUE;<br>
><br>
> else if {…<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> If I’m not misteaking the second “if else” condition will never be true<br>
> if the other device sends “T38FaxMaxBuffer” (wich they all usually do).<br>
><br>
><br>
><br>
> Shouldn’t it be<br>
><br>
><br>
><br>
> if((sscanf(a, "T38FaxMaxBuffer:%30u", &x) == 1) && ((sscanf(a,<br>
> "T38MaxBitRate:%30u", &x) == 0) || (sscanf(a, "T38FaxMaxRate:%30u", &x)<br>
> == 0))) ??<br>
<br>
</div></div>No. You aren't understanding the code :-) It's comparing a string buffer<br>
against various patterns, and the string can't match all the patterns at<br>
the same time.<br>
<br>
This code is executed as each line of the SDP is processed, and each one<br>
will match one of the branches of this tree, and it's values will be<br>
extracted and stored for later use.<br>
<br>
In other words... this is not the cause of your problem.<br>
<br>
--<br>
Kevin P. Fleming<br>
Digium, Inc. | Director of Software Technologies<br>
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA<br>
skype: kpfleming | jabber: <a href="mailto:kfleming@digium.com">kfleming@digium.com</a><br>
Check us out at <a href="http://www.digium.com" target="_blank">www.digium.com</a> & <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a><br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">_____________________________________________________________________<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>
</div></div></blockquote></div><br>