Well, I understand that we have 2 scenarios: Secure SIP and SRTP for internal communication (PBX / Endpoints) and Secure SIP and SRTP for external communication (PBX / SIP Provider).
From the research I did, I came to some conclusions:
1 - SRTP enabled does not work if Secure SIP is not enabled and working (as I understand it, it does not matter if the call is internal or external).
2 - Phones must have certificate support and in case of external calls the SIP Provider must also support Secure SIP and SRTP for communication.
3 - Secure SIP works on port 5061.
If I am right, basically to work in secure mode, just follow these steps:
1 - Go to Settings> Security> Secure SIP. Here it is possible to work with certificate
2 - For the SIP Provider go to: SIP Trunks> choose trunk> Change port to 5061. In Options> advanced, select SRTP.
3 - For phones go to: Extensions> Choose Extension> Phone Provisioning. In the part that is written Networks go to SIP Transport and switch to TLS, then in RTP mode choose only secure and save.
My problem is in step 1 where for Linux I don't know how to get the certificate.
My current scenario is:
3CX v16 on Linux on Google Cloud;
Yealink T19P IP Phones in STUN;
No SBC, no VPN, very simple scenario.