From cf786b184dccf641f3af332acb592c1a4d3d3381 Mon Sep 17 00:00:00 2001 From: Nathan Neulinger Date: Wed, 23 Jul 2014 13:31:06 -0500 Subject: [PATCH] FS-6685 mod_skinny: fix behavior of ring if other SLA extension is active --- src/mod/endpoints/mod_skinny/mod_skinny.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_skinny/mod_skinny.c b/src/mod/endpoints/mod_skinny/mod_skinny.c index ab319b2d1b..a6c50d2816 100644 --- a/src/mod/endpoints/mod_skinny/mod_skinny.c +++ b/src/mod/endpoints/mod_skinny/mod_skinny.c @@ -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);