fix regression from f60fdf653dd2d7f8d3eaa6a9086e1f68bd993c59

This commit is contained in:
Anthony Minessale 2011-02-04 08:56:30 -06:00
parent b6ac001276
commit 46f6c6e42d
2 changed files with 8 additions and 2 deletions

View File

@ -2774,7 +2774,7 @@ static switch_call_cause_t group_outgoing_channel(switch_core_session_t *session
switch_originate_flag_t myflags = SOF_NONE;
char *cid_name_override = NULL;
char *cid_num_override = NULL;
char *domain = NULL;
char *domain = NULL, *dup_domain = NULL;
switch_channel_t *new_channel = NULL;
unsigned int timelimit = 60;
const char *skip, *var;
@ -2788,6 +2788,7 @@ static switch_call_cause_t group_outgoing_channel(switch_core_session_t *session
*domain++ = '\0';
} else {
domain = switch_core_get_variable_pdup("domain", switch_core_session_get_pool(session));
dup_domain = domain;
}
if (!domain) {
@ -2859,6 +2860,7 @@ static switch_call_cause_t group_outgoing_channel(switch_core_session_t *session
switch_safe_free(template);
switch_safe_free(group);
switch_safe_free(dup_domain);
if (cause == SWITCH_CAUSE_NONE) {
cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;

View File

@ -309,11 +309,13 @@ static switch_call_cause_t sip_outgoing_channel(switch_core_session_t *session,
switch_call_cause_t *cancel_cause)
{
const char *profile;
char *dup_profile = NULL;
if (session) {
profile = switch_channel_get_variable(switch_core_session_get_channel(session), "sip_profile");
} else {
profile = switch_core_get_variable_pdup("sip_profile", switch_core_session_get_pool(session));
dup_profile = switch_core_get_variable_dup("sip_profile");
profile = dup_profile;
}
if (zstr(profile)) {
profile = "default";
@ -323,6 +325,8 @@ static switch_call_cause_t sip_outgoing_channel(switch_core_session_t *session,
UNPROTECT_INTERFACE(sip_endpoint_interface);
switch_safe_free(dup_profile);
return switch_core_session_outgoing_channel(session, var_event, "sofia", outbound_profile, new_session, pool, SOF_NONE, cancel_cause);
}