<p>Benjamin Keith Ford has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15430">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_session.c: Check topology on re-invite.<br><br>Adds additional logic to see if there is an active_media_state on the<br>session so that the topologies can be compared to see if they are equal,<br>suppressing the re-invite. When a call is received that offers codecs<br>different than what the phones supports, a re-invite will be sent with<br>all the phone's supported codecs if the call is put on hold by that<br>phone.<br><br>Change-Id: I04dc91befb2387904e28a9aaeaa3bcdbcaa7fa63<br>---<br>M res/res_pjsip_session.c<br>1 file changed, 1 insertion(+), 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/30/15430/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 d841aca..b933d08 100644</span><br><span>--- a/res/res_pjsip_session.c</span><br><span>+++ b/res/res_pjsip_session.c</span><br><span>@@ -2458,7 +2458,7 @@</span><br><span> * change. If it was the result of some other change, like connected line, then</span><br><span> * we don't want to suppress it even though the topologies are equal.</span><br><span> */</span><br><span style="color: hsl(0, 100%, 40%);">- if (topology_change_request && ast_stream_topology_equal(session->active_media_state->topology, pending_media_state->topology)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if ((topology_change_request || session->active_media_state) && ast_stream_topology_equal(session->active_media_state->topology, pending_media_state->topology)) {</span><br><span> ast_trace(-1, "%s: CA: %s\n", ast_sip_session_get_name(session), ast_str_tmp(256, ast_stream_topology_to_str(session->active_media_state->topology, &STR_TMP)));</span><br><span> ast_trace(-1, "%s: NP: %s\n", ast_sip_session_get_name(session), ast_str_tmp(256, ast_stream_topology_to_str(pending_media_state->topology, &STR_TMP)));</span><br><span> ast_sip_session_media_state_free(pending_media_state);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15430">change 15430</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/+/15430"/><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: I04dc91befb2387904e28a9aaeaa3bcdbcaa7fa63 </div>
<div style="display:none"> Gerrit-Change-Number: 15430 </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>