|
|
|
@ -123,7 +123,7 @@ static int call_timer_delete_monologues(struct call *c) {
|
|
|
|
|
|
|
|
|
|
|
|
void call_make_own_foreign(struct call *c, bool foreign) {
|
|
|
|
void call_make_own_foreign(struct call *c, bool foreign) {
|
|
|
|
statistics_update_foreignown_dec(c);
|
|
|
|
statistics_update_foreignown_dec(c);
|
|
|
|
c->foreign_call = foreign ? 1 : 0;
|
|
|
|
bf_set_clear(&c->call_flags, CALL_FLAG_FOREIGN, foreign);
|
|
|
|
statistics_update_foreignown_inc(c);
|
|
|
|
statistics_update_foreignown_inc(c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -180,7 +180,7 @@ static void call_timer_iterator(struct call *c, struct iterator_helper *hlp) {
|
|
|
|
goto out;
|
|
|
|
goto out;
|
|
|
|
|
|
|
|
|
|
|
|
// ignore media timeout if call was recently taken over
|
|
|
|
// ignore media timeout if call was recently taken over
|
|
|
|
if (c->foreign_media && rtpe_now.tv_sec - c->last_signal <= rtpe_config.timeout)
|
|
|
|
if (CALL_ISSET(c, FOREIGN_MEDIA) && rtpe_now.tv_sec - c->last_signal <= rtpe_config.timeout)
|
|
|
|
goto out;
|
|
|
|
goto out;
|
|
|
|
|
|
|
|
|
|
|
|
for (it = c->streams.head; it; it = it->next) {
|
|
|
|
for (it = c->streams.head; it; it = it->next) {
|
|
|
|
@ -898,7 +898,7 @@ struct packet_stream *__packet_stream_new(struct call *call) {
|
|
|
|
recording_init_stream(stream);
|
|
|
|
recording_init_stream(stream);
|
|
|
|
stream->send_timer = send_timer_new(stream);
|
|
|
|
stream->send_timer = send_timer_new(stream);
|
|
|
|
|
|
|
|
|
|
|
|
if (rtpe_config.jb_length && !call->disable_jb)
|
|
|
|
if (rtpe_config.jb_length && !CALL_ISSET(call, DISABLE_JB))
|
|
|
|
stream->jb = jitter_buffer_new(call);
|
|
|
|
stream->jb = jitter_buffer_new(call);
|
|
|
|
|
|
|
|
|
|
|
|
return stream;
|
|
|
|
return stream;
|
|
|
|
@ -2579,14 +2579,14 @@ static void __call_monologue_init_from_flags(struct call_monologue *ml, struct s
|
|
|
|
// reset offer ipv4/ipv6/mixed media stats
|
|
|
|
// reset offer ipv4/ipv6/mixed media stats
|
|
|
|
if (flags && flags->opmode == OP_OFFER) {
|
|
|
|
if (flags && flags->opmode == OP_OFFER) {
|
|
|
|
statistics_update_ip46_inc_dec(call, CMC_DECREMENT);
|
|
|
|
statistics_update_ip46_inc_dec(call, CMC_DECREMENT);
|
|
|
|
call->is_ipv4_media_offer = 0;
|
|
|
|
CALL_CLEAR(call, IPV4_OFFER);
|
|
|
|
call->is_ipv6_media_offer = 0;
|
|
|
|
CALL_CLEAR(call, IPV6_OFFER);
|
|
|
|
|
|
|
|
|
|
|
|
// reset answer ipv4/ipv6/mixed media stats
|
|
|
|
// reset answer ipv4/ipv6/mixed media stats
|
|
|
|
} else if (flags && flags->opmode == OP_ANSWER) {
|
|
|
|
} else if (flags && flags->opmode == OP_ANSWER) {
|
|
|
|
statistics_update_ip46_inc_dec(call, CMC_DECREMENT);
|
|
|
|
statistics_update_ip46_inc_dec(call, CMC_DECREMENT);
|
|
|
|
call->is_ipv4_media_answer = 0;
|
|
|
|
CALL_CLEAR(call, IPV4_ANSWER);
|
|
|
|
call->is_ipv6_media_answer = 0;
|
|
|
|
CALL_CLEAR(call, IPV6_ANSWER);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
__tos_change(call, flags);
|
|
|
|
__tos_change(call, flags);
|
|
|
|
@ -2859,15 +2859,15 @@ int monologue_offer_answer(struct call_monologue *monologues[2], GQueue *streams
|
|
|
|
|
|
|
|
|
|
|
|
if (media->desired_family->af == AF_INET) {
|
|
|
|
if (media->desired_family->af == AF_INET) {
|
|
|
|
if (flags && flags->opmode == OP_OFFER) {
|
|
|
|
if (flags && flags->opmode == OP_OFFER) {
|
|
|
|
media->call->is_ipv4_media_offer = 1;
|
|
|
|
CALL_SET(media->call, IPV4_OFFER);
|
|
|
|
} else if (flags && flags->opmode == OP_ANSWER) {
|
|
|
|
} else if (flags && flags->opmode == OP_ANSWER) {
|
|
|
|
media->call->is_ipv4_media_answer = 1;
|
|
|
|
CALL_SET(media->call, IPV4_ANSWER);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (media->desired_family->af == AF_INET6) {
|
|
|
|
} else if (media->desired_family->af == AF_INET6) {
|
|
|
|
if (flags && flags->opmode == OP_OFFER) {
|
|
|
|
if (flags && flags->opmode == OP_OFFER) {
|
|
|
|
media->call->is_ipv6_media_offer = 1;
|
|
|
|
CALL_SET(media->call, IPV6_OFFER);
|
|
|
|
} else if (flags && flags->opmode == OP_ANSWER) {
|
|
|
|
} else if (flags && flags->opmode == OP_ANSWER) {
|
|
|
|
media->call->is_ipv6_media_answer = 1;
|
|
|
|
CALL_SET(media->call, IPV6_ANSWER);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -2917,7 +2917,7 @@ int monologue_offer_answer(struct call_monologue *monologues[2], GQueue *streams
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (flags && flags->disable_jb && media->call)
|
|
|
|
if (flags && flags->disable_jb && media->call)
|
|
|
|
media->call->disable_jb=1;
|
|
|
|
CALL_SET(media->call, DISABLE_JB);
|
|
|
|
|
|
|
|
|
|
|
|
__num_media_streams(media, num_ports_this);
|
|
|
|
__num_media_streams(media, num_ports_this);
|
|
|
|
__assign_stream_fds(media, &em->intf_sfds);
|
|
|
|
__assign_stream_fds(media, &em->intf_sfds);
|
|
|
|
@ -4060,7 +4060,7 @@ restart:
|
|
|
|
g_hash_table_insert(rtpe_callhash, &c->callid, obj_get(c));
|
|
|
|
g_hash_table_insert(rtpe_callhash, &c->callid, obj_get(c));
|
|
|
|
RTPE_GAUGE_INC(total_sessions);
|
|
|
|
RTPE_GAUGE_INC(total_sessions);
|
|
|
|
|
|
|
|
|
|
|
|
c->foreign_call = foreign ? 1 : 0;
|
|
|
|
bf_set_clear(&c->call_flags, CALL_FLAG_FOREIGN, foreign);
|
|
|
|
|
|
|
|
|
|
|
|
statistics_update_foreignown_inc(c);
|
|
|
|
statistics_update_foreignown_inc(c);
|
|
|
|
|
|
|
|
|
|
|
|
|