From: Chris Rienzo Date: Tue, 7 Jan 2014 15:10:50 +0000 (-0500) Subject: mod_rayo CPA dtmf detection added X-Git-Tag: v1.4.2~1^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b2799284b1c7dc1cec3ca33e780497a344bec4f;p=thirdparty%2Ffreeswitch.git mod_rayo CPA dtmf detection added --- diff --git a/conf/rayo/autoload_configs/rayo.conf.xml b/conf/rayo/autoload_configs/rayo.conf.xml index 52a1a35977..50af0f7ecd 100644 --- a/conf/rayo/autoload_configs/rayo.conf.xml +++ b/conf/rayo/autoload_configs/rayo.conf.xml @@ -26,6 +26,13 @@ + + + + + + + diff --git a/src/mod/event_handlers/mod_rayo/conf/autoload_configs/rayo.conf.xml b/src/mod/event_handlers/mod_rayo/conf/autoload_configs/rayo.conf.xml index 52a1a35977..50af0f7ecd 100644 --- a/src/mod/event_handlers/mod_rayo/conf/autoload_configs/rayo.conf.xml +++ b/src/mod/event_handlers/mod_rayo/conf/autoload_configs/rayo.conf.xml @@ -26,6 +26,13 @@ + + + + + + + diff --git a/src/mod/event_handlers/mod_rayo/rayo_cpa_detector.c b/src/mod/event_handlers/mod_rayo/rayo_cpa_detector.c index 27ce9a13be..ed1d87d152 100644 --- a/src/mod/event_handlers/mod_rayo/rayo_cpa_detector.c +++ b/src/mod/event_handlers/mod_rayo/rayo_cpa_detector.c @@ -79,8 +79,13 @@ struct rayo_cpa_detector_state { int rayo_cpa_detector_start(const char *call_uuid, const char *signal_ns, const char **error_detail) { struct rayo_cpa_detector *detector = switch_core_hash_find(globals.detectors, signal_ns); + switch_core_session_t *session; if (detector) { - switch_core_session_t *session = switch_core_session_locate(call_uuid); + if (zstr(detector->start_app)) { + /* nothing to do */ + return 1; + } + session = switch_core_session_locate(call_uuid); if (session) { struct rayo_cpa_detector_state *detector_state = switch_channel_get_private(switch_core_session_get_channel(session), detector->uuid); if (detector_state) { @@ -114,8 +119,13 @@ int rayo_cpa_detector_start(const char *call_uuid, const char *signal_ns, const void rayo_cpa_detector_stop(const char *call_uuid, const char *signal_ns) { struct rayo_cpa_detector *detector = switch_core_hash_find(globals.detectors, signal_ns); + switch_core_session_t *session; if (detector) { - switch_core_session_t *session = switch_core_session_locate(call_uuid); + if (zstr(detector->stop_app)) { + /* nothing to do */ + return; + } + session = switch_core_session_locate(call_uuid); if (session) { struct rayo_cpa_detector_state *detector_state = switch_channel_get_private(switch_core_session_get_channel(session), detector->uuid); if (detector_state) {