[Asterisk-code-review] bridge native rtp.c: Fail native bridge if no framing match. (asterisk[master])
Joshua Colp
asteriskteam at digium.com
Mon Nov 19 09:36:17 CST 2018
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/10625 )
Change subject: bridge_native_rtp.c: Fail native bridge if no framing match.
......................................................................
bridge_native_rtp.c: Fail native bridge if no framing match.
ASTERISK-28110 #close
Change-Id: Ic64b8fc6a140a93fbdb2f97550a40d0ff334e607
---
M bridges/bridge_native_rtp.c
1 file changed, 12 insertions(+), 0 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
George Joseph: Looks good to me, approved
diff --git a/bridges/bridge_native_rtp.c b/bridges/bridge_native_rtp.c
index e07f7fa..602fed8 100644
--- a/bridges/bridge_native_rtp.c
+++ b/bridges/bridge_native_rtp.c
@@ -703,6 +703,18 @@
return 0;
}
+ if (glue0->audio.instance && glue1->audio.instance) {
+ unsigned int framing_inst0, framing_inst1;
+ framing_inst0 = ast_rtp_codecs_get_framing(ast_rtp_instance_get_codecs(glue0->audio.instance));
+ framing_inst1 = ast_rtp_codecs_get_framing(ast_rtp_instance_get_codecs(glue1->audio.instance));
+ if (framing_inst0 != framing_inst1) {
+ /* ptimes are asymmetric on the two call legs so we can't use the native bridge */
+ ast_debug(1, "Asymmetric ptimes on the two call legs (%u != %u). Cannot native bridge in RTP\n",
+ framing_inst0, framing_inst1);
+ return 0;
+ }
+ }
+
read_ptime0 = ast_format_cap_get_format_framing(cap0, ast_channel_rawreadformat(bc0->chan));
read_ptime1 = ast_format_cap_get_format_framing(cap1, ast_channel_rawreadformat(bc1->chan));
write_ptime0 = ast_format_cap_get_format_framing(cap0, ast_channel_rawwriteformat(bc0->chan));
--
To view, visit https://gerrit.asterisk.org/10625
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic64b8fc6a140a93fbdb2f97550a40d0ff334e607
Gerrit-Change-Number: 10625
Gerrit-PatchSet: 1
Gerrit-Owner: Robert Cripps <rcripps at voxbone.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181119/3eff25af/attachment.html>
More information about the asterisk-code-review
mailing list