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
This commit is contained in:
Mark Petersen 2022-01-07 11:01:27 +01:00 committed by Joshua Colp
parent 2a34bb1e11
commit 95ee1d06d6
2 changed files with 11 additions and 1 deletions

View File

@ -26605,7 +26605,14 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, str
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;

View File

@ -0,0 +1,3 @@
Subject: chan_sip.c
resolve issue with pickup on device that uses "183" and not "180"