diff --git a/src/mod/applications/mod_limit/mod_limit.c b/src/mod/applications/mod_limit/mod_limit.c index ea7ce73556..d3dc200e60 100644 --- a/src/mod/applications/mod_limit/mod_limit.c +++ b/src/mod/applications/mod_limit/mod_limit.c @@ -616,7 +616,7 @@ SWITCH_STANDARD_APP(limit_function) cbt.buf = buf; cbt.len = sizeof(buf); - sql = switch_mprintf("select count(hostname) from limit_data where realm='%q' and id='%q'", realm, id); + sql = switch_mprintf("select count(hostname) from limit_data where realm='%q' and id like '%q'", realm, id); limit_execute_sql_callback(NULL, sql, sql2str_callback, &cbt); got = atoi(buf);