<p>Benjamin Keith Ford has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19698">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_sdp_rtp.c: Use correct timeout when put on hold.<br><br>When a call is put on hold and it has moh_passthrough and rtp_timeout<br>set on the endpoint, the wrong timeout will be used. rtp_timeout_hold is<br>expected to be used, but rtp_timeout is used instead. This change adds a<br>couple of checks for locally_held to determine if rtp_timeout_hold needs<br>to be used instead of rtp_timeout.<br><br>ASTERISK-30350<br><br>Change-Id: I7b106fc244332014216d12bba851cefe884cc25f<br>---<br>M res/res_pjsip_sdp_rtp.c<br>1 file changed, 19 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/98/19698/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c</span><br><span>index 75f1d54..8d1c5c3 100644</span><br><span>--- a/res/res_pjsip_sdp_rtp.c</span><br><span>+++ b/res/res_pjsip_sdp_rtp.c</span><br><span>@@ -2240,9 +2240,9 @@</span><br><span> * instance itself.</span><br><span> */</span><br><span> ast_rtp_instance_set_timeout(session_media->rtp, 0);</span><br><span style="color: hsl(0, 100%, 40%);">- if (session->endpoint->media.rtp.timeout && !session_media->remotely_held) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (session->endpoint->media.rtp.timeout && !session_media->remotely_held && !session_media->locally_held) {</span><br><span> ast_rtp_instance_set_timeout(session_media->rtp, session->endpoint->media.rtp.timeout);</span><br><span style="color: hsl(0, 100%, 40%);">- } else if (session->endpoint->media.rtp.timeout_hold && session_media->remotely_held) {</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (session->endpoint->media.rtp.timeout_hold && (session_media->remotely_held || session_media->locally_held)) {</span><br><span> ast_rtp_instance_set_timeout(session_media->rtp, session->endpoint->media.rtp.timeout_hold);</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19698">change 19698</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/+/19698"/><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: I7b106fc244332014216d12bba851cefe884cc25f </div>
<div style="display:none"> Gerrit-Change-Number: 19698 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>