can you submit the patch over jira http://jira.freeswitch.org they do not transfer well over email and we need to document all the patches. On Fri, May 1, 2009 at 12:50 AM, TTNC - Adnan Barakat <technical@ttnc.co.uk>wrote:
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 Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400