From 134871872c458754c11a7e7c399e75e9840d29ed Mon Sep 17 00:00:00 2001
From: Anthony Minessale <anthm@freeswitch.org>
Date: Tue, 2 Jul 2013 12:16:54 -0500
Subject: [PATCH] fix codec negotiation issue with the same codec at multiple
 rates

---
 src/switch_core_media.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/switch_core_media.c b/src/switch_core_media.c
index 9270b0b729..4b926ed810 100644
--- a/src/switch_core_media.c
+++ b/src/switch_core_media.c
@@ -2788,7 +2788,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
 					if ((zstr(map->rm_encoding) || (smh->mparams->ndlb & SM_NDLB_ALLOW_BAD_IANANAME)) && map->rm_pt < 96) {
 						match = (map->rm_pt == imp->ianacode) ? 1 : 0;
 					} else {
-						match = strcasecmp(rm_encoding, imp->iananame) ? 0 : 1;
+						match = (!strcasecmp(rm_encoding, imp->iananame) && (map->rm_rate == codec_rate)) ? 1 : 0
 					}
 
 					if (match && bit_rate && map_bit_rate && map_bit_rate != bit_rate && strcasecmp(map->rm_encoding, "ilbc") &&