<p>Jaco Kroon has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18689">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_iax2: permit frames without voice format.<br><br>This is needed because a number of frames do not have voice (eg, CONTROL<br>/ RINGING).<br><br>This partially reverts 2a141a58b61ba0ed91061e1acc2c1955e0160f73 which<br>was for:<br><br>AST-2021-008 - chan_iax2: remote crash on unsupported media format<br><br>This fixes my immediate issue, however may re-introduce the issue. Is<br>there a reliable test case for the crash which can be used to validate<br>that this doesn't re-introduce the problem?<br><br>Change-Id: I80f9c1af4b2cd8281dbd74cb7cbc01b8deccdf96<br>Signed-off-by: Jaco Kroon <jaco@uls.co.za><br>---<br>M channels/chan_iax2.c<br>1 file changed, 3 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/89/18689/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c</span><br><span>index 210c344..9276fc7 100644</span><br><span>--- a/channels/chan_iax2.c</span><br><span>+++ b/channels/chan_iax2.c</span><br><span>@@ -4149,9 +4149,9 @@</span><br><span> </span><br><span> ms = ast_tvdiff_ms(now, pvt->rxcore);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- voicefmt = ast_format_compatibility_bitfield2format(pvt->voiceformat);</span><br><span style="color: hsl(0, 100%, 40%);">- if (voicefmt && ms >= (next = jb_next(pvt->jb))) {</span><br><span style="color: hsl(0, 100%, 40%);">- ret = jb_get(pvt->jb, &frame, ms, ast_format_get_default_ms(voicefmt));</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ms >= (next = jb_next(pvt->jb))) {</span><br><span style="color: hsl(120, 100%, 40%);">+ voicefmt = ast_format_compatibility_bitfield2format(pvt->voiceformat);</span><br><span style="color: hsl(120, 100%, 40%);">+ ret = jb_get(pvt->jb, &frame, ms, voicefmt ? ast_format_get_default_ms(voicefmt) : 20);</span><br><span> switch(ret) {</span><br><span> case JB_OK:</span><br><span> fr = frame.data;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18689">change 18689</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/18689"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I80f9c1af4b2cd8281dbd74cb7cbc01b8deccdf96 </div>
<div style="display:none"> Gerrit-Change-Number: 18689 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Jaco Kroon <jaco@uls.co.za> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>