<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7547">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Benjamin Keith Ford: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_session: Reinvite using active stream topology if none requested.<br><br>When a connected line update is sent to an endpoint we do not request<br>a specific stream topology to be used. Previously this resulted in the<br>configured stream topology being used which may actually differ from the<br>currently negotiated topology. PJSIP is helpful in this regard in that<br>it will fill in any missing streams with removed ones. This results in<br>our own state not matching the SDP, though, and we do not apply the<br>negotiated SDP.<br><br>This change tweaks the code to use the actively negotiated stream<br>topology if it is present with a fallback to the configured one. This<br>results in the SDP and the state having matching information and the<br>world is happy.<br><br>ASTERISK*27397<br><br>Change-Id: I7a57117f0183479e6884b7bf3a53bb8c7464f604<br>---<br>M res/res_pjsip_session.c<br>1 file changed, 7 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c<br>index 781d3e4..b0f6197 100644<br>--- a/res/res_pjsip_session.c<br>+++ b/res/res_pjsip_session.c<br>@@ -3872,10 +3872,15 @@<br> <br> if (!session->pending_media_state->topology || !ast_stream_topology_get_count(session->pending_media_state->topology)) {<br> /* We've encountered a situation where we have been told to create a local SDP but noone has given us any indication<br>- * of what kind of stream topology they would like. As a fallback we use the topology from the configured endpoint.<br>+ * of what kind of stream topology they would like. We try to not alter the current state of the SDP negotiation<br>+ * by using what is currently negotiated. If this is unavailable we fall back to what is configured on the endpoint.<br> */<br> ast_stream_topology_free(session->pending_media_state->topology);<br>- session->pending_media_state->topology = ast_stream_topology_clone(session->endpoint->media.topology);<br>+ if (session->active_media_state->topology) {<br>+ session->pending_media_state->topology = ast_stream_topology_clone(session->active_media_state->topology);<br>+ } else {<br>+ session->pending_media_state->topology = ast_stream_topology_clone(session->endpoint->media.topology);<br>+ }<br> if (!session->pending_media_state->topology) {<br> return NULL;<br> }<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7547">change 7547</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/7547"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I7a57117f0183479e6884b7bf3a53bb8c7464f604 </div>
<div style="display:none"> Gerrit-Change-Number: 7547 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>