mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-22 17:42:39 +00:00
FS-4602 --resolve
This commit is contained in:
parent
71dd24d199
commit
5743dcafd0
@ -1716,11 +1716,13 @@ void sofia_event_callback(nua_event_t event,
|
|||||||
switch_core_session_t *session;
|
switch_core_session_t *session;
|
||||||
|
|
||||||
if ((session = switch_core_session_locate(sofia_private->uuid))) {
|
if ((session = switch_core_session_locate(sofia_private->uuid))) {
|
||||||
private_object_t *tech_pvt = switch_core_session_get_private(session);
|
|
||||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||||
|
int end = 0;
|
||||||
|
|
||||||
|
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_INBOUND && !switch_channel_test_flag(channel, CF_ANSWERED)) {
|
||||||
|
private_object_t *tech_pvt = switch_core_session_get_private(session);
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "detaching session %s\n", sofia_private->uuid);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "detaching session %s\n", sofia_private->uuid);
|
||||||
set_call_id(tech_pvt, sip);
|
|
||||||
|
|
||||||
if (!zstr(tech_pvt->call_id)) {
|
if (!zstr(tech_pvt->call_id)) {
|
||||||
tech_pvt->sofia_private = NULL;
|
tech_pvt->sofia_private = NULL;
|
||||||
@ -1729,13 +1731,21 @@ void sofia_event_callback(nua_event_t event,
|
|||||||
switch_mutex_lock(profile->flag_mutex);
|
switch_mutex_lock(profile->flag_mutex);
|
||||||
switch_core_hash_insert(profile->chat_hash, tech_pvt->call_id, strdup(switch_core_session_get_uuid(session)));
|
switch_core_hash_insert(profile->chat_hash, tech_pvt->call_id, strdup(switch_core_session_get_uuid(session)));
|
||||||
switch_mutex_unlock(profile->flag_mutex);
|
switch_mutex_unlock(profile->flag_mutex);
|
||||||
switch_core_session_rwunlock(session);
|
|
||||||
} else {
|
} else {
|
||||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
end++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
switch_core_session_rwunlock(session);
|
||||||
|
|
||||||
|
if (end) {
|
||||||
goto end;
|
goto end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case nua_i_invite:
|
case nua_i_invite:
|
||||||
case nua_i_register:
|
case nua_i_register:
|
||||||
case nua_i_options:
|
case nua_i_options:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user