tech_pvt->read_frame.buflen = SWITCH_RTP_MAX_BUF_LEN;
switch_mutex_lock(tech_pvt->sofia_mutex);
+
+ sofia_glue_check_dtmf_type(tech_pvt);
+
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s SOFIA INIT\n", switch_channel_get_name(channel));
if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
sofia_glue_tech_absorb_sdp(tech_pvt);
}
+void sofia_glue_check_dtmf_type(private_object_t *tech_pvt)
+{
+ const char *val;
+
+ if ((val = switch_channel_get_variable(tech_pvt->channel, "dtmf_type"))) {
+ if (!strcasecmp(val, "rfc2833")) {
+ tech_pvt->dtmf_type = DTMF_2833;
+ } else if (!strcasecmp(val, "info")) {
+ tech_pvt->dtmf_type = DTMF_INFO;
+ } else if (!strcasecmp(val, "none")) {
+ tech_pvt->dtmf_type = DTMF_NONE;
+ } else {
+ tech_pvt->dtmf_type = tech_pvt->profile->dtmf_type;
+ }
+ }
+}
+
void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, uint32_t port, const char *sr, int force)
{
switch_event_t *map = NULL, *ptmap = NULL;
const char *b_sdp = NULL;
+ sofia_glue_check_dtmf_type(tech_pvt);
if (!tech_pvt->payload_space) {
int i;
tech_pvt->recv_te = tech_pvt->te = profile->te;
}
- tech_pvt->dtmf_type = profile->dtmf_type;
-
if (!sofia_test_pflag(tech_pvt->profile, PFLAG_SUPPRESS_CNG)) {
if (tech_pvt->bcng_pt) {
tech_pvt->cng_pt = tech_pvt->bcng_pt;
flags = (switch_rtp_flag_t) (SWITCH_RTP_FLAG_DATAWAIT);
}
- if ((val = switch_channel_get_variable(tech_pvt->channel, "dtmf_type"))) {
- if (!strcasecmp(val, "rfc2833")) {
- tech_pvt->dtmf_type = DTMF_2833;
- } else if (!strcasecmp(val, "info")) {
- tech_pvt->dtmf_type = DTMF_INFO;
- } else {
- tech_pvt->dtmf_type = tech_pvt->profile->dtmf_type;
- }
- }
-
if (sofia_test_pflag(tech_pvt->profile, PFLAG_PASS_RFC2833)
|| ((val = switch_channel_get_variable(tech_pvt->channel, "pass_rfc2833")) && switch_true(val))) {
sofia_set_flag(tech_pvt, TFLAG_PASS_RFC2833);