<div dir="ltr">Hi! I finally resolved!<div><br></div><div>I explain for those who could have similar problems :)</div><div><br></div><div>I have fixed two things in fs_curl code:</div><div><br></div><div>[index.php:13]</div><div><div>//define('START_TIME', ereg_replace('^0\.([0-9]+) ([0-9]+)$', '\2.\1', microtime()));</div><div>define('START_TIME', preg_replace('/^0\.(\d+) (\d+)$/', '\2.\1', microtime()));</div></div><div><br></div><div>ereg is deprecated for php7[6], instead use preg_replace, and you have to change the string format</div><div><br></div><div>[fs_directory.php:91]</div><div>//$where_array[]   = sprintf( "domain='%s'", $domain['id'] );<br></div><div>$where_array[]   = sprintf( "domain_id='%s'", $domain['id'] );<br></div><div><br></div><div>the easyiest way is to change here in the code. When inserting table schemas the row in table is called domain_id, not domain. Changing that you can fix this warning message</div><div><br></div><div>2018-07-02 19:20:53.322313 [WARNING] switch_core.c:1611 Cannot locate domain 10.XXX<br></div><div><br></div><div>Now I can enter to fs_cli and see users that are defined in database (none users config file has loaded)</div><div><br></div><div><div>freeswitch@freeswitch-capa8> list_users </div><div>userid|context|domain|group|contact|callgroup|effective_caller_id_name|effective_caller_id_number</div><div>20000||10.XXX|default|error/user_not_registered|||</div><div>20001||10.XXX|default|error/user_not_registered|||</div><div>1010||<a href="http://crustaci.domain.com">crustaci.domain.com</a>|default|error/user_not_registered|||</div><div>1011||<a href="http://crustaci.domain.com">crustaci.domain.com</a>|default|error/user_not_registered|||</div><div><br></div><div>+OK</div><div><br></div></div><div>That's all! :)</div><div><br></div><div>[6] <a href="http://php.net/ereg_replace">http://php.net/ereg_replace</a></div><div><br></div><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><br>- Blackhold<br><a href="http://blackhold.nusepas.com" target="_blank">http://blackhold.nusepas.com</a><br>@blackhold_<br>~> cal lluitar contra el fort per deixar de ser febles, i contra nosaltres mateixos quan siguem forts (Xirinacs)<br><°((( ><</div></div>
<br><div class="gmail_quote">2018-07-02 22:20 GMT+02:00 Blackhold <span dir="ltr"><<a href="mailto:blackholdmailer@gmail.com" target="_blank">blackholdmailer@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>I'm adding mod fs_curl from intralanman[1]. I have freeswitch installed from git[2]. I followed this manual[3] to install fs_curl.</div><div><br></div><div>It seems that pgsql connection is ok, but when configuring users to DB, list_clients doesn't shows users from database (I also tried to load FS without users file configuration). Looking at logs it appears that:</div><div><br></div><div><div>2018-07-02 19:20:49.250075 [CRIT] switch_loadable_module.c:1522 Error Loading module /usr/local/freeswitch/mod/mod_<wbr>xml_curl.so</div><div>**/usr/local/freeswitch/mod/<wbr>mod_xml_curl.so: cannot open shared object file: No such file or directory**</div></div><div><br></div><div>Oviously, I could not install freeswitch-mod-xml-<wbr>curl package, so I simply downloaded the .deb package[4] and extracted file mod_xml_curl.so to /usr/local/freeswitch/mod/ directory.</div><div><br></div><div>Then it appeared an other error that I can't lead</div><div><br></div><div><div>2018-07-02 21:16:47.207969 [CRIT] switch_loadable_module.c:1522 Error Loading module /usr/local/freeswitch/mod/mod_<wbr>xml_curl.so</div><div>**libssl.so.1.0.0: cannot open shared object file: No such file or directory**</div></div><div><br></div><div>I tried to create symlinks calling libssl.so.1.0.0 but it seems it have some problem to read it. The libraries that I have are libssl.so.1.1 and libssl.so.1.0.2 and are located at /usr/lib/x86_64-linux-gnu</div><div><br></div><div>the error continues, then I tried to install libssl that contains libssl.so.1.0.0[5] and finally get mod_xml-curl activates, then appeared and other error:</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:Tahoma,sans-serif,Arial,Helvetica;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">2018-07-02 21:52:23.411646 [ERR] mod_xml_curl.c:315 Received HTTP error 500 trying to fetch <a href="http://localhost/fs_curl/" target="_blank">http://localhost/fs_curl/</a></span><br style="box-sizing:border-box;color:rgb(0,0,0);font-family:Tahoma,sans-serif,Arial,Helvetica;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(0,0,0);font-family:Tahoma,sans-serif,Arial,Helvetica;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">data: [hostname=XXX&section=<wbr>directory&tag_name=&key_name=&<wbr>key_value=&Event-Name=REQUEST_<wbr>PARAMS&Core-UUID=XXX&<wbr>FreeSWITCH-Hostname=XXX&<wbr>FreeSWITCH-Switchname=XXX&<wbr>FreeSWITCH-IPv4=</span><a href="http://10.90.226.83/" rel="noopener noreferrer" style="box-sizing:border-box;background:0px 0px rgb(255,255,255);color:rgb(58,109,153);text-decoration:none;font-family:Tahoma,sans-serif,Arial,Helvetica;white-space:pre-wrap" target="_blank">X</a>XX<span style="color:rgb(0,0,0);font-family:Tahoma,sans-serif,Arial,Helvetica;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">&<wbr>FreeSWITCH-IPv6=%3A%3A1&Event-<wbr>Date-Local=2018-07-02%2021%<wbr>3A52%3A23&Event-Date-GMT=Mon,%<wbr>2002%20Jul%202018%2019%3A52%<wbr>3A23%20GMT&Event-Date-<wbr>Timestamp=1530561143405060&<wbr>Event-Calling-File=sofia.c&<wbr>Event-Calling-Function=launch_<wbr>sofia_worker_thread&Event-<wbr>Calling-Line-Number=3048&<wbr>Event-Sequence=35&purpose=<wbr>gateways&profile=external]</span><br></div><div><span style="color:rgb(0,0,0);font-family:Tahoma,sans-serif,Arial,Helvetica;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(0,0,0);font-family:Tahoma,sans-serif,Arial,Helvetica;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">The apache saids me that got this error:</span></div><div><span style="color:rgb(0,0,0);font-family:Tahoma,sans-serif,Arial,Helvetica;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font color="#000000" face="Tahoma, sans-serif, Arial, Helvetica"><span style="white-space:pre-wrap">[Mon Jul 02 21:55:23.817938 2018] [:error] [pid 27216] [client <a href="http://10.228.192.219:38874" target="_blank">10.228.192.219:38874</a>] PHP Fatal error:  Uncaught Error: Call to undefined function ereg_replace() in /var/www/html/fs_curl/index.<wbr>php:13\nStack trace:\n#0 {main}\n  thrown in /var/www/html/fs_curl/index.<wbr>php on line 13</span></font><br></span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font color="#000000" face="Tahoma, sans-serif, Arial, Helvetica"><span style="white-space:pre-wrap"><br></span></font></span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font color="#000000" face="Tahoma, sans-serif, Arial, Helvetica"><span style="white-space:pre-wrap">I fixed with preg_replace() and gives this error:</span></font></span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font color="#000000" face="Tahoma, sans-serif, Arial, Helvetica"><span style="white-space:pre-wrap"><br></span></font></span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font color="#000000" face="Tahoma, sans-serif, Arial, Helvetica"><div><span style="white-space:pre-wrap">[Mon Jul 02 22:05:53.353522 2018] [:error] [pid 27218] [client ::1:32960] PHP Warning:  preg_replace(): No ending delimiter '^' found in /var/www/html/fs_curl/index.<wbr>php on line 13</span></div><div style="white-space:pre-wrap"><br></div><div style="white-space:pre-wrap">Changing ereg for preg, it only gives a warning and freeswitch don't throw any errors*</div><div style="white-space:pre-wrap"><br></div><div><span style="white-space:pre-wrap">[Mon Jul 02 22:05:53.353522 2018] [:error] [pid 27218] [client ::1:32960] PHP Warning:  preg_replace(): No ending delimiter '^' found in /var/www/html/fs_curl/index.<wbr>php on line 13
</span></div><div><br></div><div><span style="white-space:pre-wrap">* </span><span style="white-space:pre-wrap">yep it do, but on trying to create table schemas to db for example:</span><div style="white-space:normal;font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre-wrap">switch_pgsql.c:415 Query (create index sr_call_id on sip_registrations (call_id)) returned PGRES_FATAL_ERROR</span></div><div style="white-space:normal;font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre-wrap"><br></span></div><div style="white-space:normal;font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre-wrap">Finally I executed fs_cli and listed users, but it appears empty. In database I have created 5 users.</span></div><div style="white-space:normal;font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre-wrap"><br></span></div><div style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre-wrap">freeswitch@freeswitch> list_users 
userid|context|domain|group|<wbr>contact|callgroup|effective_<wbr>caller_id_name|effective_<wbr>caller_id_number

