diff --git a/daemon/call.c b/daemon/call.c index 977528346..427a11ac5 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2677,6 +2677,8 @@ static void __call_monologue_init_from_flags(struct call_monologue *ml, struct c ml->sdp_session_bandwidth.rs = flags->session_bandwidth.rs; if (flags->session_bandwidth.ct >= 0) ml->sdp_session_bandwidth.ct = flags->session_bandwidth.ct; + if (flags->session_bandwidth.tias >= 0) + ml->sdp_session_bandwidth.tias = flags->session_bandwidth.tias; } // reset offer ipv4/ipv6/mixed media stats diff --git a/daemon/sdp.c b/daemon/sdp.c index fc29dd8f9..50463b3b1 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -1372,6 +1372,9 @@ new_session: else if (!memcmp(value, "RS:", 3)) { *(media ? &media->bandwidth.rs : &session->bandwidth.rs) = strtol((value + 3), NULL, 10); } + else if (!memcmp(value, "TIAS:", 5)) { + *(media ? &media->bandwidth.tias : &session->bandwidth.tias) = strtol((value + 5), NULL, 10); + } /* CT has only session level */ else if (!memcmp(value, "CT:", 3)) { session->bandwidth.ct = strtol((value + 3), NULL, 10); @@ -3645,6 +3648,8 @@ static void sdp_out_add_bandwidth(GString *out, struct call_monologue *monologue g_string_append_printf(out, "b=RR:%ld\r\n", ms->media->sdp_media_bandwidth.rr); if (ms->media->sdp_media_bandwidth.rs >= 0) g_string_append_printf(out, "b=RS:%ld\r\n", ms->media->sdp_media_bandwidth.rs); + if (ms->media->sdp_media_bandwidth.tias >= 0) + g_string_append_printf(out, "b=TIAS:%ld\r\n", ms->media->sdp_media_bandwidth.tias); } else { /* sdp bandwidth per session/media level @@ -3660,6 +3665,8 @@ static void sdp_out_add_bandwidth(GString *out, struct call_monologue *monologue g_string_append_printf(out, "b=RS:%ld\r\n", ms->monologue->sdp_session_bandwidth.rs); if (ms->monologue->sdp_session_bandwidth.ct >= 0) g_string_append_printf(out, "b=CT:%ld\r\n", ms->monologue->sdp_session_bandwidth.ct); + if (ms->monologue->sdp_session_bandwidth.tias >= 0) + g_string_append_printf(out, "b=TIAS:%ld\r\n", ms->monologue->sdp_session_bandwidth.tias); } } diff --git a/include/call.h b/include/call.h index dda420798..e189648da 100644 --- a/include/call.h +++ b/include/call.h @@ -85,6 +85,7 @@ enum message_type { union_var.rr = value; \ union_var.rs = value; \ union_var.ct = value; \ + union_var.tias = value; \ } while(0) enum call_media_counted { @@ -326,7 +327,7 @@ TYPED_GHASHTABLE(subscription_ht, struct call_media, subscription_list, media_di NULL, NULL) struct session_bandwidth { - long as, rr, rs, ct; + long as, rr, rs, ct, tias; }; struct codec_store {