<p>Alexei Gradinari has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11379">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pjsip: replace 180 by 183 if SDP negotiation has completed<br><br>The caller endpoint hears dead silence if a callee replies 180 (without SDP)<br>and the caller already received 183 (with SDP).<br>It happens because Asterisk sends 180 (WITH SDP) to the caller,<br>there are not incoming RTP packets from the callee<br>and Asterisk does not generate inband ringing,<br>so there are not any outgoing RTP packets to the caller.<br><br>This patch replaces 180 by 183 if SDP negotiation has completed,<br>as if the caller endpoint is configured with "inband_progress=yes".<br><br>In this case Asterisk will generate inband ringing untill Asterisk receive<br>incoming RTP packets from the callee.<br><br>ASTERISK-27994 #close<br><br>Change-Id: I7450b751083ec30d68d6abffe922215a15ae5a73<br>---<br>M channels/chan_pjsip.c<br>1 file changed, 3 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/79/11379/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c</span><br><span>index 9c27f33..8508631 100644</span><br><span>--- a/channels/chan_pjsip.c</span><br><span>+++ b/channels/chan_pjsip.c</span><br><span>@@ -1592,7 +1592,9 @@</span><br><span>     switch (condition) {</span><br><span>         case AST_CONTROL_RINGING:</span><br><span>            if (ast_channel_state(ast) == AST_STATE_RING) {</span><br><span style="color: hsl(0, 100%, 40%);">-                 if (channel->session->endpoint->inband_progress) {</span><br><span style="color: hsl(120, 100%, 40%);">+                   if (channel->session->endpoint->inband_progress ||</span><br><span style="color: hsl(120, 100%, 40%);">+                           (channel->session->inv_session && channel->session->inv_session->neg &&</span><br><span style="color: hsl(120, 100%, 40%);">+                                pjmedia_sdp_neg_get_state(channel->session->inv_session->neg) == PJMEDIA_SDP_NEG_STATE_DONE)) {</span><br><span>                             response_code = 183;</span><br><span>                                 res = -1;</span><br><span>                    } else {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11379">change 11379</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/+/11379"/><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: I7450b751083ec30d68d6abffe922215a15ae5a73 </div>
<div style="display:none"> Gerrit-Change-Number: 11379 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>