]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8114 #resolve [Opus and telephone event payload types collide on REFER]
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 15 Sep 2015 00:44:48 +0000 (19:44 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 15 Sep 2015 00:44:48 +0000 (19:44 -0500)
src/switch_core_media.c

index 5d36bdd0a3c1ac851d367ea7bff3df7c932492e2..964252ebacadd8786b5d6c6c2aff5a265bee42e9 100644 (file)
@@ -7359,6 +7359,15 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
                                        smh->dtmf_ianacodes[i] = smh->mparams->te;
                                        smh->cng_ianacodes[i] = smh->mparams->cng_pt;
                                } else {
+                                       int j = 0;
+
+                                       for (j = 0; j < smh->mparams->num_codecs; j++) {
+                                               if (smh->ianacodes[i] == smh->payload_space) {
+                                                       smh->payload_space++;
+                                                       break;
+                                               }
+                                       }
+
                                        smh->dtmf_ianacodes[i] = (switch_payload_t)smh->payload_space++;
                                        smh->cng_ianacodes[i] = (switch_payload_t)smh->payload_space++;
                                }