Anthony Minessale wrote:
Also is there any way to stop uuid_broadcast as I'd
need to stop it somehow if the destination picks up?
break <uuid> all
"uuid_broadcast <uuid> phrase::saynumber,1" doesn't set the
'current_application_response' variable in the same way as
"uuid_broadcast <uuid> playback::filename.wav" does (which my script
looks for to know when to move on to the next application).
I've attached a patch which sets this variable if it's any use to anyone
(I'm not that great at C so I hope it's correct, any
comments/improvements are welcome).
Thanks again
Adnan
Index: src/mod/applications/mod_dptools/mod_dptools.c
===================================================================
--- src/mod/applications/mod_dptools/mod_dptools.c (revision 13172)
+++ src/mod/applications/mod_dptools/mod_dptools.c (working copy)
@@ -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,8 +1826,23 @@
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;
+ }
}
_______________________________________________
Freeswitch-users mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org