From f697e5aa37e0aae56ce7d07ce74080fe809ddf25 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 29 Aug 2011 13:28:02 -0500 Subject: [PATCH] wait on info dtmf parsing w and W (additional part of previous patch) --- src/mod/endpoints/mod_sofia/mod_sofia.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 930a4a6f3f..1f62929dbd 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -1372,10 +1372,16 @@ static switch_status_t sofia_send_dtmf(switch_core_session_t *session, const swi } case DTMF_INFO: { - snprintf(message, sizeof(message), "Signal=%c\r\nDuration=%d\r\n", dtmf->digit, dtmf->duration / 8); - switch_mutex_lock(tech_pvt->sofia_mutex); - nua_info(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("application/dtmf-relay"), SIPTAG_PAYLOAD_STR(message), TAG_END()); - switch_mutex_unlock(tech_pvt->sofia_mutex); + if (dtmf->digit == 'w') { + switch_yield(500000); + } else if (dtmf->digit == 'W') { + switch_yield(1000000); + } else { + snprintf(message, sizeof(message), "Signal=%c\r\nDuration=%d\r\n", dtmf->digit, dtmf->duration / 8); + switch_mutex_lock(tech_pvt->sofia_mutex); + nua_info(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("application/dtmf-relay"), SIPTAG_PAYLOAD_STR(message), TAG_END()); + switch_mutex_unlock(tech_pvt->sofia_mutex); + } } break; case DTMF_NONE: