switch_call_cause_t *cancel_cause)
{
switch_xml_t x_domain = NULL, xml = NULL, x_user = NULL, x_group = NULL, x_param, x_params;
- char *user = NULL, *domain = NULL;
+ char *user = NULL, *domain = NULL, *dup_domain = NULL;
const char *dest = NULL;
static switch_call_cause_t cause = SWITCH_CAUSE_NONE;
unsigned int timelimit = 60;
if ((domain = strchr(user, '@'))) {
*domain++ = '\0';
} else {
- domain = switch_core_get_variable_pdup("domain", switch_core_session_get_pool(session));
+ domain = switch_core_get_variable_dup("domain");
+ dup_domain = domain;
}
if (!domain) {
}
switch_safe_free(user);
+ switch_safe_free(dup_domain);
return cause;
}