<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">federico cabiddu</b> <span dir="ltr"><<a href="mailto:federico.cabiddu@gmail.com">federico.cabiddu@gmail.com</a>></span><br>
Date: 2010/9/22<br>Subject: [asterisk-users] T38 and codecs negotiation<br>To: <a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a><br><br><br>Hi,<div>I'm working with asterisk 1.4.35 and found an issue regarding codecs negotiation when T38 is enabled (t38pt_udptl=yes).</div>
<div>In particular if the INVITE sdp contains no allowed codec the call is not rejected with "488 - Not acceptable here" but it goes through and the 200 OK SDP is as follows:</div>
<div><br></div><div><div>v=0</div><div>o=root 27285 27285 IN IP4 xxx.xxx.xxx.xxx</div><div>s=session</div><div>c=IN IP4 xxx.xxx.xxx.xxx</div><div>t=0 0</div><div>m=audio xxxxx RTP/AVP </div><div>a=silenceSupp:off - - - -</div>
<div>a=sendrecv</div><div><br></div><div>or</div><div><br></div><div><div>v=0</div><div>o=root 27285 27285 IN IP4 xxx.xxx.xxx.xxx</div><div>s=session</div><div>c=IN IP4 xxx.xxx.xxx.xxx</div><div>t=0 0</div><div>m=audio xxxxx RTP/AVP 96</div>
<div>a=rtpmap:96 telephone-event/8000</div><div>a=fmtp:96 0-15</div><div>a=silenceSupp:off - - - -</div><div>a=sendrecv</div><div><br></div><div>if in the originating INVITE there was the a line for telephone-event mapping.</div>
<div>Looking chan_sip.c I understood that the problem is related to t38 capabilities and in particular at row 5636:</div><div><div><br></div><div>if (!newjointcapability) {</div><div> /* If T.38 was not negotiated either, totally bail out... */</div>
<div> if (!p->t38.jointcapability || !udptlportno) {</div><div> ast_log(LOG_NOTICE, "No compatible codecs, not accepting this offer!\n");</div><div> /* Do NOT Change current setting */</div>
<div> return -1;</div><div> } else {</div><div> if (option_debug > 2)</div><div> ast_log(LOG_DEBUG, "Have T.38 but no audio codecs, accepting offer anyway\n");</div>
<div> }</div><div> }</div><div><br></div><div>As I understand if t38 is globally enabled p->t38.jointcapability and udptlportno are always true even so the call is never rejected.</div><div>As this behavior caused me some problems with a customer I modified, for the moment, the line 5638 as follows:</div>
<div><br></div><div>if (!p->t38.jointcapability || !udptlportno || p->t38.state == T38_DISABLED)</div><div><br></div><div>cause if I understand well the code if there is no fax request in the INVITE SDP p->t38.state is set to T38_DISABLED.</div>
<div>This did the trick for me but I don't know the implications of such change and if it is correct to manage it this way.</div><div><br></div><div>Kind regards,</div><div><br></div><div>Federico Cabiddu</div><div><br>
</div></div></div></div>
</div><br>