add "log" application to print log messages From Mike Murdock.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3451 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
74dee5f6ec
commit
63aae494ac
2
AUTHORS
2
AUTHORS
|
@ -30,6 +30,8 @@ that much better:
|
|||
Ken Rice of Asteria Solutions Group, INC <ken AT asteriasgi.com> - xmlcdr, sofia improvements, load testing.
|
||||
Neal Horman <neal at wanlink dot com> - conference improvements, switch_ivr menu additions and other tweaks.
|
||||
Johny Kadarisman <jkr888 at gmail.com> - mod_python fixups.
|
||||
Michael Murdock <mike at mmurdock dot org> - testing, documentation, bug finding and usability enhancements.
|
||||
|
||||
|
||||
A big THANK YOU goes to:
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Ken Rice, Asteria Solutions Group, Inc <ken@asteriasgi.com>
|
||||
* Michael Murdock <mike at mmurdock dot org>
|
||||
*
|
||||
*
|
||||
* mod_dptools.c -- Raw Audio File Streaming Application Module
|
||||
|
@ -135,6 +136,17 @@ static void set_function(switch_core_session_t *session, char *data)
|
|||
}
|
||||
}
|
||||
|
||||
static void log_function(switch_core_session_t *session, char *data)
|
||||
{
|
||||
switch_channel_t *channel;
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
if (!switch_strlen_zero(data)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s\n", data);
|
||||
}
|
||||
}
|
||||
|
||||
static void privacy_function(switch_core_session_t *session, char *data)
|
||||
{
|
||||
switch_channel_t *channel;
|
||||
|
@ -315,13 +327,22 @@ static const switch_application_interface_t set_application_interface = {
|
|||
/*.next */ &ringback_application_interface
|
||||
};
|
||||
|
||||
static const switch_application_interface_t log_application_interface = {
|
||||
/*.interface_name */ "log",
|
||||
/*.application_function */ log_function,
|
||||
/* long_desc */ "Logs a channel varaible for the channel calling the application.",
|
||||
/* short_desc */ "Logs a channel varaible",
|
||||
/* syntax */ "<varname>",
|
||||
/*.next */ &set_application_interface
|
||||
};
|
||||
|
||||
static const switch_application_interface_t answer_application_interface = {
|
||||
/*.interface_name */ "answer",
|
||||
/*.application_function */ answer_function,
|
||||
/* long_desc */ "Answer the call for a channel.",
|
||||
/* short_desc */ "Answer the call",
|
||||
/* syntax */ "",
|
||||
/*.next */ &set_application_interface
|
||||
/*.next */ &log_application_interface
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue