mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
Fix underscreen buttons warnings apeared while transfer process
........ Merged revisions 375016 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3297,7 +3297,7 @@ static void handle_key_fav(struct unistimsession *pte, char keycode)
|
|||||||
|
|
||||||
static void key_call(struct unistimsession *pte, char keycode)
|
static void key_call(struct unistimsession *pte, char keycode)
|
||||||
{
|
{
|
||||||
struct unistim_subchannel *sub = NULL;
|
struct unistim_subchannel *sub = get_sub(pte->device, SUB_REAL);
|
||||||
if ((keycode >= KEY_0) && (keycode <= KEY_SHARP)) {
|
if ((keycode >= KEY_0) && (keycode <= KEY_SHARP)) {
|
||||||
if (keycode == KEY_SHARP) {
|
if (keycode == KEY_SHARP) {
|
||||||
keycode = '#';
|
keycode = '#';
|
||||||
@@ -3311,15 +3311,19 @@ static void key_call(struct unistimsession *pte, char keycode)
|
|||||||
}
|
}
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case KEY_FUNC1:
|
case KEY_FUNC1:
|
||||||
if (get_sub(pte->device, SUB_THREEWAY)) {
|
if (ast_channel_state(sub->owner) == AST_STATE_UP) {
|
||||||
close_call(pte);
|
if (get_sub(pte->device, SUB_THREEWAY)) {
|
||||||
|
close_call(pte);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KEY_FUNC2:
|
case KEY_FUNC2:
|
||||||
if (get_sub(pte->device, SUB_THREEWAY)) {
|
if (ast_channel_state(sub->owner) == AST_STATE_UP) {
|
||||||
transfer_cancel_step2(pte);
|
if (get_sub(pte->device, SUB_THREEWAY)) {
|
||||||
} else {
|
transfer_cancel_step2(pte);
|
||||||
transfer_call_step1(pte);
|
} else {
|
||||||
|
transfer_call_step1(pte);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KEY_HANGUP:
|
case KEY_HANGUP:
|
||||||
@@ -3351,7 +3355,6 @@ static void key_call(struct unistimsession *pte, char keycode)
|
|||||||
MUTE_OFF);
|
MUTE_OFF);
|
||||||
break;
|
break;
|
||||||
case KEY_MUTE:
|
case KEY_MUTE:
|
||||||
sub = get_sub(pte->device, SUB_REAL);
|
|
||||||
if (!sub || !sub->owner) {
|
if (!sub || !sub->owner) {
|
||||||
ast_log(LOG_WARNING, "Unable to find subchannel for music on hold\n");
|
ast_log(LOG_WARNING, "Unable to find subchannel for music on hold\n");
|
||||||
return;
|
return;
|
||||||
@@ -3366,7 +3369,6 @@ static void key_call(struct unistimsession *pte, char keycode)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KEY_ONHOLD:
|
case KEY_ONHOLD:
|
||||||
sub = get_sub(pte->device, SUB_REAL);
|
|
||||||
if (!sub) {
|
if (!sub) {
|
||||||
if(pte->device->ssub[pte->device->selected]) {
|
if(pte->device->ssub[pte->device->selected]) {
|
||||||
sub_hold(pte, pte->device->ssub[pte->device->selected]);
|
sub_hold(pte, pte->device->ssub[pte->device->selected]);
|
||||||
|
Reference in New Issue
Block a user