<p>Maximilian Fridrich has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18584">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_pjsip: Only set default audio stream on hold.<br><br>When a PJSIP channel is set on hold or off hold, all streams were set<br>on/off hold. This is not the desired behaviour and caused issues<br>when there were multiple streams in the topology.<br><br>Now, only the default audio stream is set on/off hold when a hold is<br>indicated.<br><br>ASTERISK-30051<br><br>Change-Id: I04f1110565fd05fea565f5539b534b54549d4f71<br>---<br>M channels/chan_pjsip.c<br>1 file changed, 4 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/84/18584/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c</span><br><span>index 7c6b301..07b9088 100644</span><br><span>--- a/channels/chan_pjsip.c</span><br><span>+++ b/channels/chan_pjsip.c</span><br><span>@@ -1471,18 +1471,13 @@</span><br><span> return 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/*! \brief Callback which changes the value of locally held on the media stream */</span><br><span style="color: hsl(0, 100%, 40%);">-static void local_hold_set_state(struct ast_sip_session_media *session_media, unsigned int held)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">- if (session_media) {</span><br><span style="color: hsl(0, 100%, 40%);">- session_media->locally_held = held;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> /*! \brief Update local hold state and send a re-INVITE with the new SDP */</span><br><span> static int remote_send_hold_refresh(struct ast_sip_session *session, unsigned int held)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- AST_VECTOR_CALLBACK_VOID(&session->active_media_state->sessions, local_hold_set_state, held);</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_sip_session_media *session_media = session->active_media_state->default_session[AST_MEDIA_TYPE_AUDIO];</span><br><span style="color: hsl(120, 100%, 40%);">+ if (session_media) {</span><br><span style="color: hsl(120, 100%, 40%);">+ session_media->locally_held = held;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> ast_sip_session_refresh(session, NULL, NULL, NULL, AST_SIP_SESSION_REFRESH_METHOD_INVITE, 1, NULL);</span><br><span> ao2_ref(session, -1);</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18584">change 18584</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/+/18584"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: I04f1110565fd05fea565f5539b534b54549d4f71 </div>
<div style="display:none"> Gerrit-Change-Number: 18584 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Maximilian Fridrich <m.fridrich@commend.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>