diff --git a/channels/chan_sip.c b/channels/chan_sip.c index dfdffd988b..f221054d7b 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5238,7 +5238,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req) ast_queue_control(p->owner, AST_CONTROL_UNHOLD); /* Activate a re-invite */ ast_queue_frame(p->owner, &ast_null_frame); - } else if (!sin.sin_addr.s_addr || sendonly) { + } else if (!sin.sin_addr.s_addr || (sendonly && sendonly != -1)) { ast_queue_control_data(p->owner, AST_CONTROL_HOLD, S_OR(p->mohsuggest, NULL), !ast_strlen_zero(p->mohsuggest) ? strlen(p->mohsuggest) + 1 : 0); @@ -5261,7 +5261,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req) if (global_notifyhold) sip_peer_hold(p, 0); ast_clear_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD); /* Clear both flags */ - } else if (!sin.sin_addr.s_addr || sendonly ) { + } else if (!sin.sin_addr.s_addr || (sendonly && sendonly != -1)) { /* No address for RTP, we're on hold */ append_history(p, "Hold", "%s", req->data);