[Asterisk-code-review] res pjsip sdp rtp: Enable Opus to be negotiated via SIP/SDP. (asterisk[master])
Matt Jordan
asteriskteam at digium.com
Wed Nov 11 08:08:55 CST 2015
Matt Jordan has submitted this change and it was merged.
Change subject: res_pjsip_sdp_rtp: Enable Opus to be negotiated via SIP/SDP.
......................................................................
res_pjsip_sdp_rtp: Enable Opus to be negotiated via SIP/SDP.
In SIP/SDP, Opus has two channels always (see RFC 7587 section 7). The actual
amount of channels is negotiated in-band. Therefore now, the Opus codec and its
attribute rtpmap are registered with two channels.
ASTERISK-24779 #close
Reported by: PowerPBX
Tested by: Alexander Traud
patches:
asterisk-24779.patch submitted by Sean Bright (license #5060)
Change-Id: Ic7ac13cafa1d3450b4fa4987350924b42cbb657b
---
M res/res_pjsip_sdp_rtp.c
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
Anonymous Coward #1000019: Verified
Matt Jordan: Looks good to me, approved
Joshua Colp: Looks good to me, but someone else must approve
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index a66aebb..3828f7e 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -396,8 +396,11 @@
rtpmap.pt = media->desc.fmt[media->desc.fmt_count - 1];
rtpmap.clock_rate = ast_rtp_lookup_sample_rate2(asterisk_format, format, code);
pj_strdup2(pool, &rtpmap.enc_name, ast_rtp_lookup_mime_subtype2(asterisk_format, format, code, options));
- rtpmap.param.slen = 0;
- rtpmap.param.ptr = NULL;
+ if (!pj_stricmp2(&rtpmap.enc_name, "opus")) {
+ pj_cstr(&rtpmap.param, "2");
+ } else {
+ pj_cstr(&rtpmap.param, NULL);
+ }
pjmedia_sdp_rtpmap_to_attr(pool, &rtpmap, &attr);
--
To view, visit https://gerrit.asterisk.org/1574
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7ac13cafa1d3450b4fa4987350924b42cbb657b
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
More information about the asterisk-code-review
mailing list