via: bdf678e401a8077aab06b9c04004c92ef6631e26 (commit)
from: e79174cacf6abb943fe34840a5261b940b281c91 (commit)
= COMMIT LOG ===========================================================
committer: Anthony Minessale
comments:
dont run execute_on_fsk when there was no data collected
diff --git a/src/mod/applications/mod_fsk/mod_fsk.c b/src/mod/applications/mod_fsk/mod_fsk.c
index 9802353..0291707 100644
--- a/src/mod/applications/mod_fsk/mod_fsk.c
+++ b/src/mod/applications/mod_fsk/mod_fsk.c
@@ -220,6 +220,7 @@ static switch_bool_t fsk_detect_callback(switch_media_bug_t *bug, void *user_dat
char *sp;
switch_event_t *event;
const char *app_var;
+ int total = 0;
switch_event_create_plain(&event, SWITCH_EVENT_CHANNEL_DATA);
@@ -255,6 +256,7 @@ static switch_bool_t fsk_detect_callback(switch_media_bug_t *bug, void *user_dat
}
if (varname && val) {
+ total++;
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(pvt->session), SWITCH_LOG_DEBUG, "%s setting FSK var [%s][%s]\n",
switch_channel_get_name(channel), varname, val);
switch_channel_set_variable(channel, varname, val);
@@ -270,7 +272,7 @@ static switch_bool_t fsk_detect_callback(switch_media_bug_t *bug, void *user_dat
}
}
- if ((app_var = switch_channel_get_variable(channel, "execute_on_fsk"))) {
+ if (total && (app_var = switch_channel_get_variable(channel, "execute_on_fsk"))) {
char *app_arg;
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(pvt->session), SWITCH_LOG_DEBUG, "%s processing execute_on_fsk [%s]\n",
Summary of changes: src/mod/applications/mod_fsk/mod_fsk.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email
For more info, see http://blog.chomperstomp.com/?p=630
--
FreeSWITCH Source