mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
chan_sip: Attempt ast_do_pickup in handle_invite_replaces
When a call pickup is performed using and invite with replaces header the ast_do_pickup method is attempted and a PICKUP stasis message is sent. ASTERISK-28081 #close Reported-by: Luit van Drongelen Change-Id: Ieb1442027a3ce6ae55faca47bc095e53972f947a
This commit is contained in:
committed by
Richard Mudgett
parent
f9708adcc8
commit
7f6ac5dc2f
@@ -25903,7 +25903,13 @@ static int handle_invite_replaces(struct sip_pvt *p, struct sip_request *req,
|
||||
}
|
||||
ao2_ref(bridge, -1);
|
||||
} else {
|
||||
ast_channel_move(replaces_chan, c);
|
||||
int pickedup;
|
||||
ast_channel_lock(replaces_chan);
|
||||
pickedup = ast_can_pickup(replaces_chan) && !ast_do_pickup(c, replaces_chan);
|
||||
ast_channel_unlock(replaces_chan);
|
||||
if (!pickedup) {
|
||||
ast_channel_move(replaces_chan, c);
|
||||
}
|
||||
ast_hangup(c);
|
||||
}
|
||||
ast_channel_unref(c);
|
||||
|
Reference in New Issue
Block a user