[Freeswitch-users] Connecting freeswitch to postgresql

Blackhold blackholdmailer at gmail.com
Sat May 26 02:17:45 UTC 2018


The script also works for debian 9. At the bottom of the post I have added
the differences between debian 8 and debian 9 installation.

Thanks a lot! :D


- Blackhold
http://blackhold.nusepas.com
@blackhold_
~> cal lluitar contra el fort per deixar de ser febles, i contra nosaltres
mateixos quan siguem forts (Xirinacs)
<°((( ><

2018-05-26 2:44 GMT+02:00 Blackhold <blackholdmailer at gmail.com>:

> Hi again,
> I have just make a new install using debian 8 and I created a post (in
> spanish), maybe today, maybe tomorrow I'll test with a debian 9.
>
> http://blackhold.nusepas.com/2018/05/26/freeswitch-1-9-en-debian-8-psql/
>
>
> - Blackhold
> http://blackhold.nusepas.com
> @blackhold_
> ~> cal lluitar contra el fort per deixar de ser febles, i contra nosaltres
> mateixos quan siguem forts (Xirinacs)
> <°((( ><
>
> 2018-05-26 0:01 GMT+02:00 Blackhold <blackholdmailer at gmail.com>:
>
>> THAT'S IT!!!
>>
>> all time has no support for psql
>>
>> now on configuring and compiling it creates the tables! \o/
>>
>> hurrah!
>>
>> Thanks you much! I have learnt a lot! :)
>>
>>
>> - Blackhold
>> http://blackhold.nusepas.com
>> @blackhold_
>> ~> cal lluitar contra el fort per deixar de ser febles, i contra
>> nosaltres mateixos quan siguem forts (Xirinacs)
>> <°((( ><
>>
>> 2018-05-25 22:55 GMT+02:00 Blackhold <blackholdmailer at gmail.com>:
>>
>>> maybe on using configure script doesn't configured freeswitch without
>>> PGSQL support?
>>>
>>> https://marc.info/?l=freeswitch-users&m=135482851910677&w=2
>>>
>>> ./configure --enable-core-pgsql-support --no-create --no-recursion
>>>
>>> I have to move from my site a while, in a while I test to configure,
>>> make and make install again...
>>>
>>>
>>> - Blackhold
>>> http://blackhold.nusepas.com
>>> @blackhold_
>>> ~> cal lluitar contra el fort per deixar de ser febles, i contra
>>> nosaltres mateixos quan siguem forts (Xirinacs)
>>> <°((( ><
>>>
>>> 2018-05-25 22:30 GMT+02:00 Blackhold <blackholdmailer at gmail.com>:
>>>
>>>> I revised kvm configuration and firewall is disabled.
>>>>
>>>> also I have set to 1 /proc/sys/net/ipv4/ip_forward and the behaviour is
>>>> the same
>>>>
>>>>
>>>> - Blackhold
>>>> http://blackhold.nusepas.com
>>>> @blackhold_
>>>> ~> cal lluitar contra el fort per deixar de ser febles, i contra
>>>> nosaltres mateixos quan siguem forts (Xirinacs)
>>>> <°((( ><
>>>>
>>>> 2018-05-25 22:22 GMT+02:00 Blackhold <blackholdmailer at gmail.com>:
>>>>
>>>>> nope, debian 8 installed by default using net-install iso.
>>>>>
>>>>> I'm inside a kvm machine
>>>>>
>>>>>
>>>>> - Blackhold
>>>>> http://blackhold.nusepas.com
>>>>> @blackhold_
>>>>> ~> cal lluitar contra el fort per deixar de ser febles, i contra
>>>>> nosaltres mateixos quan siguem forts (Xirinacs)
>>>>> <°((( ><
>>>>>
>>>>> 2018-05-25 22:21 GMT+02:00 Madovsky <infos at madovsky.org>:
>>>>>
>>>>>> any iptables rules activated? SELinux?
>>>>>> On 5/25/2018 1:13 PM, Blackhold wrote:
>>>>>>
>>>>>> root at freeswitch-capa8:/usr/local/freeswitch/log# grep CRIT
>>>>>> freeswitch.log
>>>>>> 2018-05-25 22:11:59.362305 [CRIT] switch_core_sqldb.c:468 Failure!
>>>>>> PGSQL NOT AVAILABLE! Can't connect to DSN hostaddr=127.0.0.1
>>>>>> dbname=freeswitch_db user=freeswitch_user password='XXX' options='-c
>>>>>> client_min_messages=NOTICE' application_name='freeswitch'
>>>>>> 2018-05-25 22:11:59.362669 [CRIT] sofia.c:3130 Cannot Open SQL
>>>>>> Database [internal-ipv6]!
>>>>>> 2018-05-25 22:12:00.362142 [CRIT] switch_core_sqldb.c:468 Failure!
>>>>>> PGSQL NOT AVAILABLE! Can't connect to DSN hostaddr=127.0.0.1
>>>>>> dbname=freeswitch_db user=freeswitch_user password='XXX' options='-c
>>>>>> client_min_messages=NOTICE' application_name='freeswitch'
>>>>>> 2018-05-25 22:12:00.362145 [CRIT] sofia.c:3130 Cannot Open SQL
>>>>>> Database [internal]!
>>>>>> 2018-05-25 22:12:03.021179 [CRIT] switch_core_sqldb.c:468 Failure!
>>>>>> PGSQL NOT AVAILABLE! Can't connect to DSN hostaddr=127.0.0.1
>>>>>> dbname=freeswitch_db user=freeswitch_user password='XXX' options='-c
>>>>>> client_min_messages=NOTICE' application_name='freeswitch'
>>>>>> 2018-05-25 22:12:03.563069 [CRIT] switch_core_sqldb.c:468 Failure!
>>>>>> PGSQL NOT AVAILABLE! Can't connect to DSN hostaddr=127.0.0.1
>>>>>> dbname=freeswitch_db user=freeswitch_user password='XXX' options='-c
>>>>>> client_min_messages=NOTICE' application_name='freeswitch'
>>>>>> 2018-05-25 22:12:03.563076 [CRIT] mod_voicemail.c:774 Cannot open DB!
>>>>>>
>>>>>>
>>>>>>
>>>>>> - Blackhold
>>>>>> http://blackhold.nusepas.com
>>>>>> @blackhold_
>>>>>> ~> cal lluitar contra el fort per deixar de ser febles, i contra
>>>>>> nosaltres mateixos quan siguem forts (Xirinacs)
>>>>>> <°((( ><
>>>>>>
>>>>>> 2018-05-25 21:56 GMT+02:00 Madovsky <infos at madovsky.org>:
>>>>>>
>>>>>>> also turn FS to debug level 7 to 9 to see if it tries to connect to
>>>>>>> the database
>>>>>>> On 5/25/2018 11:18 AM, Michael Jerris wrote:
>>>>>>>
>>>>>>> there is an arg to not create schema, its possible thats default on
>>>>>>> odbc, but I didnt think so.  You’ll need to look at the errors and see if
>>>>>>> its trying to create the schema or not.  If it is and its failing, the
>>>>>>> errors should point you to why.
>>>>>>>
>>>>>>> On May 25, 2018, at 2:15 PM, Blackhold <blackholdmailer at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> no, it still don't. It still don't create tables on turning on
>>>>>>> freeswitch :(
>>>>>>>
>>>>>>>
>>>>>>> - Blackhold
>>>>>>> http://blackhold.nusepas.com
>>>>>>> @blackhold_
>>>>>>> ~> cal lluitar contra el fort per deixar de ser febles, i contra
>>>>>>> nosaltres mateixos quan siguem forts (Xirinacs)
>>>>>>> <°((( ><
>>>>>>>
>>>>>>> 2018-05-25 19:14 GMT+02:00 Michael Jerris <mike at jerris.com>:
>>>>>>>
>>>>>>>> it sounds like its actually working?
>>>>>>>>
>>>>>>>>
>>>>>>>> On May 25, 2018, at 1:07 PM, Blackhold <blackholdmailer at gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> it seems it is not a permissions problem, 'cause I can create and
>>>>>>>> delete a table and insert registries to the table as user I have created
>>>>>>>>
>>>>>>>> postgres at freeswitch-capa8:~/sql$ psql -U freeswitch_user -d
>>>>>>>> freeswitch_db --password
>>>>>>>> Password for user freeswitch_user:
>>>>>>>> psql (9.4.15)
>>>>>>>> Type "help" for help.
>>>>>>>>
>>>>>>>> freeswitch_db=> CREATE TABLE complete (
>>>>>>>> freeswitch_db(>    sticky  INTEGER,
>>>>>>>> freeswitch_db(>    a1  VARCHAR(128),
>>>>>>>> freeswitch_db(>    a2  VARCHAR(128),
>>>>>>>> freeswitch_db(>    a3  VARCHAR(128),
>>>>>>>> freeswitch_db(>    a4  VARCHAR(128),
>>>>>>>> freeswitch_db(>    a5  VARCHAR(128),
>>>>>>>> freeswitch_db(>    a6  VARCHAR(128),
>>>>>>>> freeswitch_db(>    a7  VARCHAR(128),
>>>>>>>> freeswitch_db(>    a8  VARCHAR(128),
>>>>>>>> freeswitch_db(>    a9  VARCHAR(128),
>>>>>>>> freeswitch_db(>    a10 VARCHAR(128),
>>>>>>>> freeswitch_db(>    hostname VARCHAR(256)
>>>>>>>> freeswitch_db(> );
>>>>>>>> CREATE TABLE
>>>>>>>> freeswitch_db=> INSERT INTO "complete"
>>>>>>>> VALUES(0,'console','help','','','','','','','','','freeswitc
>>>>>>>> h-capa8');
>>>>>>>> INSERT 0 1
>>>>>>>> freeswitch_db=> INSERT INTO "complete"
>>>>>>>> VALUES(0,'console','loglevel','','','','','','','','','frees
>>>>>>>> witch-capa8');
>>>>>>>> INSERT 0 1
>>>>>>>> freeswitch_db=> INSERT INTO "complete"
>>>>>>>> VALUES(0,'console','loglevel','help','','','','','','','','f
>>>>>>>> reeswitch-capa8');
>>>>>>>> INSERT 0 1
>>>>>>>> freeswitch_db=> INSERT INTO "complete"
>>>>>>>> VALUES(0,'console','loglevel','console','','','','','','',''
>>>>>>>> ,'freeswitch-capa8');
>>>>>>>> INSERT 0 1
>>>>>>>> freeswitch_db=> INSERT INTO "complete"
>>>>>>>> VALUES(0,'console','loglevel','alert','','','','','','','','
>>>>>>>> freeswitch-capa8');
>>>>>>>> INSERT 0 1
>>>>>>>> freeswitch_db=> INSERT INTO "complete"
>>>>>>>> VALUES(0,'console','loglevel','crit','','','','','','','','f
>>>>>>>> reeswitch-capa8');
>>>>>>>> INSERT 0 1
>>>>>>>> freeswitch_db=> INSERT INTO "complete"
>>>>>>>> VALUES(0,'console','loglevel','err','','','','','','','','fr
>>>>>>>> eeswitch-capa8');
>>>>>>>> INSERT 0 1
>>>>>>>> freeswitch_db=> \dt
>>>>>>>>               List of relations
>>>>>>>>  Schema |   Name   | Type  |      Owner
>>>>>>>> --------+----------+-------+-----------------
>>>>>>>>  public | complete | table | freeswitch_user
>>>>>>>> (1 row)
>>>>>>>>
>>>>>>>> freeswitch_db=> drop table complete;
>>>>>>>> DROP TABLE
>>>>>>>> freeswitch_db=> \dt
>>>>>>>> No relations found.
>>>>>>>>
>>>>>>>>
>>>>>>>> I show the db config in the config files (grouped by config line):
>>>>>>>>
>>>>>>>> root at freeswitch-capa8:/usr/local/freeswitch/conf# grep XXX * -R
>>>>>>>>
>>>>>>>> autoload_configs/switch.conf.xml:    <param name="core-db-dsn"
>>>>>>>> value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch_db
>>>>>>>> user=freeswitch_user password='U8r9BuntD6iryrKK' options='-c
>>>>>>>> client_min_messages=NOTICE'" />
>>>>>>>>
>>>>>>>> autoload_configs/directory.conf.xml:    <param name="odbc-dsn"
>>>>>>>> value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch_db
>>>>>>>> user=freeswitch_user password='XXX' options='-c client_min_messages=NOTICE'
>>>>>>>> application_name='freeswitch'" />
>>>>>>>> autoload_configs/voicemail.conf.xml:    <param name="odbc-dsn"
>>>>>>>> value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch_db
>>>>>>>> user=freeswitch_user password='XXX' options='-c client_min_messages=NOTICE'
>>>>>>>> application_name='freeswitch'" />
>>>>>>>> autoload_configs/cidlookup.conf.xml:    <param name="odbc-dsn"
>>>>>>>> value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch_db
>>>>>>>> user=freeswitch_user password='XXX' options='-c client_min_messages=NOTICE'
>>>>>>>> application_name='freeswitch'" />
>>>>>>>> autoload_configs/db.conf.xml:    <param name="odbc-dsn" value="
>>>>>>>> pgsql://hostaddr=127.0.0.1 dbname=freeswitch_db
>>>>>>>> user=freeswitch_user password='XXX' options='-c client_min_messages=NOTICE'
>>>>>>>> application_name='freeswitch'" />
>>>>>>>> autoload_configs/lcr.conf.xml:    <param name="odbc-dsn" value="
>>>>>>>> pgsql://hostaddr=127.0.0.1 dbname=freeswitch_db
>>>>>>>> user=freeswitch_user password='XXX' options='-c
>>>>>>>> client_min_messages=NOTICE' application_name='freeswitch'" />
>>>>>>>> autoload_configs/callcenter.conf.xml:    <param name="odbc-dsn"
>>>>>>>> value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch_db
>>>>>>>> user=freeswitch_user password='XXX' options='-c
>>>>>>>> client_min_messages=NOTICE' application_name='freeswitch'" />
>>>>>>>> jingle_profiles/server.xml:    <param name="odbc-dsn" value="
>>>>>>>> pgsql://hostaddr=127.0.0.1 dbname=freeswitch_db
>>>>>>>> user=freeswitch_user password='XXX' options='-c
>>>>>>>> client_min_messages=NOTICE' application_name='freeswitch'" />
>>>>>>>> sip_profiles/internal.xml:    <param name="odbc-dsn" value="
>>>>>>>> pgsql://hostaddr=127.0.0.1 dbname=freeswitch_db
>>>>>>>> user=freeswitch_user password='XXX' options='-c
>>>>>>>> client_min_messages=NOTICE' application_name='freeswitch'" />
>>>>>>>> sip_profiles/internal-ipv6.xml:    <param name="odbc-dsn" value="
>>>>>>>> pgsql://hostaddr=127.0.0.1 dbname=freeswitch_db
>>>>>>>> user=freeswitch_user password='XXX' options='-c
>>>>>>>> client_min_messages=NOTICE' application_name='freeswitch'" />
>>>>>>>> skinny_profiles/internal.xml:    <param name="odbc-dsn" value="
>>>>>>>> pgsql://hostaddr=127.0.0.1 dbname=freeswitch_db
>>>>>>>> user=freeswitch_user password='XXX' options='-c
>>>>>>>> client_min_messages=NOTICE' application_name='freeswitch'" />
>>>>>>>>
>>>>>>>> autoload_configs/easyroute.conf.xml:    <param name="db-password"
>>>>>>>> value="XXX"/>
>>>>>>>> autoload_configs/easyroute.conf.xml:    <param name="db-dsn"
>>>>>>>> value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch_db
>>>>>>>> user=freeswitch_user password='XXX' options='-c client_min_messages=NOTICE'
>>>>>>>> application_name='freeswitch'" />
>>>>>>>>
>>>>>>>> autoload_configs/lcr.conf.xml:    <!--<param name="odbc-dsn"
>>>>>>>> value="freeswitch_db:freeswitch_user:U8r9BuntD6iryrKK"/>-->
>>>>>>>> sip_profiles/internal.xml:    <!--<param name="odbc-dsn"
>>>>>>>> value="freeswitch:freeswitch_user:U8r9BuntD6iryrKK"/>-->
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ____________________________________________________________
>>>>>>>> _____________
>>>>>>>> Professional FreeSWITCH Consulting Services:
>>>>>>>> consulting at freeswitch.org
>>>>>>>> http://www.freeswitchsolutions.com
>>>>>>>>
>>>>>>>> Official FreeSWITCH Sites
>>>>>>>> http://www.freeswitch.org
>>>>>>>> http://confluence.freeswitch.org
>>>>>>>> http://www.cluecon.com
>>>>>>>>
>>>>>>>> FreeSWITCH-users mailing list
>>>>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/free
>>>>>>>> switch-users
>>>>>>>> http://www.freeswitch.org
>>>>>>>>
>>>>>>>
>>>>>>> ____________________________________________________________
>>>>>>> _____________
>>>>>>> Professional FreeSWITCH Consulting Services:
>>>>>>> consulting at freeswitch.org
>>>>>>> http://www.freeswitchsolutions.com
>>>>>>>
>>>>>>> Official FreeSWITCH Sites
>>>>>>> http://www.freeswitch.org
>>>>>>> http://confluence.freeswitch.org
>>>>>>> http://www.cluecon.com
>>>>>>>
>>>>>>> FreeSWITCH-users mailing list
>>>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/free
>>>>>>> switch-users
>>>>>>> http://www.freeswitch.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _________________________________________________________________________
>>>>>>> Professional FreeSWITCH Consulting Services:consulting at freeswitch.orghttp://www.freeswitchsolutions.com
>>>>>>>
>>>>>>> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.com
>>>>>>>
>>>>>>> FreeSWITCH-users mailing listFreeSWITCH-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ____________________________________________________________
>>>>>>> _____________
>>>>>>> Professional FreeSWITCH Consulting Services:
>>>>>>> consulting at freeswitch.org
>>>>>>> http://www.freeswitchsolutions.com
>>>>>>>
>>>>>>> Official FreeSWITCH Sites
>>>>>>> http://www.freeswitch.org
>>>>>>> http://confluence.freeswitch.org
>>>>>>> http://www.cluecon.com
>>>>>>>
>>>>>>> FreeSWITCH-users mailing list
>>>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/free
>>>>>>> switch-users
>>>>>>> http://www.freeswitch.org
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _________________________________________________________________________
>>>>>> Professional FreeSWITCH Consulting Services:consulting at freeswitch.orghttp://www.freeswitchsolutions.com
>>>>>>
>>>>>> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.com
>>>>>>
>>>>>> FreeSWITCH-users mailing listFreeSWITCH-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
>>>>>>
>>>>>>
>>>>>>
>>>>>> ____________________________________________________________
>>>>>> _____________
>>>>>> Professional FreeSWITCH Consulting Services:
>>>>>> consulting at freeswitch.org
>>>>>> http://www.freeswitchsolutions.com
>>>>>>
>>>>>> Official FreeSWITCH Sites
>>>>>> http://www.freeswitch.org
>>>>>> http://confluence.freeswitch.org
>>>>>> http://www.cluecon.com
>>>>>>
>>>>>> FreeSWITCH-users mailing list
>>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/free
>>>>>> switch-users
>>>>>> http://www.freeswitch.org
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180526/9df899fb/attachment-0001.html>


More information about the FreeSWITCH-users mailing list