[Freeswitch-users] problem loading fs_curl (contrib)

Blackhold blackholdmailer at gmail.com
Mon Jul 2 20:20:14 UTC 2018


Hi,
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.

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:

2018-07-02 19:20:49.250075 [CRIT] switch_loadable_module.c:1522 Error
Loading module /usr/local/freeswitch/mod/mod_xml_curl.so
**/usr/local/freeswitch/mod/mod_xml_curl.so: cannot open shared object
file: No such file or directory**

Oviously, I could not install freeswitch-mod-xml-curl package, so I simply
downloaded the .deb package[4] and extracted file mod_xml_curl.so
to /usr/local/freeswitch/mod/ directory.

Then it appeared an other error that I can't lead

2018-07-02 21:16:47.207969 [CRIT] switch_loadable_module.c:1522 Error
Loading module /usr/local/freeswitch/mod/mod_xml_curl.so
**libssl.so.1.0.0: cannot open shared object file: No such file or
directory**

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

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:

2018-07-02 21:52:23.411646 [ERR] mod_xml_curl.c:315 Received HTTP error 500
trying to fetch http://localhost/fs_curl/
data:
[hostname=XXX&section=directory&tag_name=&key_name=&key_value=&Event-Name=REQUEST_PARAMS&Core-UUID=XXX&FreeSWITCH-Hostname=XXX&FreeSWITCH-Switchname=XXX&FreeSWITCH-IPv4=
X <http://10.90.226.83/>XX
&FreeSWITCH-IPv6=%3A%3A1&Event-Date-Local=2018-07-02%2021%3A52%3A23&Event-Date-GMT=Mon,%2002%20Jul%202018%2019%3A52%3A23%20GMT&Event-Date-Timestamp=1530561143405060&Event-Calling-File=sofia.c&Event-Calling-Function=launch_sofia_worker_thread&Event-Calling-Line-Number=3048&Event-Sequence=35&purpose=gateways&profile=external]

The apache saids me that got this error:

[Mon Jul 02 21:55:23.817938 2018] [:error] [pid 27216] [client
10.228.192.219:38874] PHP Fatal error: Uncaught Error: Call to undefined
function ereg_replace() in /var/www/html/fs_curl/index.php:13\nStack
trace:\n#0 {main}\n thrown in /var/www/html/fs_curl/index.php on line 13

I fixed with preg_replace() and gives this error:

[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.php on line 13

Changing ereg for preg, it only gives a warning and freeswitch don't throw
any errors*

[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.php on line 13

* yep it do, but on trying to create table schemas to db for example:
switch_pgsql.c:415 Query (create index sr_call_id on sip_registrations
(call_id)) returned PGRES_FATAL_ERROR

Finally I executed fs_cli and listed users, but it appears empty. In
database I have created 5 users.

freeswitch at freeswitch> list_users
userid|context|domain|group|contact|callgroup|effective_caller_id_name|effective_caller_id_number
+OK

# IN DB

freeswitch_db=# select * from directory_domains; id | domain_name
----+-------------------- 4 | 10.XXX 1 | crustaci.mydomain.com (2 rows)


freeswitch_db=# select * from directory; id | username | domain_id | cache
----+----------+-----------+-------- 1 | 1010 | 1 | 300000 2 | 1011 | 1 |
300000 3 | 20000 | 4 | 0 4 | 20001 | 4 | 0
5 | 20002 | 4 | 0 (4 rows)

freeswitch_db=# select * from directory_params;
 id | directory_id | param_name | param_value
----+--------------+------------+-------------
  1 |            3 | password   | XXX
  2 |            4 | password   | XXX
  3 |            4 | password   | XXX
(2 rows)

Some ideas for why it is not working?

Thanks you much!

[1]
https://freeswitch.org/stash/projects/FS/repos/freeswitch-contrib/browse/intralanman
[2] http://blackhold.nusepas.com/2018/05/26/freeswitch-1-9-en-debian-8-psql/
[3]
https://saevolgo.blogspot.com/2012/07/freeswitch-with-sip-users-in-mysql-mod.html
[4]
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
[5] https://packages.debian.org/wheezy/amd64/libssl1.0.0/download

- Blackhold
http://blackhold.nusepas.com
@blackhold_
~> cal lluitar contra el fort per deixar de ser febles, i contra nosaltres
mateixos quan siguem forts (Xirinacs)
<°((( ><
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180702/4f082d5a/attachment-0001.html>


More information about the FreeSWITCH-users mailing list