BelledonneCommunications / flexisip

Linphone.org mirror for flexisip (git://git.linphone.org/flexisip.git)
http://flexisip.org
GNU Affero General Public License v3.0
148 stars 71 forks source link

TLS fails #118

Open M-Stenzel opened 3 years ago

M-Stenzel commented 3 years ago

Hi team,

after I managed to setup flexisip as SIP proxy as described here

[https://wiki.linphone.org/xwiki/wiki/public/view/Flexisip/1.%20Installation/]

I setup Debian stretch with all the latest patches and flexisip version 2.0.4. I set up TLS with Let's Encrypt certificates like this

cd /etc/flexisip/tls cp /etc/letsencrypt/live/123/privkey.pem ./ cp /etc/letsencrypt/live/123/cert.pem ./ cp /etc/letsencrypt/live/123/fullchain.pem ./cafile.pIem awk 1 privkey.pem cert.pem > ./agent.pem

I do hope that flexisip is satisfied with both cafile.pem and agent.pem (do not know how to verify...)

Snippet from flexisip.conf:

[global] ... transports=sips:0.0.0.0:5060 tls-certificates-dir=/etc/flexisip/tls require-peer-certificate=false

Expected behaviour would mean that I can connect from Zoiper/Linphone/Groundwire (tried all 3 of them) via TLS, however the connection fails. TCP works though. In the log files (in message level) I do not receive any information as to the TLS handshake, nothing.

How can I find out (messages etc.) about problems with the SSL handshake? Is my certificate chain o.k.?

Martin.

M-Stenzel commented 3 years ago

This is an update:

the chain as described works indeed, I am able to establish a TLS connection by changing entry transports=sips:0.0.0.0:5060

to transports=sips:0.0.0.0:5061

As per RFC 3261 the TLS port NEEDS to be 5061.

Now everything is set up as wanted, though I am still struggling to make it work with linphone (Groundwire works). Again it seems to be a problem with configuration (?).

Martin.

sanjayws commented 3 years ago

Hi, did you manage to get it to work on Linphone eventually?

M-Stenzel commented 3 years ago

Dear Sanjay,

thanks for asking! Yes, finally I made it work, configuration was wrong.

So no problem with the software itself,

Martin.


-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBF/VIZ8BEADrUBes4ZkfCVpNpChElDxCwIorpTjiZIrzTXvXKX4zH1pQrF/c i6XJ9R6B2y/XPm22VrdngLErqBvM60LIVwrAplPrenc+UQJ7829IpaNcb/Dq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MBSKRfEACij4CVjrWhb71aZ3q/m7MQ/2q98cbLVKKD A6wcIuW18e6S1jTewG6uAu+fpXS97OPKgZcQj+jf77qx1VL+UrhL56otOhDQBsuv UQn9JmWtTSTqN3q1niTUJomL94QeWcvK/TS00hIAd8ibrlJHy0iVQpHiswwXjtay f7szsWeA73sg95X8pPYsTkzImbuU2V3l+mHgD9PRj26AuTyyBpuxopjRV8Fv+T0M yNwIdX+bxQbgAfz6DjDJuQjdCE25heLxsIsdECu4icSB+C0r64E+YposlCgojg2o tDEPcqI5AIUmudKuLsz0aE8MGs+Ao9AwvoSZvxaRH9HRuNvjTvVh/8mvlvPGrcpP jp2nteZGmK6K4jfWKpWzel2CrE0HgUuUuIvDnLn3KjfYbTCUePY//hoOzh8tUIpu dsYakaHovL1JcYNQp8B6O1FdhDWPZcXIFXE0e+Ze9qaoL42b5ffJbQmCp0uxM1OP WD+daDacEfzsp8q6BmzjLBeA80gHK3W2Zt+ZfTN8/HmAV8ukhPlSv2wAnJLt7TDP L4/UG+QKbEpdrstJxcO+pY32Q/GoCyr///kW8koUe8ON9W0xx79AaOKv9z7f9n9V UwdhUYhprUDCUASgDzDJO69R4TO1CQc9AK6FtgT0NE4jHU7xvEsPUpIaqGy+zQQN 2GvBVs8FBw== =y232 -----END PGP PUBLIC KEY BLOCK-----

On 2021-06-12 05:25, Sanjay WS wrote:

Hi, did you manage to get it to work on Linphone eventually?

-- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [1], or unsubscribe [2].

Links:

[1] https://github.com/BelledonneCommunications/flexisip/issues/118#issuecomment-859990258 [2] https://github.com/notifications/unsubscribe-auth/ASK2NWCQQDPGECMZZSJDFLTTSLHSTANCNFSM43QTHZ5Q

sanjayws commented 3 years ago

Awesome. I just got it to work too. I used asterisk as backend pbx. I can dial on pbx extensions for example to check the time on the server but i can't seem to call extensions (e.g. 1000 calling 1001), it fails. Still troubleshooting.. 🈂️

Glad to know your configs are working, your comment led to fixing the cert issues. Linphone and Flexisip documentation is pretty scarce and many people just have to just guess things..i hope i can contribute to the documentation someday.

sercangoger commented 2 years ago

I have SSL problem too. in config settings at the moment

transports=sip:*

In this way, what kind of setting do I need to make in the config so that I can do SSL?

jmvillaltas commented 7 months ago

This is an update:

the chain as described works indeed, I am able to establish a TLS connection by changing entry transports=sips:0.0.0.0:5060

to transports=sips:0.0.0.0:5061

As per RFC 3261 the TLS port NEEDS to be 5061.

Now everything is set up as wanted, though I am still struggling to make it work with linphone (Groundwire works). Again it seems to be a problem with configuration (?).

Martin.

Hello Mr. Could you show me the configuration you have in your flexisip.conf? Do you only use the proxy module to handle TLS or do you also use the B2BUA module?