diff options
author | Mark Michelson <mmichelson@digium.com> | 2012-09-05 16:24:19 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2012-09-05 16:24:19 +0000 |
commit | be500bbafbb5c116997c5746a6156f32b7f5bd85 (patch) | |
tree | 6ac590966e72500c58c16a5f8edb7c4e950ff383 /res/res_rtp_asterisk.c | |
parent | a7391a37c119c408c3c6307d412169242257b711 (diff) |
Re-fix sending unnegotiated payloads during a P2P RTP bridge.
The previous fix still would look in the static_RTP_PT table, which
is inappropriate since we specifically want to find a codec that has
been negotiated.
(closes issue ASTERISK-20296)
reported by NITESH BANSAL
Patches:
codec_negotiation.patch Uploaded by NITESH BANSAL (License #6418)
........
Merged revisions 372311 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_rtp_asterisk.c')
-rw-r--r-- | res/res_rtp_asterisk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index 0bcd16511..9f3b8b83d 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -2790,8 +2790,9 @@ static int bridge_p2p_rtp_write(struct ast_rtp_instance *instance, unsigned int } /* If the payload coming in is not one of the negotiated ones then send it to the core, this will cause formats to change and the bridge to break */ - if ((ast_rtp_codecs_payload_code(ast_rtp_instance_get_codecs(instance1), 0, NULL, bridged_payload) == -1) && - !ast_rtp_codecs_get_payload_format(ast_rtp_instance_get_codecs(instance1), bridged_payload)) { + if (ast_rtp_codecs_find_payload_code(ast_rtp_instance_get_codecs(instance1),bridged_payload) == -1) + { + ast_debug(1, "Unsupported payload type received \n"); return -1; } |