mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 07:04:17 +00:00
add sip_liberal_dtmf chanvar and liberal-dtmf profile param to use the maximum methods of DTMF avoiding sticking to the spec which leads to incompatability
This commit is contained in:
1 parent
982b7614b0
commit
bc7cb400c0
4 files changed
+29
-3
No files matched your search
@@ -308,7 +308,8 @@ static void generate_m(private_object_t *tech_pvt, char *buf, size_t buflen,
|
||||
}
|
||||
|
||||
|
||||
if (tech_pvt->dtmf_type == DTMF_2833 && tech_pvt->te > 95) {
|
||||
if ((tech_pvt->dtmf_type == DTMF_2833 || sofia_test_pflag(tech_pvt->profile, PFLAG_LIBERAL_DTMF) || sofia_test_flag(tech_pvt, TFLAG_LIBERAL_DTMF))
|
||||
&& tech_pvt->te > 95) {
|
||||
switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=rtpmap:%d telephone-event/8000\na=fmtp:%d 0-16\n", tech_pvt->te, tech_pvt->te);
|
||||
}
|
||||
|
||||
@@ -510,7 +511,8 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
|
||||
}
|
||||
|
||||
|
||||
if (tech_pvt->dtmf_type == DTMF_2833 && tech_pvt->te > 95) {
|
||||
if ((tech_pvt->dtmf_type == DTMF_2833 || sofia_test_pflag(tech_pvt->profile, PFLAG_LIBERAL_DTMF) || sofia_test_flag(tech_pvt, TFLAG_LIBERAL_DTMF))
|
||||
&& tech_pvt->te > 95) {
|
||||
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=rtpmap:%d telephone-event/8000\na=fmtp:%d 0-16\n", tech_pvt->te, tech_pvt->te);
|
||||
}
|
||||
if (!sofia_test_pflag(tech_pvt->profile, PFLAG_SUPPRESS_CNG) && tech_pvt->cng_pt && use_cng) {
|
||||
@@ -2960,6 +2962,10 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||
sofia_set_flag_locked(tech_pvt, TFLAG_SECURE);
|
||||
}
|
||||
|
||||
if ((var = switch_channel_get_variable(tech_pvt->channel, "sip_liberal_dtmf")) && switch_true(var)) {
|
||||
sofia_set_flag_locked(tech_pvt, TFLAG_LIBERAL_DTMF);
|
||||
}
|
||||
|
||||
if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MODE)) {
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
goto end;
|
||||
|
||||
Reference in new issue
Block a user