summaryrefslogtreecommitdiff
path: root/res/res_pjsip_sdp_rtp.c
diff options
context:
space:
mode:
authorMatt Jordan <mjordan@digium.com>2015-11-11 08:08:55 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-11-11 08:08:55 -0600
commitd77bba432688dbac646dad73c2af95f1af83901a (patch)
tree13fec34ad4e8ec6175a30d14b503bebac42b0eae /res/res_pjsip_sdp_rtp.c
parent7987bf54c67c35c6776d4541b80f2a5ebdf3f1a5 (diff)
parent9d6e9173491554c561a0cb13045bb17e5ced9cae (diff)
Merge "res_pjsip_sdp_rtp: Enable Opus to be negotiated via SIP/SDP."
Diffstat (limited to 'res/res_pjsip_sdp_rtp.c')
-rw-r--r--res/res_pjsip_sdp_rtp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index 7c1e604e5..1f2f21d73 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -396,8 +396,11 @@ static pjmedia_sdp_attr* generate_rtpmap_attr(struct ast_sip_session *session, p
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);