<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6089">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_rtp_asterisk: Fix mapping of pjsip's ICE roles to ours<br><br>Change-Id: Ia578ede1a55b21014581793992a429441903278b<br>---<br>M res/res_rtp_asterisk.c<br>1 file changed, 17 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/89/6089/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c<br>index e521756..a523f86 100644<br>--- a/res/res_rtp_asterisk.c<br>+++ b/res/res_rtp_asterisk.c<br>@@ -746,6 +746,22 @@<br>  return 0;<br> }<br> <br>+static enum ast_rtp_ice_role pj2ast_rtp_ice_role(enum pj_ice_sess_role role)<br>+{<br>+  switch (role) {<br>+      case PJ_ICE_SESS_ROLE_CONTROLLED:<br>+            return AST_RTP_ICE_ROLE_CONTROLLED;<br>+  case PJ_ICE_SESS_ROLE_CONTROLLING:<br>+           return AST_RTP_ICE_ROLE_CONTROLLING;<br>+ default:<br>+             break;<br>+       }<br>+<br>+ /* If we get here, there's a bug elsewhere */<br>+    assert(0);<br>+   return 0;<br>+}<br>+<br> /*! \pre instance is locked */<br> static void ast_rtp_ice_start(struct ast_rtp_instance *instance)<br> {<br>@@ -767,7 +783,7 @@<br>                 ao2_cleanup(rtp->ice_proposed_remote_candidates);<br>          rtp->ice_proposed_remote_candidates = NULL;<br>                /* If this ICE session is being preserved then go back to the role it currently is */<br>-                rtp->role = rtp->ice->real_ice->role;<br>+            rtp->role = pj2ast_rtp_ice_role(rtp->ice->real_ice->role);<br>                return;<br>       }<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6089">change 6089</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/6089"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ia578ede1a55b21014581793992a429441903278b </div>
<div style="display:none"> Gerrit-Change-Number: 6089 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>