[asterisk-commits] branch oej/test-this-branch r13356 -
/team/oej/test-this-branch/apps/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Mar 17 03:29:51 MST 2006
Author: oej
Date: Fri Mar 17 04:29:49 2006
New Revision: 13356
URL: http://svn.digium.com/view/asterisk?rev=13356&view=rev
Log:
- Fix description for playdtmf manager command. (squinky86)
Modified:
team/oej/test-this-branch/apps/app_senddtmf.c
Modified: team/oej/test-this-branch/apps/app_senddtmf.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_senddtmf.c?rev=13356&r1=13355&r2=13356&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_senddtmf.c (original)
+++ team/oej/test-this-branch/apps/app_senddtmf.c Fri Mar 17 04:29:49 2006
@@ -94,7 +94,13 @@
return res;
}
-static int manager_send_dtmf(struct mansession *s, struct message *m)
+static char mandescr_playdtmf[] =
+ "Description: Plays a DTMF digit on the specified channel.\n"
+ "Variables: (all are required)\n"
+ "Channel: Channel name to send digit to\n"
+ "Digit: The dtmf digit to play\n";
+
+static int manager_play_dtmf(struct mansession *s, struct message *m)
{
char *channel, *digit;
@@ -103,6 +109,10 @@
struct ast_channel *chan = ast_get_channel_by_name_locked(channel);
if (chan == NULL) {
astman_send_error(s, m, "No such channel");
+ return 0;
+ }
+ if (digit == NULL) {
+ astman_send_error(s, m, "No digit specified");
return 0;
}
ast_senddigit(chan, *digit);
@@ -125,7 +135,7 @@
int load_module(void)
{
- ast_manager_register( "playDTMF", EVENT_FLAG_AGENT, manager_send_dtmf, "Play DTMF signal on a specific channel." );
+ ast_manager_register2( "playDTMF", EVENT_FLAG_AGENT, manager_play_dtmf, "Play DTMF signal on a specific channel.", mandescr_playdtmf);
return ast_register_application(app, senddtmf_exec, synopsis, descrip);
}
More information about the asterisk-commits
mailing list