aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_oss.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-23 11:34:33 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-23 11:34:33 +0000
commitdd3e203c7b795b0ccfe4cc5eb6a2d2cb9a8afd73 (patch)
treec7481e6f32d9a2bf2bccf03444f2c8190ef4201f /channels/chan_oss.c
parent84338ad7535e826a1c3b4b1b7b976630964cba88 (diff)
Add "flash" capability to command line
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4544 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_oss.c')
-rwxr-xr-xchannels/chan_oss.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index ad87a9128..4fc613c69 100755
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -877,11 +877,32 @@ static int console_hangup(int fd, int argc, char *argv[])
return RESULT_SUCCESS;
}
+static int console_flash(int fd, int argc, char *argv[])
+{
+ struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_FLASH };
+ if (argc != 1)
+ return RESULT_SHOWUSAGE;
+ cursound = -1;
+ if (!oss.owner) {
+ ast_cli(fd, "No call to flash\n");
+ return RESULT_FAILURE;
+ }
+ hookstate = 0;
+ if (oss.owner) {
+ ast_queue_frame(oss.owner, &f);
+ }
+ return RESULT_SUCCESS;
+}
+
static char hangup_usage[] =
"Usage: hangup\n"
" Hangs up any call currently placed on the console.\n";
+static char flash_usage[] =
+"Usage: flash\n"
+" Flashes the call currently placed on the console.\n";
+
static int console_dial(int fd, int argc, char *argv[])
{
char tmp[256], *tmp2;
@@ -965,6 +986,7 @@ static char transfer_usage[] =
static struct ast_cli_entry myclis[] = {
{ { "answer", NULL }, console_answer, "Answer an incoming console call", answer_usage },
{ { "hangup", NULL }, console_hangup, "Hangup a call on the console", hangup_usage },
+ { { "flash", NULL }, console_flash, "Flash a call on the console", flash_usage },
{ { "dial", NULL }, console_dial, "Dial an extension on the console", dial_usage },
{ { "transfer", NULL }, console_transfer, "Transfer a call to a different extension", transfer_usage },
{ { "send", "text", NULL }, console_sendtext, "Send text to the remote device", sendtext_usage },