From 10c172eb00974ddcdd9cfaed95772a41712d72ca Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Mon, 5 Nov 2007 18:47:13 +0000 Subject: [PATCH] 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/branches/1.4@88671 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5fba75f36b..f65369e9be 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4847,7 +4847,7 @@ static int find_sdp(struct sip_request *req) /*! \brief Change hold state for a call */ static void change_hold_state(struct sip_pvt *dialog, struct sip_request *req, int holdstate, int sendonly) { - if (global_notifyhold) + if (global_notifyhold && (!holdstate || !ast_test_flag(&dialog->flags[1], SIP_PAGE2_CALL_ONHOLD))) sip_peer_hold(dialog, holdstate); if (global_callevents) manager_event(EVENT_FLAG_CALL, holdstate ? "Hold" : "Unhold",