add moh by default to uuid_broadcast when only broadcasting to A leg

use aleg arg to disable this
This commit is contained in:
Anthony Minessale 2011-01-25 11:10:59 -06:00
parent e78f2bfb5d
commit d164a79764
1 changed files with 15 additions and 4 deletions

View File

@ -2389,15 +2389,26 @@ SWITCH_STANDARD_API(uuid_broadcast_function)
switch_media_flag_t flags = SMF_NONE; switch_media_flag_t flags = SMF_NONE;
if (argv[2]) { if (argv[2]) {
if (!strcasecmp(argv[2], "both")) { if (switch_stristr("both", (argv[2]))) {
flags |= (SMF_ECHO_ALEG | SMF_ECHO_BLEG); flags |= (SMF_ECHO_ALEG | SMF_ECHO_BLEG);
} else if (!strcasecmp(argv[2], "aleg")) { }
if (switch_stristr("aleg", argv[2])) {
flags |= SMF_ECHO_ALEG; flags |= SMF_ECHO_ALEG;
} else if (!strcasecmp(argv[2], "bleg")) { }
if (switch_stristr("bleg", argv[2])) {
flags &= ~SMF_HOLD_BLEG;
flags |= SMF_ECHO_BLEG; flags |= SMF_ECHO_BLEG;
} }
if (switch_stristr("holdb", argv[2])) {
flags &= ~SMF_ECHO_BLEG;
flags |= SMF_HOLD_BLEG;
}
} else { } else {
flags |= SMF_ECHO_ALEG; flags = SMF_ECHO_ALEG | SMF_HOLD_BLEG;
} }
status = switch_ivr_broadcast(argv[0], argv[1], flags); status = switch_ivr_broadcast(argv[0], argv[1], flags);