diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c index c214508..4860fbe 100644 --- a/res/res_pjsip/pjsip_configuration.c +++ b/res/res_pjsip/pjsip_configuration.c @@ -1739,7 +1739,11 @@ static void load_all_endpoints(void) { struct ao2_container *endpoints; + ast_log(LOG_NOTICE, "BUGBUG res_pjsip init attempting to retrieve all endpoints\n"); endpoints = ast_sorcery_retrieve_by_fields(sip_sorcery, "endpoint", AST_RETRIEVE_FLAG_MULTIPLE | AST_RETRIEVE_FLAG_ALL, NULL); + if (endpoints) { + ast_log(LOG_NOTICE, "BUGBUG res_pjsip init retrieved %d endpoints\n", ao2_container_count(endpoints)); + } ao2_cleanup(endpoints); } @@ -2089,7 +2093,11 @@ struct ao2_container *ast_sip_get_endpoints(void) { struct ao2_container *endpoints; + ast_log(LOG_NOTICE, "BUGBUG Generally attempting to retrieve all endpoints\n"); endpoints = ast_sorcery_retrieve_by_fields(sip_sorcery, "endpoint", AST_RETRIEVE_FLAG_MULTIPLE | AST_RETRIEVE_FLAG_ALL, NULL); + if (endpoints) { + ast_log(LOG_NOTICE, "BUGBUG Generally retrieved %d endpoints\n", ao2_container_count(endpoints)); + } return endpoints; } diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c index 8029167..8ec37ac 100644 --- a/res/res_pjsip/pjsip_options.c +++ b/res/res_pjsip/pjsip_options.c @@ -856,6 +856,7 @@ static int sip_options_qualify_contact(void *obj, void *arg, int flags) ast_sorcery_object_get_id(contact), aor_options->name); if (!ast_strlen_zero(contact->endpoint_name)) { + ast_log(LOG_NOTICE, "BUGBUG Looking for contact endpoint %s\n", contact->endpoint_name); endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", contact->endpoint_name); } @@ -863,6 +864,7 @@ static int sip_options_qualify_contact(void *obj, void *arg, int flags) struct sip_options_endpoint_state_compositor *endpoint_state_compositor; endpoint_state_compositor = AST_VECTOR_GET(&aor_options->compositors, 0); + ast_log(LOG_NOTICE, "BUGBUG Looking for endpoint compositor endpoint %s\n", endpoint_state_compositor->name); endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", endpoint_state_compositor->name); } @@ -1759,9 +1761,11 @@ static int sip_options_synchronize_task(void *obj) } } + ast_log(LOG_NOTICE, "BUGBUG Options sync attempting to retrieve all AORs\n"); objects = ast_sorcery_retrieve_by_fields(ast_sip_get_sorcery(), "aor", AST_RETRIEVE_FLAG_MULTIPLE | AST_RETRIEVE_FLAG_ALL, NULL); if (objects) { + ast_log(LOG_NOTICE, "BUGBUG Retrieved %d AORs\n", ao2_container_count(objects)); /* Go through the returned AORs and synchronize with our local state */ ao2_callback(objects, OBJ_NODATA, sip_options_synchronize_aor, existing); ao2_ref(objects, -1); @@ -1777,9 +1781,11 @@ static int sip_options_synchronize_task(void *obj) ao2_ref(existing, -1); } + ast_log(LOG_NOTICE, "BUGBUG Options sync attempting to retrieve all endpoints\n"); objects = ast_sorcery_retrieve_by_fields(ast_sip_get_sorcery(), "endpoint", AST_RETRIEVE_FLAG_MULTIPLE | AST_RETRIEVE_FLAG_ALL, NULL); if (objects) { + ast_log(LOG_NOTICE, "BUGBUG Retrieved %d endpoints\n", ao2_container_count(objects)); /* Go through the provided endpoints and update AORs */ ao2_callback(objects, OBJ_NODATA, sip_options_synchronize_endpoint, NULL); ao2_ref(objects, -1); @@ -1981,9 +1987,11 @@ static int sip_options_aor_observer_modified_task(void *obj) * Using LIKE doesn't seem to work very well with non-realtime so we * fetch everything right now and do a filter on our side. */ + ast_log(LOG_NOTICE, "BUGBUG Options AOR update attempting to retrieve all endpoints\n"); endpoints = ast_sorcery_retrieve_by_fields(ast_sip_get_sorcery(), "endpoint", AST_RETRIEVE_FLAG_MULTIPLE | AST_RETRIEVE_FLAG_ALL, NULL); if (endpoints) { + ast_log(LOG_NOTICE, "BUGBUG Retrieved %d endpoints\n", ao2_container_count(endpoints)); ao2_callback(endpoints, OBJ_NODATA, sip_options_synchronize_endpoint, aor); ao2_ref(endpoints, -1); }