mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
[Core] Implement NDLB_line_flash_16 channel variable. Set to true to enable deprecated 0-16 back (rfc4733)
This commit is contained in:
parent
013894ac33
commit
f0e42fe8db
@ -10053,14 +10053,16 @@ static void generate_m(switch_core_session_t *session, char *buf, size_t buflen,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
uint8_t NDLB_line_flash_16 = switch_channel_var_true(session->channel, "NDLB_line_flash_16");
|
||||||
|
|
||||||
for (i = 0; i < smh->num_rates; i++) {
|
for (i = 0; i < smh->num_rates; i++) {
|
||||||
if (switch_channel_test_flag(session->channel, CF_AVPF)) {
|
if (switch_channel_test_flag(session->channel, CF_AVPF)) {
|
||||||
switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=rtpmap:%d telephone-event/%d\r\n",
|
switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=rtpmap:%d telephone-event/%d\r\n",
|
||||||
smh->dtmf_ianacodes[i], smh->rates[i]);
|
smh->dtmf_ianacodes[i], smh->rates[i]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=rtpmap:%d telephone-event/%d\r\na=fmtp:%d 0-15\r\n",
|
switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=rtpmap:%d telephone-event/%d\r\na=fmtp:%d 0-%d\r\n",
|
||||||
smh->dtmf_ianacodes[i], smh->rates[i], smh->dtmf_ianacodes[i]);
|
smh->dtmf_ianacodes[i], smh->rates[i], smh->dtmf_ianacodes[i], (NDLB_line_flash_16 ? 16 : 15));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10777,8 +10779,8 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
|
|||||||
switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=rtpmap:%d telephone-event/%d\r\n",
|
switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=rtpmap:%d telephone-event/%d\r\n",
|
||||||
smh->mparams->te, smh->mparams->te_rate);
|
smh->mparams->te, smh->mparams->te_rate);
|
||||||
} else {
|
} else {
|
||||||
switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=rtpmap:%d telephone-event/%d\r\na=fmtp:%d 0-15\r\n",
|
switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=rtpmap:%d telephone-event/%d\r\na=fmtp:%d 0-%d\r\n",
|
||||||
smh->mparams->te, smh->mparams->te_rate, smh->mparams->te);
|
smh->mparams->te, smh->mparams->te_rate, smh->mparams->te, (switch_channel_var_true(session->channel, "NDLB_line_flash_16") ? 16 : 15));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user