mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 16:50:14 +00:00
Implement call parking in chan_skinny.
(closes issue #11342) Reported by: DEA Patches: chan_skinny-park.txt uploaded by DEA (license 3) chan_skinny-park-v2.diff.txt uploaded by mvanbaak (license 7) Tested by: DEA, mvanbaak git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4297,9 +4297,25 @@ static int handle_stimulus_message(struct skinny_req *req, struct skinnysession
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case STIMULUS_CALLPARK:
|
case STIMULUS_CALLPARK:
|
||||||
|
{
|
||||||
|
int extout;
|
||||||
|
char message[32];
|
||||||
|
|
||||||
if (skinnydebug)
|
if (skinnydebug)
|
||||||
ast_verb(1, "Received Stimulus: Park Call(%d/%d)\n", instance, callreference);
|
ast_verb(1, "Received Stimulus: Park Call(%d/%d)\n", instance, callreference);
|
||||||
/* XXX Park the call */
|
|
||||||
|
if ((sub && sub->owner) && (sub->owner->_state == AST_STATE_UP)){
|
||||||
|
c = sub->owner;
|
||||||
|
if (!ast_masq_park_call(ast_bridged_channel(c) , c, 0, &extout)) {
|
||||||
|
snprintf(message, sizeof(message), "Call Parked at: %d", extout);
|
||||||
|
transmit_displaynotify(s, message, 10);
|
||||||
|
} else {
|
||||||
|
transmit_displaynotify(s, "Call Park failed", 10);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
transmit_displaynotify(s, "Call Park not available", 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case STIMULUS_DND:
|
case STIMULUS_DND:
|
||||||
if (skinnydebug)
|
if (skinnydebug)
|
||||||
@@ -5319,9 +5335,25 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
|
|||||||
/* XXX determine the best way to pull off a conference. Meetme? */
|
/* XXX determine the best way to pull off a conference. Meetme? */
|
||||||
break;
|
break;
|
||||||
case SOFTKEY_PARK:
|
case SOFTKEY_PARK:
|
||||||
|
{
|
||||||
|
int extout;
|
||||||
|
char message[32];
|
||||||
|
|
||||||
if (skinnydebug)
|
if (skinnydebug)
|
||||||
ast_verb(1, "Received Softkey Event: Park Call(%d/%d)\n", instance, callreference);
|
ast_verb(1, "Received Softkey Event: Park Call(%d/%d)\n", instance, callreference);
|
||||||
/* XXX Park the call */
|
|
||||||
|
if ((sub && sub->owner) && (sub->owner->_state == AST_STATE_UP)){
|
||||||
|
c = sub->owner;
|
||||||
|
if (!ast_masq_park_call(ast_bridged_channel(c) , c, 0, &extout)) {
|
||||||
|
snprintf(message, sizeof(message), "Call Parked at: %d", extout);
|
||||||
|
transmit_displaynotify(s, message, 10);
|
||||||
|
} else {
|
||||||
|
transmit_displaynotify(s, "Call Park failed", 10);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
transmit_displaynotify(s, "Call Park not available", 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SOFTKEY_JOIN:
|
case SOFTKEY_JOIN:
|
||||||
if (skinnydebug)
|
if (skinnydebug)
|
||||||
|
|||||||
Reference in New Issue
Block a user