]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
allow specific removal of media bugs by function name
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 22 Mar 2013 16:20:34 +0000 (11:20 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 22 Mar 2013 16:20:34 +0000 (11:20 -0500)
src/mod/applications/mod_dptools/mod_dptools.c

index bd1a82fc80adbba07ff1c0930f9e8e2999bfa4fc..c2052bede6415844f15e10ac9e79a4dfa9d66d64 100755 (executable)
@@ -940,7 +940,13 @@ SWITCH_STANDARD_APP(ring_ready_function)
 
 SWITCH_STANDARD_APP(remove_bugs_function)
 {
-       switch_core_media_bug_remove_all(session);
+       const char *function = NULL;
+
+       if (!zstr((char *)data)) {
+               function = data;
+       }
+
+       switch_core_media_bug_remove_all_function(session, function);
 }
 
 SWITCH_STANDARD_APP(break_function)
@@ -5605,7 +5611,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load)
        SWITCH_ADD_APP(app_interface, "unset", "Unset a channel variable", UNSET_LONG_DESC, unset_function, "<varname>",
                                   SAF_SUPPORT_NOMEDIA | SAF_ROUTING_EXEC | SAF_ZOMBIE_EXEC);
        SWITCH_ADD_APP(app_interface, "ring_ready", "Indicate Ring_Ready", "Indicate Ring_Ready on a channel.", ring_ready_function, "", SAF_SUPPORT_NOMEDIA);
-       SWITCH_ADD_APP(app_interface, "remove_bugs", "Remove media bugs", "Remove all media bugs from a channel.", remove_bugs_function, "", SAF_NONE);
+       SWITCH_ADD_APP(app_interface, "remove_bugs", "Remove media bugs", "Remove all media bugs from a channel.", remove_bugs_function, "[<function>]", SAF_NONE);
        SWITCH_ADD_APP(app_interface, "break", "Break", "Set the break flag.", break_function, "", SAF_SUPPORT_NOMEDIA);
        SWITCH_ADD_APP(app_interface, "detect_speech", "Detect speech", "Detect speech on a channel.", detect_speech_function, DETECT_SPEECH_SYNTAX, SAF_NONE);
        SWITCH_ADD_APP(app_interface, "play_and_detect_speech", "Play and do speech recognition", "Play and do speech recognition", play_and_detect_speech_function, PLAY_AND_DETECT_SPEECH_SYNTAX, SAF_NONE);