diff options
author | Alexander Traud <pabstraud@compuserve.com> | 2017-01-04 12:50:11 +0100 |
---|---|---|
committer | Alexander Traud <pabstraud@compuserve.com> | 2017-01-04 06:02:11 -0600 |
commit | 0b89c7c12ef38504c5ec409943086efe8022b4f9 (patch) | |
tree | 0b6a2d3709bf9c09e186d1b753ab0a47320003dc /channels/chan_sip.c | |
parent | 4ecc3de00e4105d1f2a2cd1344023988a61268ae (diff) |
chan_sip: Remember SDP negotiation on SIP_CODEC_INBOUND.
After a SIP_CODEC_INBOUND in the dialplan, do not continue with cached formats
but remember the joint format. Cached formats contain default parameters,
often create an empty fmtp line. However, a joint format might have passed
format_get_joint(.) in a res_format_attr_* module (like Opus Codec) and
contain the resulting format parameters from a SDP negotiation.
ASTERISK-26691 #close
Change-Id: I35712d98a793d4c3efdd156cec57deab9014b1dc
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 33ec7f06d..7e11b2420 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -7376,6 +7376,12 @@ static void try_suggested_sip_codec(struct sip_pvt *p) ao2_ref(fmt, -1); } + + /* The original joint formats may have contained negotiated parameters (fmtp) + * like the Opus Codec or iLBC 20. The cached formats contain the default + * parameters, which could be different than the negotiated (joint) result. */ + ast_format_cap_replace_from_cap(p->jointcaps, original_jointcaps, AST_MEDIA_TYPE_UNKNOWN); + ao2_ref(original_jointcaps, -1); return; } |