[Asterisk-code-review] chan_sip.c Fix pickup on channel that are in AST_STATE_DOWN (asterisk[16])
Friendly Automation
asteriskteam at digium.com
Tue Feb 1 08:13:45 CST 2022
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/17782 )
Change subject: chan_sip.c Fix pickup on channel that are in AST_STATE_DOWN
......................................................................
chan_sip.c Fix pickup on channel that are in AST_STATE_DOWN
resolve issue with pickup on device that uses "183" and not "180"
ASTERISK-29832
Change-Id: I4c7d223870f8ce9a7354e0f73d4e4cb2e8b58841
---
M channels/chan_sip.c
A doc/CHANGES-staging/chan_sip_pickup_AST_STATE_DOWN.txt
2 files changed, 11 insertions(+), 1 deletion(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 07cef0d..cd1346f 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -26605,7 +26605,14 @@
if (!error && ast_strlen_zero(pickup.exten) &&
ast_channel_state(replaces_chan) != AST_STATE_RINGING &&
ast_channel_state(replaces_chan) != AST_STATE_RING &&
- ast_channel_state(replaces_chan) != AST_STATE_UP) {
+ ast_channel_state(replaces_chan) != AST_STATE_UP &&
+ /*
+ * Check the down state as well because some SIP devices do not
+ * give 180 ringing when they can just give 183 session progress
+ * instead. same fix the one in ast_can_pickup
+ * git show 0a8f9d2cf08
+ */
+ ast_channel_state(replaces_chan) != AST_STATE_DOWN) {
ast_log(LOG_NOTICE, "Supervised transfer attempted to replace non-ringing or active call id (%s)!\n", replace_id);
transmit_response_reliable(p, "603 Declined (Replaces)", req);
error = 1;
diff --git a/doc/CHANGES-staging/chan_sip_pickup_AST_STATE_DOWN.txt b/doc/CHANGES-staging/chan_sip_pickup_AST_STATE_DOWN.txt
new file mode 100644
index 0000000..e658faa
--- /dev/null
+++ b/doc/CHANGES-staging/chan_sip_pickup_AST_STATE_DOWN.txt
@@ -0,0 +1,3 @@
+Subject: chan_sip.c
+
+resolve issue with pickup on device that uses "183" and not "180"
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17782
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I4c7d223870f8ce9a7354e0f73d4e4cb2e8b58841
Gerrit-Change-Number: 17782
Gerrit-PatchSet: 6
Gerrit-Owner: Mark Petersen <bugs.digium.com at zombie.dk>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220201/80402c16/attachment.html>
More information about the asterisk-code-review
mailing list