]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6685 mod_skinny: fix behavior of ring if other SLA extension is active
authorNathan Neulinger <nneul@neulinger.org>
Wed, 23 Jul 2014 18:31:06 +0000 (13:31 -0500)
committerNathan Neulinger <nneul@neulinger.org>
Wed, 23 Jul 2014 18:31:06 +0000 (13:31 -0500)
src/mod/endpoints/mod_skinny/mod_skinny.c

index ab319b2d1b0b2ed5aa7578bec84dc41a03c6c63b..a6c50d28169b3f6f4dfb705b9c235f16550239f0 100644 (file)
@@ -528,8 +528,9 @@ uint32_t skinny_line_count_active(listener_t *listener)
        if ((sql = switch_mprintf(
                        "SELECT call_state FROM skinny_active_lines "
                        "WHERE device_name='%s' AND device_instance=%d "
-                       "AND call_state != 2",
-                       listener->device_name, listener->device_instance
+                       "AND call_state not in (%d,%d,%d)",
+                       listener->device_name, listener->device_instance, 
+                       SKINNY_ON_HOOK, SKINNY_IN_USE_REMOTELY, SKINNY_HOLD
                        ))) {
 
                skinny_execute_sql_callback(listener->profile, listener->profile->sql_mutex, sql, skinny_line_count_active_callback, &helper);