[Freeswitch-svn] [commit] r13298 - freeswitch/trunk/src/mod/applications/mod_dptools

FreeSWITCH SVN brian at freeswitch.org
Wed May 13 18:41:55 PDT 2009


Author: brian
Date: Wed May 13 20:41:54 2009
New Revision: 13298

Log:
 MODAPP-273

Modified:
   freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c

Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	Wed May 13 20:41:54 2009
@@ -1807,6 +1807,7 @@
 	char *mydata = NULL;
 	switch_input_args_t args = { 0 };
 	switch_channel_t *channel = switch_core_session_get_channel(session);
+	switch_status_t status;
 
 	if (!switch_strlen_zero(data) && (mydata = switch_core_session_strdup(session, data))) {
 		const char *lang;
@@ -1825,7 +1826,22 @@
 		
 		switch_channel_set_variable(channel, SWITCH_PLAYBACK_TERMINATOR_USED, "" );
 
-		switch_ivr_phrase_macro(session, macro, mdata, lang, &args);
+		status = switch_ivr_phrase_macro(session, macro, mdata, lang, &args);
+	} else {
+		status = SWITCH_STATUS_NOOP;
+	}
+
+	switch (status) {
+	case SWITCH_STATUS_SUCCESS:
+	case SWITCH_STATUS_BREAK:
+		switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "PHRASE PLAYED");
+		break;
+	case SWITCH_STATUS_NOOP:
+		switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "NOTHING");
+		break;
+	default:
+		switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "UNKNOWN ERROR");
+		break;
 	}
 }
 



More information about the Freeswitch-svn mailing list