{
switch_assert(channel != NULL);
+ switch_channel_set_flag(channel, CF_DIALPLAN);
+
switch_mutex_lock(channel->profile_mutex);
caller_extension->next = channel->caller_profile->caller_extension;
channel->caller_profile->caller_extension = caller_extension;
}
}
- if (count) {
- switch_channel_set_flag(session->channel, CF_DIALPLAN);
- } else {
+ if (!count) {
if (switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
if (switch_channel_test_flag(session->channel, CF_ANSWERED)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG,