{"id":354,"date":"2010-11-29T10:40:44","date_gmt":"2010-11-29T09:40:44","guid":{"rendered":""},"modified":"2018-11-01T11:05:20","modified_gmt":"2018-11-01T10:05:20","slug":"configuring-tls-support-kamailio-31-howto","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/configuring-tls-support-kamailio-31-howto\/","title":{"rendered":"Configuring TLS support in Kamailio 3.1 &#8211; Howto"},"content":{"rendered":"<p>This article continue on series of articles about the Kamailio 3.1.x  SIP&nbsp;proxy deployed on debian lenny and its features. In previous  articles we have:<\/p>\n<p>1) <a href=\"..\/..\/..\/..\/..\/..\/installing-kamailio-31-debian-lenny\">installed clear Kamailio 3.1.x server <\/a><\/p>\n<p>2) <a href=\"..\/..\/..\/..\/..\/..\/sip\/kamailio\/adding-mysql-support-kamailio-31-debian-lenny\">added Mysql support <\/a>for persistance location storage<\/p>\n<p>3) <a href=\"..\/..\/..\/..\/..\/..\/sip\/kamailio\/installing-siremis-20-kamailio-web-management-interface-debian-lenny-how\">SIREMIS web management interface for our kamailio server<\/a>.<\/p>\n<p>4) <a href=\"..\/..\/..\/..\/..\/..\/sip\/kamailio\/configuring-im-and-presence-kamailio-31-howto\">configured IM and presence service on Kamailio 3.1 &#8211; Howto<\/a><\/p>\n<p>5) <a href=\"https:\/\/nil.uniza.sk\/en\/sip\/kamailio\/configuring-xcap-support-im-and-presence-over-kamailio-31-debian-lenny\/\">configured XCAP support for SIMPLE<\/a>.<\/p>\n<p>and now we will configure TLS support.<\/p>\n<h2><strong>Prerequisities<\/strong><\/h2>\n<ol>\n<li>Installed and working <a rel=\"nofollow\" title=\"http:\/\/www.kamailio.org\" class=\"urlextern\" href=\"http:\/\/www.kamailio.org\/\">Kamailio (OpenSER) 3.1.0<\/a>&nbsp;server.<\/li>\n<\/ol>\n<h2>Preparation<\/h2>\n<p>On the Kamailio site there is a mention<span>, that <\/span><\/p>\n<blockquote>\n<p><em>TLS is an optional part of the kamailio core and does not require special module installing.<\/em><\/p>\n<\/blockquote>\n<p>But we have to install kamailio tls module with<\/p>\n<pre>\r\napt-get install kamailio-tls-modules\r\n<\/pre>\n<p>Next, we have to add to your dns server correct SRV record for your SIPS TLS (SIP&nbsp;Secure) server. In my case it is<\/p>\n<pre>\r\n_sips._tcp      IN      SRV     200 1 5061        pstest\r\npstest          IN      A       158.193.139.51\r\n<\/pre>\n<p>The dig dns utility have to return correct IP&nbsp;address pointing to your server<\/p>\n<pre>\r\ndig SRV <span><strong>_sips._tcp<\/strong><\/span>.ps.sip.uniza.sk\r\n<\/pre>\n<h2>Creating certificates with OpenSSL<\/h2>\n<p>As a first step we have to generate certificates by which the SIP&nbsp;proxy will be identified during TLS connection setup. We will use the guide <a href=\"http:\/\/www.kamailio.org\/dokuwiki\/doku.php\/tls:create-certificates\">Create Certificates to be used with Kamailio<\/a>.<\/p>\n<p>From the guide:<\/p>\n<blockquote>\n<p><em>Creating suitable certificates for Kamailio is just as simple as configuring Apache with <acronym title=\"Secure Sockets Layer\">SSL<\/acronym>\/TLS. If you do not have certificates you can use the &ldquo;openssl&rdquo; tool to generate the certificate.<\/em><\/p>\n<\/blockquote>\n<h3>Step 1 &#8211; editing openssl.cnf<\/h3>\n<p>Open \/etc\/ssl\/openssl.cnf and change<\/p>\n<pre>\r\npolicy          = policy_match\r\n<\/pre>\n<p>to more flexible<\/p>\n<pre class=\"code\">\r\npolicy          = policy_anything\r\n<\/pre>\n<h3>Step 2 &#8211; Preparing folders<\/h3>\n<pre class=\"code\">\r\nmkdir \/etc\/certs\r\nchmod 0700 \/etc\/certs\r\ncd \/etc\/certs<\/pre>\n<div class=\"li\">\n<h3>Step 3 &#8211; generating certificates<\/h3>\n<pre>\r\nmkdir demoCA\r\ncd demoCA\r\nmkdir newcerts\r\necho '01' &gt; serial\r\ntouch index.txt\r\nopenssl req -new -x509 -extensions v3_ca -keyout key.pem -out cert.pem -days 3650<\/pre>\n<\/div>\n<p>The&nbsp;<em><strong>openssl req -new<\/strong><\/em> &#8230; will generate self-signed CA (cartificate authority) certificate valid for 10 years.<\/p>\n<p>Then generating start, during the processing the system will ask you for certificates protection (put your password there) and will ask for some questions (country, city and etc.)<\/p>\n<pre>\r\nGenerating a 1024 bit RSA private key\r\n...............++++++\r\n................++++++\r\nwriting new private key to 'key.pem'\r\nEnter PEM pass phrase:\r\nVerifying - Enter PEM pass phrase:\r\n-----\r\nYou are about to be asked to enter information that will be incorporated\r\ninto your certificate request.\r\nWhat you are about to enter is what is called a Distinguished Name or a DN.\r\nThere are quite a few fields but you can leave some blank\r\nFor some fields there will be a default value,\r\nIf you enter '.', the field will be left blank.\r\n-----\r\nCountry Name (2 letter code) [AU]:SK\r\nState or Province Name (full name) [Some-State]:Slovakia\r\nLocality Name (eg, city) []:Zilina\r\nOrganization Name (eg, company) [Internet Widgits Pty Ltd]:My private CA\r\nOrganizational Unit Name (eg, section) []:\r\nCommon Name (eg, YOUR name) []:My private CA\r\nEmail Address []:\r\n<\/pre>\n<p>We may verify the content of the new CA certificates:<\/p>\n<pre>\r\nopenssl x509 -in cert.pem -noout -text\r\n<\/pre>\n<p>the command writes the cert.<\/p>\n<pre>\r\nopenssl x509 -in cert.pem -noout -dates\r\n<\/pre>\n<p>writes the dates.<\/p>\n<pre>\r\nopenssl x509 -in cert.pem -noout -purpose\r\n<\/pre>\n<p>writes the purpose of the certs.<\/p>\n<h3>&nbsp;Step 4 &#8211; generating certificates for your sip proxy<\/h3>\n<p>Now make a certificate for your SIP proxy (for example sip.mydomain.com), my domain is ps.sip.uniza.sk&nbsp; (create keys and a  certificate signing request (CSR), then sign the CSR with your CA&#8217;s  certificate).<\/p>\n<pre>\r\nmkdir ps.sip.uniza.sk\r\ncd ps.sip.uniza.sk\/\r\nopenssl req -new -nodes -keyout key.pem -out req.pem\r\n<\/pre>\n<p>It start the certificate creation<\/p>\n<pre>\r\nGenerating a 1024 bit RSA private key\r\n......++++++\r\n..........++++++\r\nwriting new private key to 'key.pem'\r\n-----\r\nYou are about to be asked to enter information that will be incorporated\r\ninto your certificate request.\r\nWhat you are about to enter is what is called a Distinguished Name or a DN.\r\nThere are quite a few fields but you can leave some blank\r\nFor some fields there will be a default value,\r\nIf you enter '.', the field will be left blank.\r\n-----\r\nCountry Name (2 letter code) [AU]:SK\r\nState or Province Name (full name) [Some-State]:SLOVAKIA\r\nLocality Name (eg, city) []:Zilina\r\nOrganization Name (eg, company) [Internet Widgits Pty Ltd]:ZU\r\nOrganizational Unit Name (eg, section) []:KIS\r\nCommon Name (eg, YOUR name) []:<span style=\"background-color: rgb(255, 255, 153);\"><strong>Have to be FQD<\/strong><\/span><span style=\"background-color: rgb(255, 255, 153);\"><strong>N<\/strong> of your server<\/span>\r\nEmail Address []:\r\n\r\nPlease enter the following 'extra' attributes\r\nto be sent with your certificate request\r\nA challenge password []:\r\nAn optional company name []:\r\n<\/pre>\n<p>Go two directories up<\/p>\n<pre>\r\ncd ..\/..<\/pre>\n<p>&nbsp;or be carefull to write correct paths in next command (CA signing)<\/p>\n<pre>\r\nopenssl ca -days 730 -out demoCA\/ps.sip.uniza.sk\/cert.pem -keyfile demoCA\/key.pem -cert demoCA\/cert.pem -infiles demoCA\/ps.sip.uniza.sk\/req.pem\r\n<\/pre>\n<p>done! Yyou may verify if the cert is correct<\/p>\n<pre>\r\nopenssl x509 -in ps.sip.uniza.sk\/cert.pem -noout -text\r\n<\/pre>\n<h2>Importing certificate to the PC (SIP&nbsp;Client)<\/h2>\n<p>We have to install our certificates, so our client will trust to our self signed SIP Kamailio certificates. To do that we have to download cert from \/etc\/certs\/demoCA\/cert.pem to the PC (with windows 7 in my case) and then we may either:<\/p>\n<p>1) Start&rarr;Control Panel&rarr;Internet import it<\/p>\n<p>2) or rename extension of the cert.pem to the cert.crt (cert.crt) and install with doubleclick (win).&nbsp;<\/p>\n<p>3) go with firefox to the https:\/\/&lt;your_sip_server&gt;:5061 and install cert<\/p>\n<p>4) &#8230;.<\/p>\n<p>If we do not import certificate, we may see (using wireshark), that TLS establishment is dropped with reason Unknown CA.<\/p>\n<pre>\r\n414    75.589466    192.168.1.101    158.193.139.51    TLSv1    Alert (Level: Fatal, Description: Unknown CA)\r\n<\/pre>\n<p>and, maybe it is client dependent, eyabeam is displaying <em><strong><span id=\"search\">503 Certificate validation failure <\/span><\/strong><\/em><span id=\"search\">message.<\/span><\/p>\n<p><span>Be aware of client support for TLS and how it is implemented. From <a href=\"http:\/\/www.kamailio.org\/dokuwiki\/doku.php\/tls:create-certificates\">the guide<\/a> <\/span>eyeBeam should read CA authority from the local user or PC storage, but under Win7 32\/64bit eyeBeam does not work, it is returning unknown CA. The same for Bria 2.4. At least SIP Communicator work nice and fast.<\/p>\n<h2>Configuring the Kamailio<\/h2>\n<p>Open \/etc\/kamailio.kamailio.cfg and<\/p>\n<p>setup the server to listen on tls 5061 port, required for secure communication<\/p>\n<pre>\r\nlisten=tls:158.193.139.51:5061\r\n<\/pre>\n<p>then define (manualy write) zone directive for TLS<\/p>\n<pre>\r\n#!define WITH_TLS\r\n<\/pre>\n<p>For this zone directive there is already preconfigured zone blocks (nothing need to be changed)<\/p>\n<pre>\r\n#!ifdef WITH_TLS\r\nenable_tls=yes\r\n#!endif<\/pre>\n<p>which will turn on TLS support.<\/p>\n<p>Next, there are another already preconfigured zone block, which load required tls.so module (nothing need to be changed)<\/p>\n<pre>\r\n#!ifdef WITH_TLS\r\nloadmodule &quot;tls.so&quot;\r\n#!endif\r\n<\/pre>\n<p>In module parameter section of the cfg file there is other zone block<\/p>\n<pre>\r\n#!ifdef WITH_TLS\r\n# ----- tls params -----\r\nmodparam(&quot;tls&quot;, &quot;config&quot;, &quot;\/etc\/kamailio\/tls.cfg&quot;)\r\n#!endif\r\n<\/pre>\n<p>It is pointing to the tls.cfg file of the kamailio server. During TLS module installation installer may ask you if you like to install tls.cfg file , if yes, then it install default tls.cfg. This file we will modify as next step. For more info look at <a href=\"http:\/\/sip-router.org\/docbook\/sip-router\/branch\/master\/modules\/tls\/tls.html#config\">Kamailio TLS module description<\/a>.<\/p>\n<p>We have to add or modify lines, that they will pointing to correct certification files:<\/p>\n<pre>\r\n[server:default]\r\nmethod = TLSv1\r\nverify_certificate = yes\r\nrequire_certificate = no\r\nprivate_key = \/etc\/certs\/demoCA\/ps.sip.uniza.sk\/key.pem\r\ncertificate = \/etc\/certs\/demoCA\/ps.sip.uniza.sk\/cert.pem\r\n#ca_list = \/etc\/certs\/demoCA\/cert.pem\r\n<\/pre>\n<p>and we will add setting for 5061 port of our server<\/p>\n<pre>\r\n[server:158.193.139.51:5061]\r\nmethod = SSLv23\r\nverify_certificate = no\r\nrequire_certificate = no\r\nprivate_key = \/etc\/certs\/demoCA\/ps.sip.uniza.sk\/key.pem\r\ncertificate = \/etc\/certs\/demoCA\/ps.sip.uniza.sk\/cert.pem\r\n<\/pre>\n<p>Be aware, as a default setting of the tls.cfg there is also a client section, which require correct certificates for clients. It look<\/p>\n<pre>\r\n[client:default]\r\nverify_certificate = yes\r\nrequire_certificate = yes\r\n<\/pre>\n<p>Change it to <em><strong>&quot;no<\/strong><\/em>&quot;, becasue this require client certificate validation<\/p>\n<pre>\r\n[client:default]\r\nverify_certificate = no\r\nrequire_certificate = no<\/pre>\n<h2>Testing<\/h2>\n<p>1) We may use openssl tool connecting to our server. If everything is OK, we should see some output with cert listed. If there is not such output, check previous steps, something made wrong.<\/p>\n<pre><strong>openssl s_client -connect 158.193.139.51:5061 -tls1<br \/>CONNECTED(00000003)<\/strong>\r\ndepth=0 \/C=SK\/ST=Slovakia\/L=Zilina\/O=ZU\/OU=KIS\/CN=pstest.ps.sip.uniza.sk\r\nverify error:num=20:unable to get local issuer certificate\r\nverify return:1\r\ndepth=0 \/C=SK\/ST=Slovakia\/L=Zilina\/O=ZU\/OU=KIS\/CN=pstest.ps.sip.uniza.sk\r\nverify error:num=27:certificate not trusted\r\nverify return:1\r\ndepth=0 \/C=SK\/ST=Slovakia\/L=Zilina\/O=ZU\/OU=KIS\/CN=pstest.ps.sip.uniza.sk\r\nverify error:num=21:unable to verify the first certificate\r\nverify return:1\r\n---\r\nCertificate chain\r\n 0 s:\/C=SK\/ST=Slovakia\/L=Zilina\/O=ZU\/OU=KIS\/CN=pstest.ps.sip.uniza.sk\r\n   i:\/C=SK\/ST=Slovakia\/L=Zilina\/O=My private CA\/CN=My private CA\r\n---\r\nServer certificate\r\n-----BEGIN CERTIFICATE-----\r\nMIICvzCCAiigAwIBAgIBAjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQGEwJTSzER\r\nMA8GA1UECBMIU2xvdmFraWExDzANBgNVBAcTBlppbGluYTEWMBQGA1UEChMNTXkg\r\ncHJpdmF0ZSBDQTEWMBQGA1UEAxMNTXkgcHJpdmF0ZSBDQTAeFw0xMDExMjkyMDQ1\r\nNDhaFw0xMjExMjgyMDQ1NDhaMG0xCzAJBgNVBAYTAlNLMREwDwYDVQQIEwhTbG92\r\nYWtpYTEPMA0GA1UEBxMGWmlsaW5hMQswCQYDVQQKEwJaVTEMMAoGA1UECxMDS0lT\r\nMR8wHQYDVQQDExZwc3Rlc3QucHMuc2lwLnVuaXphLnNrMIGfMA0GCSqGSIb3DQEB\r\nAQUAA4GNADCBiQKBgQC\/zrOZSEwpF6SfiOSBm6epmHStIdPLslxVLUAUbP1ga2KD\r\nYahZv43gC8\/D9LbL5cbwWoMJ3bU9Nxj2Y9u0tFq8OyyEYQyvbk3n7Dnx\/ddMX7wL\r\nhTpWUSdeKN2ObUtxQnBO4\/jlRQw3rlGtA9pOSpTLJnp4sAAJs096tr4KhtAchwID\r\nAQABo3sweTAJBgNVHRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVy\r\nYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQU6MAimP6egglzK2iZ4a9t2\/cnRnkw\r\nHwYDVR0jBBgwFoAUWWHct7bIIBwHLD2313b\/+0\/vE8UwDQYJKoZIhvcNAQEFBQAD\r\ngYEAPyj3JA5\/eSJPZytMIUMUaWhGM0Y53D7CnFeqOe9LLgXg2LqaFivNapoTrXFr\r\nDlo9sKASSHMHUE3f51ApNjXRBQw0eOROXO8R+MYyMndfnvZieLAwOu4M6axh5NpF\r\nJhH9PiLqgyEn+pWq6JYmCJY1YVPyK51mucdudrSl8h9G4JM=\r\n-----END CERTIFICATE-----\r\nsubject=\/C=SK\/ST=Slovakia\/L=Zilina\/O=ZU\/OU=KIS\/CN=pstest.ps.sip.uniza.sk\r\nissuer=\/C=SK\/ST=Slovakia\/L=Zilina\/O=My private CA\/CN=My private CA\r\n---\r\nNo client certificate CA names sent\r\n---\r\nSSL handshake has read 1034 bytes and written 291 bytes\r\n---\r\nNew, TLSv1\/SSLv3, Cipher is AES256-SHA\r\nServer public key is 1024 bit\r\nCompression: NONE\r\nExpansion: NONE\r\nSSL-Session:\r\n    Protocol  : TLSv1\r\n    Cipher    : AES256-SHA\r\n    Session-ID:\r\n    Session-ID-ctx:\r\n    Master-Key: CB95C02821211D87AF96CB57DD68E865C6061F9125D95B1B55EC57E92ADDB06E1D7DE39703C32E8F9A0BA56BDE9BC8D6\r\n    Key-Arg   : None\r\n    TLS session ticket:\r\n    0000 - 5a 51 10 16 54 13 fc e8-3d f0 f6 76 0b 00 89 b6   ZQ..T...=..v....\r\n    0010 - 24 ee 31 9a f3 e7 cd 3d-0a 8e 42 8b 69 b4 a4 09   $.1....=..B.i...\r\n    0020 - 6a b3 87 1e 72 71 c0 4e-51 90 8f 27 b4 59 6b 46   j...rq.NQ..'.YkF\r\n    0030 - 57 28 68 73 2d 3f 75 4a-b0 67 3e 2e 2b 6a 95 72   W(hs-?uJ.g&gt;.+j.r\r\n    0040 - 3e b6 44 f8 aa 49 76 dd-42 b4 65 a5 18 36 79 e7   &gt;.D..Iv.B.e..6y.\r\n    0050 - 0a 09 a7 8c 8b 0c db a9-89 a4 b1 d5 f9 d4 fa 45   ...............E\r\n    0060 - 09 52 9a 6d ae 0e d4 51-12 8b b4 31 06 a7 5a 9e   .R.m...Q...1..Z.\r\n    0070 - bc 98 c4 16 66 50 84 95-b9 75 cd 31 2f 84 5e 84   ....fP...u.1\/.^.\r\n    0080 - 0f 67 5f d9 7c 09 54 da-7e a7 d0 24 bf 30 26 f0   .g_.|.T.~..$.0&amp;.\r\n    0090 - 39 aa 17 5b 21 6c 43 d6-f7 c6 31 d4 d2 b1 57 c9   9..[!lC...1...W.\r\n    00a0 - 2e ed 9c 53 9b 86 2a 24-69 f1 b6 ed ca 9a 94 7b   ...S..*$i......{\r\n\r\n    Start Time: 1291122977\r\n    Timeout   : 7200 (sec)\r\n    Verify return code: 21 (unable to verify the first certificate)\r\n---\r\n\r\n<\/pre>\n<p>&nbsp;2) Using your peferred SIP&nbsp;client with TLS support.<\/p>\n<p>Some results are following. TLS suport for eyebeam 1.5 and Bria 2.4 under windows 7 32 or 64bit does not work. SIP communicator <em><strong>work well<\/strong><\/em>.<\/p>\n<p>Tre log file of the Bria 2.4 is containing following messages:<\/p>\n<pre>\r\nRESIP:DUM | &quot;Got a DumFeatureMessage099BD7C8&quot; |\r\n[10-12-16]09:40:39.896 | Info&nbsp;&nbsp;&nbsp; | RESIP:TRANSPORT | &quot;Creating TLS connection for domain&nbsp; [ V4 158.193.139.51:5061 TLS target domain=ps.sip.uniza.sk received on: Transport: [ V4 0.0.0.0:28829 TLS target domain=unspecified connectionId=0 ] connectionId=0 ] on 2232&quot; |\r\n[10-12-16]09:40:39.897 | Info&nbsp;&nbsp;&nbsp; | RESIP:TRANSPORT | &quot;TLS handshake starting (client mode)&quot; |\r\n[10-12-16]09:40:39.902 | Info&nbsp;&nbsp;&nbsp; | RESIP:TRANSPORT | &quot;TLS connected&quot; |\r\n[10-12-16]09:40:39.902 | Info&nbsp;&nbsp;&nbsp; | RESIP:TRANSPORT | &quot;TLS sessions set up with TLSv1 TLSv1\/SSLv3 AES256-SHA &quot; |\r\n[10-12-16]09:40:39.903 | Error&nbsp;&nbsp; | RESIP:TRANSPORT | &quot;Certificate name mismatch: trying to connect to &lt;ps.sip.uniza.sk&gt; remote cert domain(s) are &lt;pstest.ps.sip.uniza.sk&gt;&quot; |\r\n[10-12-16]09:40:39.903 | Info&nbsp;&nbsp;&nbsp; | RESIP:TRANSACTION | &quot;Sending ConnectionTerminated 17 to TUs&quot; |\r\n[10-12-16]09:40:39.903 | Info&nbsp;&nbsp;&nbsp; | RESIP:TRANSACTION | &quot;Try sending request to a different dns result&quot; |\r\n[10-12-16]09:40:39.903 | Info&nbsp;&nbsp;&nbsp; | RESIP:TRANSACTION | &quot;Ran out of dns entries for ps.sip.uniza.sk. Send 503&quot; |\r\n[10-12-16]09:40:39.904 | Info&nbsp;&nbsp;&nbsp; | RESIP:DNS | &quot;local hostname does not contain a domain part PC-T2&quot; |\r\n[10-12-16]09:40:39.904 | Info&nbsp;&nbsp;&nbsp; | RESIP:DUM | &quot;Got: SipResp: 503 tid=476c5d721d161a34 cseq=REGISTER \/ 1 from(wire)&quot; |\r\n[10-12-16]09:40:39.904 | Warning | AbstractPhone | &quot;SIP registration failed; reason: 'SipError'; SIP error-code: 503; error-phrase: 'Certificate Name Mismatch'&quot; | cpsi::AccountImpl::OnRegistrationStatusChanged\r\n<\/pre>\n<h2>&nbsp;Error solving<\/h2>\n<p>1) Check if there is correct DNS SRV record for SIPS (TLS), port 5061, tls transport<\/p>\n<p>2) Check if certificates are correctly created with proper values.<\/p>\n<p>3) Check if your server is listening on correct port (using&nbsp; command openssl s_client -connect 158.193.139.51:5061 -tls1)<\/p>\n<p>4) check tls.cfg file<\/p>\n<p>5) Look into syslog. To find some error reporting look into syslog -&gt;&nbsp; \/var\/log\/syslog it should provide error message such as<\/p>\n<p><em>&quot;Nov 30 14:17:11 pstest \/usr\/sbin\/kamailio[27615]: ERROR: &lt;core&gt; [tcp_read.c:882]: ERROR: tcp_read_req: error reading<br \/>\nNov 30 14:20:11 pstest \/usr\/sbin\/kamailio[27613]: ERROR: tls [tls_server.c:1174]: TLS accept:error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca<\/em>&quot;<\/p>\n<p>This error is regarding of SIP&nbsp;Client, that do not accept CA certificates of the Kamailio server.<\/p>\n<p>&nbsp;6) use ssldump utility. For example in my case, ssldump provdides following info<\/p>\n<pre>\r\n18 2  0.0021 (0.0014)  S&gt;C  Handshake\r\n      ServerHello\r\n        Version 3.1\r\n        session_id[0]=\r\n\r\n        cipherSuite         Unknown value 0x35\r\n        compressionMethod                   NULL\r\n18 3  0.0022 (0.0001)  S&gt;C  Handshake\r\n      Certificate\r\n18 4  0.0022 (0.0000)  S&gt;C  Handshake\r\n      ServerHelloDone\r\n18 5  0.0037 (0.0014)  C&gt;S  Alert\r\n    level           fatal\r\n    value           unknown_ca\r\n18    0.0040 (0.0003)  C&gt;S  TCP RST\r\n\r\n<\/pre>\n<p>In this case the SIP&nbsp;client resets connection due to SSL Alert, unknown CA authority. This lead you to check that your SIP client do not load CA certificate from trusted CA storage, of course if you import it.<\/p>","protected":false},"excerpt":{"rendered":"<p>This article continue on series of articles about the Kamailio 3.1.x  SIP&nbsp;proxy deployed on debian lenny and its features. In previous  articles we have:<\/p>\n<p>1) <a href=\"..\/..\/..\/..\/..\/..\/installing-kamailio-31-debian-lenny\">installed clear Kamailio 3.1.x server <\/a><\/p>\n<p>2) <a href=\"..\/..\/..\/..\/..\/..\/sip\/kamailio\/adding-mysql-support-kamailio-31-debian-lenny\">added Mysql support <\/a>for persistance location storage<\/p>","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[781,685,765,793,713],"tags":[],"class_list":["post-354","post","type-post","status-publish","format-standard","hentry","category-kamailio-en","category-linux_-_howto-en","category-security-en","category-security-en-sip-en","category-network-security-tls-en"],"taxonomy_info":{"category":[{"value":781,"label":"Kamailio"},{"value":685,"label":"Linux - HOWTO"},{"value":765,"label":"Security"},{"value":793,"label":"Security"},{"value":713,"label":"TLS"}]},"featured_image_src_large":false,"author_info":{"display_name":"admin","author_link":"https:\/\/nil.uniza.sk\/en\/author\/admin\/"},"comment_info":36,"category_info":[{"term_id":781,"name":"Kamailio","slug":"kamailio-en","term_group":0,"term_taxonomy_id":779,"taxonomy":"category","description":"","parent":771,"count":29,"filter":"raw","cat_ID":781,"category_count":29,"category_description":"","cat_name":"Kamailio","category_nicename":"kamailio-en","category_parent":771},{"term_id":685,"name":"Linux - HOWTO","slug":"linux_-_howto-en","term_group":0,"term_taxonomy_id":683,"taxonomy":"category","description":"","parent":0,"count":71,"filter":"raw","cat_ID":685,"category_count":71,"category_description":"","cat_name":"Linux - HOWTO","category_nicename":"linux_-_howto-en","category_parent":0},{"term_id":765,"name":"Security","slug":"security-en","term_group":0,"term_taxonomy_id":763,"taxonomy":"category","description":"","parent":747,"count":3,"filter":"raw","cat_ID":765,"category_count":3,"category_description":"","cat_name":"Security","category_nicename":"security-en","category_parent":747},{"term_id":793,"name":"Security","slug":"security-en-sip-en","term_group":0,"term_taxonomy_id":791,"taxonomy":"category","description":"","parent":771,"count":1,"filter":"raw","cat_ID":793,"category_count":1,"category_description":"","cat_name":"Security","category_nicename":"security-en-sip-en","category_parent":771},{"term_id":713,"name":"TLS","slug":"network-security-tls-en","term_group":0,"term_taxonomy_id":711,"taxonomy":"category","description":"","parent":707,"count":1,"filter":"raw","cat_ID":713,"category_count":1,"category_description":"","cat_name":"TLS","category_nicename":"network-security-tls-en","category_parent":707}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=354"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/354\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}