aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--channels/chan_sip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 9cebd9dab..18cb4aa65 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -13992,7 +13992,8 @@ static int handle_invite_replaces(struct sip_pvt *p, struct sip_request *req, in
sip_pvt_unlock(p->refer->refer_call);
/* Make sure that the masq does not free our PVT for the old call */
- ast_set_flag(&p->refer->refer_call->flags[0], SIP_DEFER_BYE_ON_TRANSFER); /* Delay hangup */
+ if (! earlyreplace && ! oneleggedreplace )
+ ast_set_flag(&p->refer->refer_call->flags[0], SIP_DEFER_BYE_ON_TRANSFER); /* Delay hangup */
/* Prepare the masquerade - if this does not happen, we will be gone */
if(ast_channel_masquerade(replacecall, c))
@@ -14202,7 +14203,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
error = 1;
}
- if (!error && p->refer->refer_call->owner->_state != AST_STATE_RING && p->refer->refer_call->owner->_state != AST_STATE_UP ) {
+ if (!error && p->refer->refer_call->owner->_state != AST_STATE_RINGING && p->refer->refer_call->owner->_state != AST_STATE_RING && p->refer->refer_call->owner->_state != AST_STATE_UP ) {
ast_log(LOG_NOTICE, "Supervised transfer attempted to replace non-ringing or active call id (%s)!\n", replace_id);
transmit_response(p, "603 Declined (Replaces)", req);
error = 1;