<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_7880">Hello,<br></div><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_7866"><br></div><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_7867">I'm trying to make Opensips work with TLS.</div><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_7881"><br></div><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_7883">When I start it I get the following error (debug level 6):<br></div><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_7892"><br></div><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_7891" dir="ltr">Mar 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: DBG:core:init_mod: initializing module proto_tls<br>Mar 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: INFO:proto_tls:mod_init: initializing TLS protocol<br>Mar
 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: 
ERROR:proto_tls:mod_init: unable to set the memory allocation functions<br>Mar 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: ERROR:core:init_mod: failed to initialize module proto_tls<br>Mar 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: ERROR:core:main: error while initializing modules<br>Mar 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: INFO:core:cleanup: cleanup<br>Mar 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: DBG:tm:tm_shutdown: tm_shutdown : start<br>Mar 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: DBG:tm:unlink_timer_lists: emptying DELETE list for set 0<br>Mar 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: DBG:tm:tm_shutdown: emptying hash table<br>Mar 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: DBG:tm:tm_shutdown: releasing timers<br>Mar 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: DBG:tm:tm_shutdown: removing semaphores<br>Mar 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: DBG:tm:tm_shutdown: destroying callback lists<br>Mar 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: DBG:tm:tm_shutdown: tm_shutdown : done<br>Mar 24 14:51:01 ip-10-25-15-118 /usr/local/sbin/opensips[2394]: DBG:core:shm_mem_destroy: destroying the shared memory lock<br>Mar 24 14:51:01 ip-10-25-15-118 opensips: DBG:core:wait_status_code: read code 0 ? rc = 0, errno=Success<br>Mar 24 14:51:01 ip-10-25-15-118 opensips: INFO:core:daemonize: pre-daemon process exiting with -1<br></div><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_9464" dir="ltr"><br></div><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_9463" dir="ltr"><br></div><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_9453" dir="ltr"><br>[root@ip-10-25-15-118 opensips_2_1]# vi /etc/sysconfig/opensips <br>[root@ip-10-25-15-118 opensips_2_1]# vi /usr/local/etc/opensips/opensips.cfg<br>[root@ip-10-25-15-118 opensips_2_1]# opensips -V<br>version: opensips 2.1.2 (x86_64/linux)<br>flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT<br>ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535<br>poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.<br>git revision: 92245fd<br>main.c compiled on 14:11:13 Mar 24 2016 with gcc 4.4.7<br>[root@ip-10-25-15-118 opensips_2_1]# uname -a<br>Linux ip-10-25-15-118 2.6.32-573.18.1.el6.x86_64 #1 SMP Tue Feb 9 22:46:17 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux<br>[root@ip-10-25-15-118 opensips_2_1]# yum list installed openssl<br>Loaded plugins: fastestmirror, presto<br>Loading mirror speeds from cached hostfile<br>&nbsp;* base: mirror.vcu.edu<br>&nbsp;* extras: mirror.cogentco.com<br>&nbsp;* updates: mirror.cogentco.com<br>Installed Packages<br>openssl.x86_64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
1.0.1e-42.el6_7.4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 @updates<br>[root@ip-10-25-15-118 opensips_2_1]# yum list installed openssl-devel<br>Loaded plugins: fastestmirror, presto<br>Loading mirror speeds from cached hostfile<br>&nbsp;* base: mirror.vcu.edu<br>&nbsp;* extras: mirror.cogentco.com<br>&nbsp;* updates: mirror.cogentco.com<br>Installed Packages<br>openssl-devel.x86_64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 1.0.1e-42.el6_7.4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
@updates<br>[root@ip-10-25-15-118 opensips_2_1]# <br></div><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_9444" dir="ltr"><br></div><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_9649" dir="ltr"><br></div><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_9658" dir="ltr"><br></div><div id="yiv4930427546yui_3_16_0_ym18_1_1458831382838_22944" dir="ltr">[root@ip-10-25-15-118 opensips_2_1]# cat /usr/local/etc/opensips/opensips.cfg<br><br></div>#<br># $Id$<br>#<br># OpenSIPS residential configuration script<br>#&nbsp;&nbsp;&nbsp;&nbsp; by OpenSIPS Solutions &lt;team@opensips-solutions.com&gt;<br>#<br># This script was generated via "make menuconfig", from<br>#&nbsp;&nbsp; the "Residential" scenario.<br># You can enable / disable more features / functionalities by<br>#&nbsp;&nbsp; re-generating the scenario with different options.#<br>#<br># Please refer to the Core CookBook at:<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; http://www.opensips.org/Resources/DocsCookbooks<br># for a explanation of possible statements, functions and parameters.<br>#<br><br><br>####### Global Parameters #########<br><br>debug=6<br>log_stderror=no<br>log_facility=LOG_LOCAL0<br><br>fork=yes<br>children=4<br><br>/* uncomment the following lines to enable debugging */<br>#debug=6<br>#fork=no<br>#log_stderror=yes<br><br>/* uncomment the next line to enable the auto temporary blacklisting of <br>&nbsp;&nbsp; not available destinations (default disabled) */<br>#disable_dns_blacklist=no<br><br>/* uncomment the next line to enable IPv6 lookup after IPv4 dns <br>&nbsp;&nbsp; lookup failures (default disabled) */<br>#dns_try_ipv6=yes<br><br>/* comment the next line to enable the auto discovery of local aliases<br>&nbsp;&nbsp; based on revers DNS on IPs */<br>auto_aliases=no<br><br><br>listen=udp:10.25.15.118:5060&nbsp;&nbsp; # CUSTOMIZE ME<br><br>listen=tcp:10.25.15.118:5060&nbsp;&nbsp; # CUSTOMIZE ME <br>listen=tls:10.25.15.118:5061&nbsp;&nbsp; # CUSTOMIZE ME <br><br>advertised_address=xxxxxxxxxxxxx<br>alias=xxxxxxxxxxxxxxxxx<br><br>####### Modules Section ########<br><br>#set module path<br>mpath="/usr/local/lib64/opensips/modules/"<br><br>#### SIGNALING module<br>loadmodule "signaling.so"<br><br>#### StateLess module<br>loadmodule "sl.so"<br><br>#### Transaction Module<br>loadmodule "tm.so"<br>modparam("tm", "fr_timeout", 5)<br>modparam("tm", "fr_inv_timeout", 30)<br>modparam("tm", "restart_fr_on_each_reply", 0)<br>modparam("tm", "onreply_avp_mode", 1)<br><br>#### Record Route Module<br>loadmodule "rr.so"<br>/* do not append from tag to the RR (no need for this script) */<br>modparam("rr", "append_fromtag", 0)<br><br>#### MAX ForWarD module<br>loadmodule "maxfwd.so"<br><br>#### SIP MSG OPerationS module<br>loadmodule "sipmsgops.so"<br><br>#### FIFO Management Interface<br>loadmodule "mi_fifo.so"<br>modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")<br>modparam("mi_fifo", "fifo_mode", 0666)<br><br><br>#### URI module<br>loadmodule "uri.so"<br>modparam("uri", "use_uri_table", 0)<br><div><br></div><div><br></div>#### PGSQL module<br>loadmodule "db_postgres.so"<br><br><br>#### USeR LOCation module<br>loadmodule "usrloc.so"<br>modparam("usrloc", "nat_bflag", "NAT")<br>modparam("usrloc", "db_mode",&nbsp;&nbsp; 2)<br>modparam("usrloc", "db_url",<br>&nbsp;&nbsp;&nbsp; "postgres://xxxxxxxxxxx:xxxxxxxxxxxxxxx@xxxxxxxxxxxxxxxxxxxxxxxxxxxx/opensips7") # CUSTOMIZE ME<br><br><br>#### REGISTRAR module<br>loadmodule "registrar.so"<br>modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT")<br><br>/* uncomment the next line not to allow more than 10 contacts per AOR */<br>#modparam("registrar", "max_contacts", 10)<br><br>#### ACCounting module<br>loadmodule "acc.so"<br>/* what special events should be accounted ? */<br>modparam("acc", "early_media", 0)<br>modparam("acc", "report_cancels", 0)<br>/* by default we do not adjust the direct of the sequential requests.<br>&nbsp;&nbsp; if you enable this parameter, be sure the enable "append_fromtag"<br>&nbsp;&nbsp; in "rr" module */<br>modparam("acc", "detect_direction", 0)<br>modparam("acc", "failed_transaction_flag", "ACC_FAILED")<br>/* account triggers (flags) */<br>modparam("acc", "log_flag", "ACC_DO")<br>modparam("acc", "log_missed_flag", "ACC_MISSED")<br><br><br>#### AUTHentication modules<br>loadmodule "auth.so"<br>loadmodule "auth_db.so"<br>modparam("auth_db", "calculate_ha1", yes)<br>modparam("auth_db", "password_column", "password")<br>modparam("auth_db|uri", "db_url",<br>&nbsp;&nbsp;&nbsp; "postgres://xxxxxxxxxxx:xxxxxxxxxxxxxxx@xxxxxxxxxxxxxxxxxxxxxxxxxxxx/opensips7") # CUSTOMIZE ME<br>modparam("auth_db", "load_credentials", "")<br><div id="yui_3_16_0_ym18_1_1458860919975_4462"><br></div><div id="yui_3_16_0_ym18_1_1458860919975_4304"><br></div>loadmodule "proto_udp.so"<br><br>loadmodule "proto_tcp.so" <br>loadmodule "proto_tls.so"<br>modparam("proto_tls","verify_cert", "1")<br>modparam("proto_tls","require_cert", "0")<br>modparam("proto_tls","tls_method", "TLSv1")<br>modparam("proto_tls","certificate", "/usr/local/etc/opensips/tls/user/user-cert.pem")<br>modparam("proto_tls","private_key", "/usr/local/etc/opensips/tls/user/user-privkey.pem")<br>modparam("proto_tls","ca_list", "/usr/local/etc/opensips/tls/user/user-calist.pem")<br><br>&nbsp;<br><br>####### Routing Logic ########<br><br><div id="yui_3_16_0_ym18_1_1458860919975_4294" dir="ltr"># main request routing logic</div><div id="yui_3_16_0_ym18_1_1458860919975_4301" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458860919975_4302" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458860919975_4337" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458860919975_4338" dir="ltr"><br></div><div id="yiv5772702787yui_3_16_0_ym18_1_1458831382838_9781" dir="ltr">Could you please be so kind and help with this as I've searched all the internet but couldn't find a solution.</div><div id="yiv5772702787yui_3_16_0_ym18_1_1458831382838_9734" dir="ltr"><div id="yiv5772702787yui_3_16_0_ym18_1_1458831382838_23873">I can see there were more people asking about this but I don't see any resolution</div><div id="yiv5772702787yui_3_16_0_ym18_1_1458831382838_23878"><br></div><div id="yiv5772702787yui_3_16_0_ym18_1_1458831382838_23877">Thanks in advance for your support.</div></div><div id="yiv5772702787yui_3_16_0_ym18_1_1458831382838_9917" dir="ltr"><br></div><div id="yiv5772702787yui_3_16_0_ym18_1_1458831382838_22869" dir="ltr">Kind regards,</div><div id="yiv5772702787yui_3_16_0_ym18_1_1458831382838_22942" dir="ltr"><div dir="ltr">Alex</div></div></div></body></html>