From: Joshua Colp Date: Wed, 9 May 2007 17:43:30 +0000 (+0000) Subject: Do not prematurely go on hold if sendonly was not actually set. X-Git-Tag: 1.4.5~202 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=67a0bbaa83492a57a8a2caae1ef91ea82a018e06;p=thirdparty%2Fasterisk.git Do not prematurely go on hold if sendonly was not actually set. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@63656 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- 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);