While working on fixing the issue, we may think the database mirroring port may have stopped working or blocked for some security reason which we do not know accurately at the beginning of the situation. Nevertheless, the reason should be investigated further by the Network team so as to prevent from getting the same issue in the future again. Having clear the situation, I am going to show one way to have the database mirroring working again. To begin with, we need to figure out what is the current number port of the mirroring being used.
We can see that the mirroring port is 5022, so we can opt to change it.
ALTER ENDPOINT [Mirroring] AS TCP (LISTENER_PORT = 5023)
ALTER ENDPOINT [Mirroring] AS TCP (LISTENER_PORT = 5022)