<p>Maximilian Fridrich has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18371">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_session: Flip stream direction of outgoing stream.<br><br>When an outgoing ast_sip_session is created, the topology of the<br>incoming request is being cloned and used for the outgoing stream. This<br>creates issues when a one-way (video) stream is requested as the<br>stream state of the second call leg will be the same as the stream<br>state of the first call leg.<br><br>Now the stream state is flipped for the outgoing stream if the<br>requested topology is recvonly or sendonly which fixes one-way video.<br><br>ASTERISK-29655<br>Reported by: Michael Auracher<br><br>ASTERISK-29638<br>Reported by: Michael Auracher<br><br>Change-Id: I294dc834ac9a5f048b101b691669959e9df630e1<br>---<br>M res/res_pjsip_session.c<br>1 file changed, 6 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/71/18371/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c</span><br><span>index 3c55af7..e1ec085 100644</span><br><span>--- a/res/res_pjsip_session.c</span><br><span>+++ b/res/res_pjsip_session.c</span><br><span>@@ -3422,6 +3422,12 @@</span><br><span> }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_stream_get_state(req_stream) == AST_STREAM_STATE_SENDONLY) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_stream_set_state(clone_stream, AST_STREAM_STATE_RECVONLY);</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (ast_stream_get_state(req_stream) == AST_STREAM_STATE_RECVONLY) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_stream_set_state(clone_stream, AST_STREAM_STATE_SENDONLY);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (ast_stream_topology_append_stream(session->pending_media_state->topology, clone_stream) < 0) {</span><br><span> ast_stream_free(clone_stream);</span><br><span> continue;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18371">change 18371</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/+/18371"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I294dc834ac9a5f048b101b691669959e9df630e1 </div>
<div style="display:none"> Gerrit-Change-Number: 18371 </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>