There are a lot of things that could be at issue here, but lets start with the stupid stuff.
Here is a common list I made you can look at.
The 5 most popular reasons for connection failure
Now, one thing that stands out as a possibility that should be eliminated is loopback protection. Public or private node(s).
If your node A is connected to node (any#) and your other node B is connected to the same, you will not be able to connect the 2 nodes of yours ( A & B ) together.
But it might help to watch asterisk commands in the foreground to see if the connection attempts are reporting.
asterisk -rvvv