<p>Mark Petersen has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/17966">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_sip.c Fix pickup on channel that are in AST_STATE_DOWN<br><br>resolve issue with pickup on device that uses "183" and not "180"<br><br>ASTERISK-29832<br><br>Change-Id: I4c7d223870f8ce9a7354e0f73d4e4cb2e8b58841<br>---<br>M channels/chan_sip.c<br>A doc/CHANGES-staging/chan_sip_pickup_AST_STATE_DOWN.txt<br>2 files changed, 11 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/66/17966/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/channels/chan_sip.c b/channels/chan_sip.c</span><br><span>index e19e19d..b6aff80 100644</span><br><span>--- a/channels/chan_sip.c</span><br><span>+++ b/channels/chan_sip.c</span><br><span>@@ -26607,7 +26607,14 @@</span><br><span>                if (!error && ast_strlen_zero(pickup.exten) &&</span><br><span>                               ast_channel_state(replaces_chan) != AST_STATE_RINGING &&</span><br><span>                             ast_channel_state(replaces_chan) != AST_STATE_RING &&</span><br><span style="color: hsl(0, 100%, 40%);">-                           ast_channel_state(replaces_chan) != AST_STATE_UP) {</span><br><span style="color: hsl(120, 100%, 40%);">+                           ast_channel_state(replaces_chan) != AST_STATE_UP &&</span><br><span style="color: hsl(120, 100%, 40%);">+                           /*</span><br><span style="color: hsl(120, 100%, 40%);">+                            * Check the down state as well because some SIP devices do not</span><br><span style="color: hsl(120, 100%, 40%);">+                                * give 180 ringing when they can just give 183 session progress</span><br><span style="color: hsl(120, 100%, 40%);">+                               * instead. same fix the one in ast_can_pickup</span><br><span style="color: hsl(120, 100%, 40%);">+                         * git show 0a8f9d2cf08</span><br><span style="color: hsl(120, 100%, 40%);">+                                */</span><br><span style="color: hsl(120, 100%, 40%);">+                            ast_channel_state(replaces_chan) != AST_STATE_DOWN) {</span><br><span>                        ast_log(LOG_NOTICE, "Supervised transfer attempted to replace non-ringing or active call id (%s)!\n", replace_id);</span><br><span>                         transmit_response_reliable(p, "603 Declined (Replaces)", req);</span><br><span>                     error = 1;</span><br><span>diff --git a/doc/CHANGES-staging/chan_sip_pickup_AST_STATE_DOWN.txt b/doc/CHANGES-staging/chan_sip_pickup_AST_STATE_DOWN.txt</span><br><span>new file mode 100644</span><br><span>index 0000000..e658faa</span><br><span>--- /dev/null</span><br><span>+++ b/doc/CHANGES-staging/chan_sip_pickup_AST_STATE_DOWN.txt</span><br><span>@@ -0,0 +1,3 @@</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: chan_sip.c</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+resolve issue with pickup on device that uses "183" and not "180"</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/17966">change 17966</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/+/17966"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I4c7d223870f8ce9a7354e0f73d4e4cb2e8b58841 </div>
<div style="display:none"> Gerrit-Change-Number: 17966 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Mark Petersen <bugs.digium.com@zombie.dk> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>