提交 ddd7fa3c authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-8975 #resolve [DTMF variables not functioning]

上级 72e34621
...@@ -42,6 +42,7 @@ SWITCH_BEGIN_EXTERN_C ...@@ -42,6 +42,7 @@ SWITCH_BEGIN_EXTERN_C
#define SWITCH_NO_CRYPTO_TAG -1 #define SWITCH_NO_CRYPTO_TAG -1
typedef enum { typedef enum {
DTMF_AUTO,
DTMF_2833, DTMF_2833,
DTMF_INFO, DTMF_INFO,
DTMF_NONE DTMF_NONE
......
...@@ -4504,6 +4504,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s ...@@ -4504,6 +4504,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
if (best_te) { if (best_te) {
smh->mparams->te_rate = best_te_rate; smh->mparams->te_rate = best_te_rate;
if (smh->mparams->dtmf_type == DTMF_AUTO) {
if (sdp_type == SDP_TYPE_REQUEST) { if (sdp_type == SDP_TYPE_REQUEST) {
smh->mparams->te = smh->mparams->recv_te = (switch_payload_t) best_te; smh->mparams->te = smh->mparams->recv_te = (switch_payload_t) best_te;
switch_channel_set_variable(session->channel, "dtmf_type", "rfc2833"); switch_channel_set_variable(session->channel, "dtmf_type", "rfc2833");
...@@ -4513,6 +4514,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s ...@@ -4513,6 +4514,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
switch_channel_set_variable(session->channel, "dtmf_type", "rfc2833"); switch_channel_set_variable(session->channel, "dtmf_type", "rfc2833");
smh->mparams->dtmf_type = DTMF_2833; smh->mparams->dtmf_type = DTMF_2833;
} }
}
if (a_engine->rtp_session) { if (a_engine->rtp_session) {
switch_rtp_set_telephony_event(a_engine->rtp_session, smh->mparams->te); switch_rtp_set_telephony_event(a_engine->rtp_session, smh->mparams->te);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论