]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
wait on info dtmf parsing w and W (additional part of previous patch)
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 29 Aug 2011 18:28:02 +0000 (13:28 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 29 Aug 2011 18:28:02 +0000 (13:28 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.c

index 930a4a6f3f3ee800c7f161120e441ff00ab5730f..1f62929dbd298d03147f7cd6ecae5bb1e64df012 100644 (file)
@@ -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: