I try to connect to a remote gateway using ssl as in this doc but it does not work. There is no certificate showing up in "Incoming Connections" of the remote gateway.
Non-ssl connection to remote gateway is working okay.
Do you have Require Two-Way Auth enabled on the gateway where you're creating the Outgoing Connection [to the remote gateway]? You should see something of note in the logs.
If you don't have Require Two-Way Auth, you might check other simple things like if the remote gateway has any firewall rules blocking port 8060/tcp (especially if you're seeing Connection Timed Out errors on your outgoing connection).