res_pjsip: Allow configuration of endpoint identifier query order
[asterisk/asterisk.git] / res / res_pjsip_endpoint_identifier_user.c
index a5c9411..a60057e 100644 (file)
@@ -109,7 +109,6 @@ done:
 }
 
 static struct ast_sip_endpoint_identifier username_identifier = {
-       .name = "username",
        .identify_endpoint = username_identify,
 };
 
@@ -117,7 +116,7 @@ static int load_module(void)
 {
        CHECK_PJSIP_MODULE_LOADED();
 
-       ast_sip_register_endpoint_identifier(&username_identifier);
+       ast_sip_register_endpoint_identifier_by_name(&username_identifier, "username");
        return AST_MODULE_LOAD_SUCCESS;
 }