From 69ec4aadab36d96a2aee439c33b1d802567f7672 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Thu, 8 Nov 2018 12:45:45 +0100 Subject: [PATCH] FS-11508: [mod_sofia] Make max-registrations-per-extension use extension instead of username --- src/mod/endpoints/mod_sofia/sofia_reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index 842e6c3bf7..601824c334 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -3075,7 +3075,7 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, switch_assert(call_id); sql = switch_mprintf("select count(sip_user) from sip_registrations where sip_user='%q' AND call_id <> '%q' AND sip_host='%q'", - username, call_id, domain_name); + sip->sip_to->a_url->url_user, call_id, domain_name); switch_assert(sql != NULL); sofia_glue_execute_sql_callback(profile, NULL, sql, sofia_reg_regcount_callback, &count); free(sql);