<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19088">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_sdp_rtp: Skip formats without SDP details.<br><br>When producing an outgoing SDP we iterate through the configured<br>formats and produce SDP information. It is possible for some<br>configured formats to not have SDP information available. If this<br>is the case we skip over them to allow the SDP to still be<br>produced.<br><br>ASTERISK-29185<br><br>Change-Id: I3e37569aa4ca341260e6ca5904dc2f75e46a1749<br>---<br>M res/res_pjsip_sdp_rtp.c<br>1 file changed, 27 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/88/19088/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c</span><br><span>index 3e10cfd..e7b19e4 100644</span><br><span>--- a/res/res_pjsip_sdp_rtp.c</span><br><span>+++ b/res/res_pjsip_sdp_rtp.c</span><br><span>@@ -1902,6 +1902,16 @@</span><br><span>                      continue;</span><br><span>            }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+         /* It is possible for some formats not to have SDP information available for them</span><br><span style="color: hsl(120, 100%, 40%);">+              * and if this is the case, skip over them so the SDP can still be created.</span><br><span style="color: hsl(120, 100%, 40%);">+            */</span><br><span style="color: hsl(120, 100%, 40%);">+           if (!ast_rtp_lookup_sample_rate2(1, format, 0)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                     ast_log(LOG_WARNING, "Format '%s' can not be added to SDP, consider disallowing it on endpoint '%s'\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                             ast_format_get_name(format), ast_sorcery_object_get_id(session->endpoint));</span><br><span style="color: hsl(120, 100%, 40%);">+                        ao2_ref(format, -1);</span><br><span style="color: hsl(120, 100%, 40%);">+                  continue;</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>          /* If this stream is not a transport we need to use the transport codecs structure for payload management to prevent</span><br><span>                  * conflicts.</span><br><span>                 */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19088">change 19088</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/+/19088"/><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: I3e37569aa4ca341260e6ca5904dc2f75e46a1749 </div>
<div style="display:none"> Gerrit-Change-Number: 19088 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>