err = 1; goto cleanup;
}
- switch_ivr_set_user(session, jsock->uid);
-
channel = switch_core_session_get_channel(session);
switch_channel_set_direction(channel, SWITCH_CALL_DIRECTION_INBOUND);
}
+ switch_ivr_set_user(session, jsock->uid);
for (hp = jsock->user_vars->headers; hp; hp = hp->next) {
switch_channel_set_variable(channel, hp->name, hp->value);
}
}
- if ((x_params = switch_xml_child(x_user, "profile-variables"))) {
+ if (switch_channel_get_caller_profile(channel) && (x_params = switch_xml_child(x_user, "profile-variables"))) {
for (x_param = switch_xml_child(x_params, "variable"); x_param; x_param = x_param->next) {
const char *var = switch_xml_attr(x_param, "name");
const char *val = switch_xml_attr(x_param, "value");