UC-2306: Delay when trying to place calls after server reboot/shutdown in a partitioned region

- CallerAlias: query gateway in database only if external one, that is contains sipxecs-lineid; query user caller id only if needed, that is external gateway that allows user caller id rewrite. For an internall / incoming call that goes to voicemail this check will save us for making 6 queries that are not needed