mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-08 08:43:23 +00:00
only use the wait_for_aleg_ack when the call is unanswered
This commit is contained in:
parent
e74d4ac6e6
commit
3359f04a3f
@ -6419,19 +6419,22 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
|||||||
break;
|
break;
|
||||||
case nua_callstate_completing:
|
case nua_callstate_completing:
|
||||||
{
|
{
|
||||||
const char *wait_for_ack = switch_channel_get_variable(channel, "sip_wait_for_aleg_ack");
|
|
||||||
int send_ack = 1;
|
int send_ack = 1;
|
||||||
|
|
||||||
if (switch_true(wait_for_ack)) {
|
if (!switch_channel_test_flag(channel, CF_ANSWERED)) {
|
||||||
switch_core_session_t *other_session;
|
const char *wait_for_ack = switch_channel_get_variable(channel, "sip_wait_for_aleg_ack");
|
||||||
|
|
||||||
if (switch_core_session_get_partner(session, &other_session) == SWITCH_STATUS_SUCCESS) {
|
if (switch_true(wait_for_ack)) {
|
||||||
if (switch_core_session_compare(session, other_session)) {
|
switch_core_session_t *other_session;
|
||||||
private_object_t *other_tech_pvt = switch_core_session_get_private(other_session);
|
|
||||||
sofia_set_flag(other_tech_pvt, TFLAG_PASS_ACK);
|
if (switch_core_session_get_partner(session, &other_session) == SWITCH_STATUS_SUCCESS) {
|
||||||
|
if (switch_core_session_compare(session, other_session)) {
|
||||||
|
private_object_t *other_tech_pvt = switch_core_session_get_private(other_session);
|
||||||
|
sofia_set_flag(other_tech_pvt, TFLAG_PASS_ACK);
|
||||||
send_ack = 0;
|
send_ack = 0;
|
||||||
|
}
|
||||||
|
switch_core_session_rwunlock(other_session);
|
||||||
}
|
}
|
||||||
switch_core_session_rwunlock(other_session);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user