<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/5900">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Verified
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res/res_pjsip_t38 ensure t38 requests get rejected quickly<br><br>arm the t38 webhook always, so we can correctly reject a<br>T38 negotiation request when t38 is disabled on a channel<br><br>Change-Id: Ib1ffe35aee145d4e0fe61dd012580be11aae079d<br>---<br>M res/res_pjsip_t38.c<br>1 file changed, 14 insertions(+), 12 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c<br>index 0ce6474..f287601 100644<br>--- a/res/res_pjsip_t38.c<br>+++ b/res/res_pjsip_t38.c<br>@@ -403,16 +403,21 @@<br> static struct ast_frame *t38_framehook_write(struct ast_channel *chan,<br> struct ast_sip_session *session, struct ast_frame *f)<br> {<br>- if (f->frametype == AST_FRAME_CONTROL && f->subclass.integer == AST_CONTROL_T38_PARAMETERS &&<br>- session->endpoint->media.t38.enabled) {<br>- struct t38_parameters_task_data *data = t38_parameters_task_data_alloc(session, f);<br>+ if (f->frametype == AST_FRAME_CONTROL && f->subclass.integer == AST_CONTROL_T38_PARAMETERS) {<br>+ if (session->endpoint->media.t38.enabled) {<br>+ struct t38_parameters_task_data *data = t38_parameters_task_data_alloc(session, f);<br> <br>- if (!data) {<br>- return f;<br>- }<br>+ if (!data) {<br>+ return f;<br>+ }<br> <br>- if (ast_sip_push_task(session->serializer, t38_interpret_parameters, data)) {<br>- ao2_ref(data, -1);<br>+ if (ast_sip_push_task(session->serializer, t38_interpret_parameters, data)) {<br>+ ao2_ref(data, -1);<br>+ }<br>+ } else {<br>+ struct ast_control_t38_parameters parameters = { .request_response = AST_T38_REFUSED, };<br>+ ast_debug(2, "T.38 support not enabled, rejecting T.38 control packet\n");<br>+ ast_queue_control_data(session->channel, AST_CONTROL_T38_PARAMETERS, ¶meters, sizeof(parameters));<br> }<br> } else if (f->frametype == AST_FRAME_MODEM) {<br> struct ast_sip_session_media *session_media;<br>@@ -503,10 +508,7 @@<br> return;<br> }<br> <br>- /* Only attach the framehook if t38 is enabled for the endpoint */<br>- if (!session->endpoint->media.t38.enabled) {<br>- return;<br>- }<br>+ /* Always attach the framehook so we can quickly reject */<br> <br> ast_channel_lock(session->channel);<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/5900">change 5900</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/5900"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ib1ffe35aee145d4e0fe61dd012580be11aae079d </div>
<div style="display:none"> Gerrit-Change-Number: 5900 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Torrey Searle <tsearle@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>