From: Anthony Minessale Date: Wed, 29 Oct 2014 18:14:55 +0000 (-0500) Subject: translate dtmf directly to b leg in bypass call in verto X-Git-Tag: v1.4.13~1^2~7^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43e6146eced4c332b5e874ba1990246bce9c0505;p=thirdparty%2Ffreeswitch.git translate dtmf directly to b leg in bypass call in verto --- diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c index 0a77f9869f..7fb0039188 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.c +++ b/src/mod/endpoints/mod_verto/mod_verto.c @@ -3042,7 +3042,17 @@ static switch_bool_t verto__info_func(const char *method, cJSON *params, jsock_t if ((dtmf = cJSON_GetObjectCstr(params, "dtmf"))) { verto_pvt_t *tech_pvt = switch_core_session_get_private_class(session, SWITCH_PVT_SECONDARY); char *send = switch_mprintf("~%s", dtmf); - switch_channel_queue_dtmf_string(tech_pvt->channel, send); + + if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MODE)) { + switch_core_session_t *other_session = NULL; + + if (switch_core_session_get_partner(tech_pvt->session, &other_session) == SWITCH_STATUS_SUCCESS) { + switch_core_session_send_dtmf_string(other_session, send); + switch_core_session_rwunlock(other_session); + } + } else { + switch_channel_queue_dtmf_string(tech_pvt->channel, send); + } free(send); cJSON_AddItemToObject(*response, "message", cJSON_CreateString("SENT")); }