[asterisk-commits] chan sip: Remember SDP negotiation on SIP CODEC INBOUND. (asterisk[14])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jan 9 08:45:50 CST 2017
Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/4694 )
Change subject: chan_sip: Remember SDP negotiation on SIP_CODEC_INBOUND.
......................................................................
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
---
M channels/chan_sip.c
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
Joshua Colp: Looks good to me, approved; Verified
Corey Farrell: Looks good to me, but someone else must approve
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 33ec7f0..7e11b24 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -7376,6 +7376,12 @@
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;
}
--
To view, visit https://gerrit.asterisk.org/4694
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I35712d98a793d4c3efdd156cec57deab9014b1dc
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
More information about the asterisk-commits
mailing list