[Asterisk-cvs] asterisk/channels chan_oss.c,1.37,1.38

markster at lists.digium.com markster at lists.digium.com
Thu Dec 23 06:38:54 CST 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv31279/channels

Modified Files:
	chan_oss.c 
Log Message:
Add "flash" capability to command line


Index: chan_oss.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_oss.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- chan_oss.c	26 Oct 2004 22:25:43 -0000	1.37
+++ chan_oss.c	23 Dec 2004 11:34:33 -0000	1.38
@@ -877,11 +877,32 @@
 	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 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 },




More information about the svn-commits mailing list