diff options
author | Jason Parker <jparker@digium.com> | 2013-05-24 21:21:25 +0000 |
---|---|---|
committer | Jason Parker <jparker@digium.com> | 2013-05-24 21:21:25 +0000 |
commit | 154fbf8cae866269cb2b64a5cb26cb4d435cf4df (patch) | |
tree | bdf1e07244cfee6526570c3b9357da9378981150 /channels/chan_unistim.c | |
parent | 1223199b3d18b82a931475f939170b9379e6afed (diff) |
Split Hold event into Hold/Unhold, and move it into core.
(closes issue ASTERISK-21487)
Review: https://reviewboard.asterisk.org/r/2565/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_unistim.c')
-rw-r--r-- | channels/chan_unistim.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index 42a71bac3..426e6ab10 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -2453,7 +2453,7 @@ static void sub_hold(struct unistimsession *pte, struct unistim_subchannel *sub) send_select_output(pte, pte->device->output, pte->device->volume, MUTE_ON); send_stop_timer(pte); if (sub->owner) { - ast_queue_control_data(sub->owner, AST_CONTROL_HOLD, NULL, 0); + ast_queue_hold(sub->owner, NULL); send_end_call(pte); } return; @@ -2474,7 +2474,7 @@ static void sub_unhold(struct unistimsession *pte, struct unistim_subchannel *su send_select_output(pte, pte->device->output, pte->device->volume, MUTE_OFF); send_start_timer(pte); if (sub->owner) { - ast_queue_control_data(sub->owner, AST_CONTROL_UNHOLD, NULL, 0); + ast_queue_unhold(sub->owner); if (sub->rtp) { send_start_rtp(sub); } @@ -2961,8 +2961,7 @@ static void transfer_call_step1(struct unistimsession *pte) if (sub->moh) { ast_log(LOG_WARNING, "Transfer with peer already listening music on hold\n"); } else { - ast_queue_control_data(sub->owner, AST_CONTROL_HOLD, - sub->parent->musicclass, strlen(sub->parent->musicclass) + 1); + ast_queue_hold(sub->owner, sub->parent->musicclass); sub->moh = 1; sub->subtype = SUB_THREEWAY; } @@ -2988,7 +2987,7 @@ static void transfer_cancel_step2(struct unistimsession *pte) } if (sub->owner) { swap_subs(sub, sub_trans); - ast_queue_control(sub_trans->owner, AST_CONTROL_UNHOLD); + ast_queue_unhold(sub_trans->owner); sub_trans->moh = 0; sub_trans->subtype = SUB_REAL; sub->subtype = SUB_THREEWAY; @@ -3498,7 +3497,7 @@ static void key_dial_page(struct unistimsession *pte, char keycode) if (sub && sub->owner) { sub_stop_silence(pte, sub); send_tone(pte, 0, 0); - ast_queue_control(sub->owner, AST_CONTROL_UNHOLD); + ast_queue_unhold(sub->owner); sub->moh = 0; sub->subtype = SUB_REAL; pte->state = STATE_CALL; @@ -4789,7 +4788,7 @@ static int unistim_hangup(struct ast_channel *ast) if (unistimdebug) { ast_verb(0, "Threeway call disconnected, switching to real call\n"); } - ast_queue_control(sub_trans->owner, AST_CONTROL_UNHOLD); + ast_queue_unhold(sub_trans->owner); sub_trans->moh = 0; sub_trans->subtype = SUB_REAL; swap_subs(sub_trans, sub); |