fix regression from f60fdf653d

This commit is contained in:
Anthony Minessale committed 2011-02-04 08:56:30 -06:00
1 parent b6ac001276
commit 46f6c6e42d
2 files changed
+8 -2

No files matched your search

@@ -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);
}