提交 63aae494 authored 作者: Michael Jerris's avatar Michael Jerris

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
上级 74dee5f6
...@@ -30,6 +30,8 @@ that much better: ...@@ -30,6 +30,8 @@ that much better:
Ken Rice of Asteria Solutions Group, INC <ken AT asteriasgi.com> - xmlcdr, sofia improvements, load testing. 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. 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. 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: A big THANK YOU goes to:
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
* *
* Anthony Minessale II <anthmct@yahoo.com> * Anthony Minessale II <anthmct@yahoo.com>
* Ken Rice, Asteria Solutions Group, Inc <ken@asteriasgi.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 * mod_dptools.c -- Raw Audio File Streaming Application Module
...@@ -135,6 +136,17 @@ static void set_function(switch_core_session_t *session, char *data) ...@@ -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) static void privacy_function(switch_core_session_t *session, char *data)
{ {
switch_channel_t *channel; switch_channel_t *channel;
...@@ -315,13 +327,22 @@ static const switch_application_interface_t set_application_interface = { ...@@ -315,13 +327,22 @@ static const switch_application_interface_t set_application_interface = {
/*.next */ &ringback_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 = { static const switch_application_interface_t answer_application_interface = {
/*.interface_name */ "answer", /*.interface_name */ "answer",
/*.application_function */ answer_function, /*.application_function */ answer_function,
/* long_desc */ "Answer the call for a channel.", /* long_desc */ "Answer the call for a channel.",
/* short_desc */ "Answer the call", /* short_desc */ "Answer the call",
/* syntax */ "", /* syntax */ "",
/*.next */ &set_application_interface /*.next */ &log_application_interface
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论