]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Do not prematurely go on hold if sendonly was not actually set.
authorJoshua Colp <jcolp@digium.com>
Wed, 9 May 2007 17:43:30 +0000 (17:43 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 9 May 2007 17:43:30 +0000 (17:43 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@63656 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index dfdffd988b11e8450294012fbc06d29b50aa457a..f221054d7b22f0d90e7e0295caccafa14007667e 100644 (file)
@@ -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);