+OK</span><span style="font-size:small;white-space:pre-wrap">
</span></div><div style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre-wrap"><br></span></div><div style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre-wrap"># IN DB</span></div><div style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre-wrap"><br></span></div><div style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre-wrap">freeswitch_db=# select * from directory_domains;
 id |    domain_name     
----+--------------------
  4 | 10.XXX
  1 | <a href="http://crustaci.mydomain.com" target="_blank">crustaci.mydomain.com</a>
(2 rows)
</span></div><div><span style="white-space:pre-wrap"><br></span></div><div style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre-wrap"><br></span></div><div style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre-wrap">freeswitch_db=# select * from directory;
 id | username | domain_id | cache  
----+----------+-----------+--<wbr>------
  1 | 1010     |         1 | 300000
  2 | 1011     |         1 | 300000
  3 | 20000    |         4 |      0
  4 | 20001    |         4 |      0</span></div><div style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre-wrap"> 5  | 20002   |         4  |      0
(4 rows)
</span></div><div><span style="white-space:pre-wrap"><br></span></div><div><div>freeswitch_db=# select * from directory_params;</div><div> id | directory_id | param_name | param_value </div><div>----+--------------+----------<wbr>--+-------------</div><div>  1 |            3 | password   | XXX</div><div>  2 |            4 | password   | XXX</div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">  3 |            4 | password   | XXX</span><br></div><div>(2 rows)</div><div><br></div></div><div style="white-space:pre-wrap"><span style="white-space:pre-wrap">Some ideas for why it is not working?</span></div></div></font></span></div><div><br></div><div>Thanks you much!</div><div><br></div><div>[1] <a href="https://freeswitch.org/stash/projects/FS/repos/freeswitch-contrib/browse/intralanman" target="_blank">https://freeswitch.org/<wbr>stash/projects/FS/repos/<wbr>freeswitch-contrib/browse/<wbr>intralanman</a></div><div>[2] <a href="http://blackhold.nusepas.com/2018/05/26/freeswitch-1-9-en-debian-8-psql/" target="_blank">http://blackhold.nusepas.<wbr>com/2018/05/26/freeswitch-1-9-<wbr>en-debian-8-psql/</a></div><div>[3] <a href="https://saevolgo.blogspot.com/2012/07/freeswitch-with-sip-users-in-mysql-mod.html" target="_blank">https://saevolgo.blogspot.<wbr>com/2012/07/freeswitch-with-<wbr>sip-users-in-mysql-mod.html</a></div><div>[4] <a href="http://files.freeswitch.org/repo/deb/debian-unstable/pool/main/f/freeswitch/freeswitch-mod-xml-curl_1.9.0~1832~25e9376-1~jessie+1_amd64.deb" target="_blank">http://files.freeswitch.<wbr>org/repo/deb/debian-unstable/<wbr>pool/main/f/freeswitch/<wbr>freeswitch-mod-xml-curl_1.9.0~<wbr>1832~25e9376-1~jessie+1_amd64.<wbr>deb</a></div><div>[5] <a href="https://packages.debian.org/wheezy/amd64/libssl1.0.0/download" target="_blank">https://packages.debian.<wbr>org/wheezy/amd64/libssl1.0.0/<wbr>download</a><br clear="all"><div><div class="m_3263809284750872901gmail_signature"><br>- Blackhold<br><a href="http://blackhold.nusepas.com" target="_blank">http://blackhold.nusepas.com</a><span class="HOEnZb"><font color="#888888"><br>@blackhold_<br>~> cal lluitar contra el fort per deixar de ser febles, i contra nosaltres mateixos quan siguem forts (Xirinacs)<br><°((( ><</font></span></div></div>
</div></div>
</blockquote></div><br></div></div>