tweak cause code
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7534 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
17603b9ccb
commit
c83a3d250f
|
@ -1352,6 +1352,7 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
|
|||
|
||||
if (switch_xml_locate_user("id", user, domain, NULL, &xml, &x_domain, &x_user, params) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "can't find user [%s@%s]\n", user, domain);
|
||||
cause = SWITCH_CAUSE_SUBSCRIBER_ABSENT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
@ -244,9 +244,11 @@ SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_
|
|||
}
|
||||
}
|
||||
|
||||
switch_assert(*new_session != NULL);
|
||||
|
||||
if (*new_session) {
|
||||
if (!*new_session) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "outgoing method for endpoint: [%s] returned: [%s] but there is no new session!\n",
|
||||
endpoint_name, switch_channel_cause2str(cause));
|
||||
return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
|
||||
} else {
|
||||
switch_caller_profile_t *profile = NULL, *peer_profile = NULL, *cloned_profile = NULL;
|
||||
switch_event_t *event;
|
||||
switch_channel_t *peer_channel = switch_core_session_get_channel(*new_session);
|
||||
|
|
Loading…
Reference in New Issue