Merged revisions 88671 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r88671 | file | 2007-11-05 14:47:13 -0400 (Mon, 05 Nov 2007) | 7 lines If a SIP channel is put on hold multiple times do not keep incrementing the onHold value. (closes issue #11085) Reported by: francesco_r Tested by: blitzrage (closes issue #10474) Reported by: acennami ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
00ad9612be
commit
dbd26a0a19
1 changed files with 2 additions and 1 deletions
|
@ -6089,6 +6089,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
|
||||||
sip_peer_hold(p, FALSE);
|
sip_peer_hold(p, FALSE);
|
||||||
ast_clear_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD); /* Clear both flags */
|
ast_clear_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD); /* Clear both flags */
|
||||||
} else if (!sin.sin_addr.s_addr || (sendonly && sendonly != -1)) {
|
} else if (!sin.sin_addr.s_addr || (sendonly && sendonly != -1)) {
|
||||||
|
int already_on_hold = ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD);
|
||||||
ast_queue_control_data(p->owner, AST_CONTROL_HOLD,
|
ast_queue_control_data(p->owner, AST_CONTROL_HOLD,
|
||||||
S_OR(p->mohsuggest, NULL),
|
S_OR(p->mohsuggest, NULL),
|
||||||
!ast_strlen_zero(p->mohsuggest) ? strlen(p->mohsuggest) + 1 : 0);
|
!ast_strlen_zero(p->mohsuggest) ? strlen(p->mohsuggest) + 1 : 0);
|
||||||
|
@ -6112,7 +6113,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
|
||||||
ast_set_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD_INACTIVE);
|
ast_set_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD_INACTIVE);
|
||||||
else
|
else
|
||||||
ast_set_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD_ACTIVE);
|
ast_set_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD_ACTIVE);
|
||||||
if (global_notifyhold)
|
if (global_notifyhold && !already_on_hold)
|
||||||
sip_peer_hold(p, TRUE);
|
sip_peer_hold(p, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue