if (strchr(argv[1], 'a')) {
bind_flags |= SBF_DIAL_ALEG;
}
+
if (strchr(argv[1], 'b')) {
bind_flags |= SBF_DIAL_BLEG;
}
+
if (strchr(argv[2], 'a')) {
if ((bind_flags & SBF_EXEC_BLEG)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
bind_flags |= SBF_EXEC_ALEG;
}
}
+
if (strchr(argv[2], 'b')) {
if ((bind_flags & SBF_EXEC_ALEG)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
}
}
+ if (strchr(argv[2], 'a')) {
+ if ((bind_flags & SBF_EXEC_BLEG)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
+ } else {
+ bind_flags |= SBF_EXEC_ALEG;
+ }
+ }
+
if (strchr(argv[2], 'o')) {
if ((bind_flags & SBF_EXEC_BLEG) || (bind_flags & SBF_EXEC_ALEG) || (bind_flags & SBF_EXEC_SAME)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");