mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-04 05:55:58 -07:00
Minor backport of revision 59083 in trunk. Don't queue an unhold frame up if the call was never on hold to begin with.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@63283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
+11
-13
@@ -5234,7 +5234,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
|
||||
ast_set_write_format(p->owner, p->owner->writeformat);
|
||||
}
|
||||
|
||||
if (sin.sin_addr.s_addr && (!sendonly || sendonly == -1)) {
|
||||
if (ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD) && sin.sin_addr.s_addr && (!sendonly || sendonly == -1)) {
|
||||
ast_queue_control(p->owner, AST_CONTROL_UNHOLD);
|
||||
/* Activate a re-invite */
|
||||
ast_queue_frame(p->owner, &ast_null_frame);
|
||||
@@ -5250,18 +5250,16 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
|
||||
}
|
||||
|
||||
/* Manager Hold and Unhold events must be generated, if necessary */
|
||||
if (sin.sin_addr.s_addr && (!sendonly || sendonly == -1)) {
|
||||
if (ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD)) {
|
||||
append_history(p, "Unhold", "%s", req->data);
|
||||
if (global_callevents)
|
||||
manager_event(EVENT_FLAG_CALL, "Unhold",
|
||||
"Channel: %s\r\n"
|
||||
"Uniqueid: %s\r\n",
|
||||
p->owner->name,
|
||||
p->owner->uniqueid);
|
||||
if (global_notifyhold)
|
||||
sip_peer_hold(p, 0);
|
||||
}
|
||||
if (ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD) && sin.sin_addr.s_addr && (!sendonly || sendonly == -1)) {
|
||||
append_history(p, "Unhold", "%s", req->data);
|
||||
if (global_callevents)
|
||||
manager_event(EVENT_FLAG_CALL, "Unhold",
|
||||
"Channel: %s\r\n"
|
||||
"Uniqueid: %s\r\n",
|
||||
p->owner->name,
|
||||
p->owner->uniqueid);
|
||||
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 ) {
|
||||
/* No address for RTP, we're on hold */
|
||||
|
||||
Reference in New Issue
Block a user