<p>Benjamin Keith Ford has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19709">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>ASTDEV-29<br><br>Change-Id: I7b106fc244332014216d12bba851cefe884cc25f<br>---<br>M res/res_pjsip_sdp_rtp.c<br>1 file changed, 20 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/09/19709/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..33e1c58 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,10 +2240,12 @@</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>     } else if (session->endpoint->media.rtp.timeout_hold && session_media->remotely_held) {</span><br><span>             ast_rtp_instance_set_timeout(session_media->rtp, session->endpoint->media.rtp.timeout_hold);</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 style="color: hsl(120, 100%, 40%);">+           ast_rtp_instance_set_timeout(session_media->rtp, session->endpoint->media.rtp.timeout_hold);</span><br><span>        }</span><br><span> </span><br><span>        if (ast_rtp_instance_get_timeout(session_media->rtp)) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19709">change 19709</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/+/19709"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 20 </div>
<div style="display:none"> Gerrit-Change-Id: I7b106fc244332014216d12bba851cefe884cc25f </div>
<div style="display:none"> Gerrit-Change-Number: 19709 </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>