[commit] r13400 - freeswitch/trunk/src
Author: anthm Date: Wed May 20 08:02:41 2009 New Revision: 13400 Log: treat app::arg syntax in execute_on_answer as a broadcast request Modified: freeswitch/trunk/src/switch_channel.c Modified: freeswitch/trunk/src/switch_channel.c ============================================================================== --- freeswitch/trunk/src/switch_channel.c (original) +++ freeswitch/trunk/src/switch_channel.c Wed May 20 08:02:41 2009 @@ -1893,12 +1893,17 @@ char *arg = NULL; app = switch_core_session_strdup(channel->session, var); - - if ((arg = strchr(app, ' '))) { - *arg++ = '\0'; + + if ((arg = strchr(app, ':')) && *(arg+1) == ':') { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s execute on answer: %s (BROADCAST)\n", channel->name, app); + switch_ivr_broadcast(switch_core_session_get_uuid(channel->session), app, SMF_NONE); + } else { + if ((arg = strchr(app, ' '))) { + *arg++ = '\0'; + } + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s execute on answer: %s(%s)\n", channel->name, app, switch_str_nil(arg)); + switch_core_session_execute_application(channel->session, app, arg); } - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s execute on answer: %s(%s)", channel->name, app, switch_str_nil(arg)); - switch_core_session_execute_application(channel->session, app, arg); } switch_channel_audio_sync(channel);
participants (1)
-
FreeSWITCH SVN