[Asterisk-code-review] chan sip: Remember SDP negotiation on SIP CODEC INBOUND. (asterisk[14])
Corey Farrell
asteriskteam at digium.com
Thu Jan 5 08:46:25 CST 2017
Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/4694 )
Change subject: chan_sip: Remember SDP negotiation on SIP_CODEC_INBOUND.
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
https://gerrit.asterisk.org/#/c/4694/1/channels/chan_sip.c
File channels/chan_sip.c:
Line 7354: fmt = ast_format_cache_get(codec);
Maybe this is the place to deal with your bug? It seems logical to try initializing fmt by retrieving from original_jointcaps, use ast_format_cache_get if that is NULL. This way you would maintain any parameters from the existing format while still adding/removing formats from p->jointcaps if requested by ${SIP_CODEC*}.
Line 7383: ast_format_cap_replace_from_cap(p->jointcaps, original_jointcaps, AST_MEDIA_TYPE_UNKNOWN);
Above the 'for' loop we initialize original_jointcaps to contain the same as p->jointcaps. The loop resets p->jointcaps if it finds any compatible formats.
The effect of your change is the same as never modifying p->jointcaps in the loop. It seems like SIP_CODEC is supposed to be able to exclude a format that was in p->jointcaps - you've made it so that existing format will remain.
--
To view, visit https://gerrit.asterisk.org/4694
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I35712d98a793d4c3efdd156cec57deab9014b1dc
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: 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>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list