<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">you shouldn't need to pre-import the tables, if the permissions are right, it should create the tables and indexes for you.<div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 24, 2018, at 3:15 PM, Blackhold <<a href="mailto:blackholdmailer@gmail.com" class="">blackholdmailer@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I continue with tests<div class=""><br class=""></div><div class="">I think I know wich problem I had with errors</div><div class=""><br class=""></div><div class="">I have missed to grant privileges in psql:</div><div class=""><br class=""></div><div class=""><div class="">GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO freeswitch_user;</div><div class="">GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO freeswitch_user;</div></div><div class=""><br class=""></div><div class=""># with tables imported from sqlite it shows (freeswitch runs)</div><div class=""><br class=""></div><div class=""><div class="">root@freeswitch-capa8:/var/log/postgresql# tail -f postgresql-9.4-main.log </div><div class=""><br class=""></div><div class="">2018-05-24 21:03:34 CEST [8623-1] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-2] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index recovery1 on recovery(technology);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-3] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-4] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index recovery2 on recovery(profile_name);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-5] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-6] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index recovery3 on recovery(uuid);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-7] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-8] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index recovery3 on recovery(runtime_uuid);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-9] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-10] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index alias1 on aliases (alias);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-11] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-12] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index tasks1 on tasks (hostname,task_id);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-13] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-14] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index complete1 on complete (a1,hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-15] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-16] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index complete2 on complete (a2,hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-17] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-18] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index complete3 on complete (a3,hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-19] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-20] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index complete4 on complete (a4,hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-21] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-22] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index complete5 on complete (a5,hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-23] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-24] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index complete6 on complete (a6,hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-25] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-26] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index complete7 on complete (a7,hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-27] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-28] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index complete8 on complete (a8,hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-29] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-30] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index complete9 on complete (a9,hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-31] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-32] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index complete10 on complete (a10,hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-33] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-34] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index complete11 on complete (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-35] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-36] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index nat_map_port_proto on nat (port,proto,hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-37] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-38] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index channels1 on channels(hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-39] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-40] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index calls1 on calls(hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-41] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-42] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index chidx1 on channels (hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-43] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-44] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index uuindex on channels (uuid, hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-45] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-46] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index uuindex2 on channels (call_uuid);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-47] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-48] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index callsidx1 on calls (hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-49] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-50] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index eruuindex on calls (caller_uuid, hostname);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-51] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-52] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index eeuuindex on calls (callee_uuid);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-53] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-54] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index eeuuindex2 on calls (call_uuid);EXECUTE "_PLAN0x123ff90"</div><div class="">2018-05-24 21:03:34 CEST [8623-55] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "create" at character 29</div><div class="">2018-05-24 21:03:34 CEST [8623-56] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x123ff90" as create index regindex1 on registrations (reg_user,realm,hostname);EXECUTE "_PLAN0x123ff90"</div></div><div class=""><br class=""></div><div class=""># with a clean database</div><div class=""><br class=""></div><div class="">start dropping last errors, and don't create any table in db. Freeswitch doesn't turns on.</div><div class=""><br class=""></div><div class="">each time I stop freeswitch when it don't runs, it keeps a process running that I have to kill manually</div><div class=""><br class=""></div><div class=""><div class="">root@freeswitch-capa8:/var/log/postgresql#  ps aux |grep free</div><div class="">root      8706 39.6  0.7 141296 15244 ?        S<l  21:08   1:13 /usr/local/freeswitch/bin/freeswitch -nc</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""># with granted permisions if I turn configuration to not use odbc, using psql directly</div><div class=""><br class=""></div><div class="">freeswitch turns on, there's no errors in psql log file and no table was created on db.</div><div class=""><br class=""></div></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature" data-smartmail="gmail_signature"><br class="">- Blackhold<br class=""><a href="http://blackhold.nusepas.com/" target="_blank" class="">http://blackhold.nusepas.com</a><br class="">@blackhold_<br class="">~> cal lluitar contra el fort per deixar de ser febles, i contra nosaltres mateixos quan siguem forts (Xirinacs)<br class=""><°((( ><</div></div>
<br class=""><div class="gmail_quote">2018-05-24 20:31 GMT+02:00 Blackhold <span dir="ltr" class=""><<a href="mailto:blackholdmailer@gmail.com" target="_blank" class="">blackholdmailer@gmail.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""># OK for location of ODBC files<div class=""><br class=""></div><div class=""># output freeswitch using psql (I only edited switch.conf.xml file)</div><div class=""><param name="core-db-dsn" value="<a href="pgsql://hostaddr=127.0" class="">pgsql://hostaddr=127.0</a>.<wbr class="">0.1 dbname=freeswitch_db user=freeswitch_user password='XXX' options='-c client_min_messages=NOTICE'" /> (switch.conf.xml file)<br class=""></div><div class=""><br class=""></div><div class="">I see no errors related on logs (nor freeswitch, nor psql -debug5-), obviously restarted psql to reload config.</div><div class=""><br class=""></div><div class="">in sofia.conf.xml file I found no option to configure it pointing to database</div><div class="">no other config file, except switch.conf.xml has configured database pointing</div><div class=""><br class=""></div><div class="">I tried to configure db.conf.xml file, with switch.conf.xml line but also do nothing</div><div class=""><br class=""></div><div class=""># output freeswtich using odbc</div><div class=""><param name="core-db-dsn" value="freeswitch:freeswitch_<wbr class="">user:XXX"/> (switch.conf.xml file)<br class=""></div><div class=""><br class=""></div><div class="gmail_extra">these are the first lines of postgresql log file</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra"><div class="gmail_extra">2018-05-24 20:23:15 CEST [7518-7] LOG:  received fast shutdown request</div><div class="gmail_extra">2018-05-24 20:23:15 CEST [7518-8] LOG:  aborting any active transactions</div><div class="gmail_extra">2018-05-24 20:23:15 CEST [7548-2] LOG:  autovacuum launcher shutting down</div><div class="gmail_extra">2018-05-24 20:23:15 CEST [7545-1] LOG:  shutting down</div><div class="gmail_extra">2018-05-24 20:23:15 CEST [7545-2] LOG:  database system is shut down</div><div class="gmail_extra">2018-05-24 20:23:16 CEST [7568-1] LOG:  database system was shut down at 2018-05-24 20:23:15 CEST</div><div class="gmail_extra">2018-05-24 20:23:16 CEST [7568-2] LOG:  MultiXact member wraparound protections are now enabled</div><div class="gmail_extra">2018-05-24 20:23:16 CEST [7567-1] LOG:  database system is ready to accept connections</div><div class="gmail_extra">2018-05-24 20:23:16 CEST [7572-1] LOG:  autovacuum launcher started</div><div class="gmail_extra">2018-05-24 20:23:16 CEST [7574-1] [unknown]@[unknown] LOG:  incomplete startup packet</div><div class="gmail_extra">2018-05-24 20:23:39 CEST [7596-1] freeswitch_user@freeswitch_db ERROR:  relation "channels" does not exist at character 40</div><div class="gmail_extra">2018-05-24 20:23:39 CEST [7596-2] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x9f3f90" as delete from channels where hostname='freeswitch-capa8';<wbr class="">EXECUTE "_PLAN0x9f3f90"</div><div class="gmail_extra">2018-05-24 20:23:39 CEST [7596-3] freeswitch_user@freeswitch_db ERROR:  relation "calls" does not exist at character 40</div><div class="gmail_extra">2018-05-24 20:23:39 CEST [7596-4] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x9f3f90" as delete from calls where hostname='freeswitch-capa8';<wbr class="">EXECUTE "_PLAN0x9f3f90"</div><div class="gmail_extra">2018-05-24 20:23:39 CEST [7596-5] freeswitch_user@freeswitch_db ERROR:  relation "tasks" does not exist at character 40</div><div class="gmail_extra">2018-05-24 20:23:39 CEST [7596-6] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x9f3f90" as delete from tasks where hostname='freeswitch-capa8';<wbr class="">EXECUTE "_PLAN0x9f3f90"</div><div class="gmail_extra">2018-05-24 20:23:39 CEST [7596-7] freeswitch_user@freeswitch_db ERROR:  relation "aliases" does not exist at character 49</div><div class="gmail_extra">2018-05-24 20:23:39 CEST [7596-8] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x9f3f90" as select hostname from aliases;EXECUTE "_PLAN0x9f3f90"</div><div class="gmail_extra">2018-05-24 20:23:39 CEST [7596-9] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "DROP" at character 28</div><div class="gmail_extra">2018-05-24 20:23:39 CEST [7596-10] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x9f3f90" as DROP TABLE aliases;EXECUTE "_PLAN0x9f3f90"</div><div class="gmail_extra">2018-05-24 20:23:39 CEST [7596-11] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "CREATE" at character 28</div><div class="gmail_extra">2018-05-24 20:23:39 CEST [7596-12] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x9f3f90" as CREATE TABLE aliases (</div><div class="gmail_extra">           sticky  INTEGER,</div><div class="gmail_extra">           alias  VARCHAR(128),</div><div class="gmail_extra">           command  VARCHAR(4096),</div><div class="gmail_extra">           hostname VARCHAR(256)</div><div class="gmail_extra">        );</div><div class="gmail_extra">        ;EXECUTE "_PLAN0x9f3f90"</div><div class=""><br class=""></div><div class="">and now freeswitch isn't able to run.</div><div class=""><br class=""></div><div class="">If I enable odbc trace in odbcinst.ini</div><div class=""><br class=""></div><div class=""><div class="">Trace=Yes</div><div class="">TraceFile=/var/log/odbctrace.<wbr class="">log</div></div><div class=""><br class=""></div><div class="">Also there's no output....</div><div class=""><br class=""></div><div class="">In freeswitch log also there's nothing about what is happening :(</div><span class=""><div class=""><br class=""></div><div class=""><div class="m_1464568345192727893gmail_signature"><br class="">- Blackhold<br class=""><a href="http://blackhold.nusepas.com/" target="_blank" class="">http://blackhold.nusepas.com</a><br class="">@blackhold_<br class="">~> cal lluitar contra el fort per deixar de ser febles, i contra nosaltres mateixos quan siguem forts (Xirinacs)<br class=""><°((( ><</div></div>
<br class=""></span><div class=""><div class="h5"><div class="gmail_quote">2018-05-24 19:30 GMT+02:00 Michael Jerris <span dir="ltr" class=""><<a href="mailto:mike@jerris.com" target="_blank" class="">mike@jerris.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="">but that table layout is like that because you imported the tables, i was asking what is in the recreated sqlite ones.  If it fails to connect like you later describe, its going to fall back, you should see stuff in the fs logs on startup about this.  the odbc configs go in the normal place they go in the os, not in fs specific dirs.  Those errors tell me something is up, but not sure what, might need to turn on some debug on pg side to see.  some of our tests like to see if table schema is right throw errors then we act on them, if you restart a second time you should get a more useful set of errors.<div class=""><div class="m_1464568345192727893gmail-h5"><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On May 24, 2018, at 1:11 PM, Blackhold <<a href="mailto:blackholdmailer@gmail.com" target="_blank" class="">blackholdmailer@gmail.com</a>> wrote:</div><br class="m_1464568345192727893gmail-m_3360575814196352002Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi,<div class="">The tables are:</div><div class=""><br class=""></div><div class=""><div class="">ostgres@freeswitch-capa8:~/sql<wbr class="">$ psql freeswitch_db</div><div class="">freeswitch_db-# \dt</div><div class=""><br class=""></div><div class="">                        List of relations</div><div class=""> Schema |                Name                 | Type  |  Owner   </div><div class="">--------+---------------------<wbr class="">----------------+-------+-----<wbr class="">-----</div><div class=""> public | aliases                             | table | postgres</div><div class=""> public | calls                               | table | postgres</div><div class=""> public | channels                            | table | postgres</div><div class=""> public | complete                            | table | postgres</div><div class=""> public | db_data                             | table | postgres</div><div class=""> public | fifo_bridge                         | table | postgres</div><div class=""> public | fifo_callers                        | table | postgres</div><div class=""> public | fifo_outbound                       | table | postgres</div><div class=""> public | group_data                          | table | postgres</div><div class=""> public | interfaces                          | table | postgres</div><div class=""> public | json_store                          | table | postgres</div><div class=""> public | limit_data                          | table | postgres</div><div class=""> public | nat                                 | table | postgres</div><div class=""> public | recovery                            | table | postgres</div><div class=""> public | registrations                       | table | postgres</div><div class=""> public | sip_authentication                  | table | postgres</div><div class=""> public | sip_dialogs                         | table | postgres</div><div class=""> public | sip_presence                        | table | postgres</div><div class=""> public | sip_registrations                   | table | postgres</div><div class=""> public | sip_shared_appearance_dialogs       | table | postgres</div><div class=""> public | sip_shared_appearance_subscrip<wbr class="">tions | table | postgres</div><div class=""> public | sip_subscriptions                   | table | postgres</div><div class=""> public | tasks                               | table | postgres</div><div class=""> public | voicemail_msgs                      | table | postgres</div><div class=""> public | voicemail_prefs                     | table | postgres</div><div class="">(25 rows)</div></div><div class=""><br class=""></div><div class="">I continued testing and found that if I configure switch.conf.xml file like this:</div><div class=""><br class=""></div><div class=""><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class=""><param name="core-db-dsn" value="<a class="">pgsql://hostaddr=127.0</a>.</span><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class=""><wbr class="">0.1 dbname=freeswitch_db user=freeswitch_user password='****' options='-c client_min_messages=NOTICE'" /></span><br class=""></div><div class=""><br class=""></div><div class="">When I turn on freeswitch, postgresql don't output nothing. Then I tried to configure freeswitch using odbc I then YES I get something in postgresql logs</div><div class=""><br class=""></div><div class="">For odbc I have something not clear, it is mandatory to put files in /usr/local/freeswitch/etc ? or leaving them at default directory (/etc) is enough?</div><div class=""><br class=""></div><div class="">Here I show the config of odbc files:</div><div class=""><div class="">root@freeswitch-capa8:/etc# cat odbc.ini </div><div class="">[freeswitch]</div><div class="">; WARNING: The old psql odbc driver psqlodbc.so is now renamed psqlodbcw.so</div><div class="">; in version 08.x. Note that the library can also be installed under an other</div><div class="">; path than /usr/local/lib/ following your installation.</div><div class="">; Driver = /usr/lib64/odbc/psqlodbcw.so</div><div class="">; Driver = /usr/lib/x86_64-linux-gnu/odbc<wbr class="">/psqlodbca.so</div><div class="">Driver = /usr/lib/x86_64-linux-gnu/odbc<wbr class="">/psqlodbcw.so</div><div class="">Description=Connection to LDAP/POSTGRESQL</div><div class="">Servername=localhost </div><div class="">Port=5432 </div><div class="">Protocol=6.4</div><div class="">FetchBufferSize=99</div><div class="">Username=freeswitch_user</div><div class="">Password=XXX</div><div class="">Database=freeswitch_db</div><div class="">ReadOnly=no</div><div class="">Debug=0</div><div class="">CommLog=0</div></div><div class=""><br class=""></div><div class=""><div class="">root@freeswitch-capa8:/etc# cat odbcinst.ini </div><div class="">[PostgreSQL]</div><div class="">Description = PostgreSQL driver for Linux & Win32</div><div class="">;Driver = /usr/lib64/odbc/psqlodbcw.so</div><div class="">Driver = /usr/lib/x86_64-linux-gnu/odbc<wbr class="">/psqlodbcw.so</div><div class="">Threading = 0</div><div class="">MaxLongVarcharSize=65536</div></div><div class=""><br class=""></div><div class="">And then connect to psql through odbc</div><div class=""><br class=""></div><div class=""><div class="">root@freeswitch-capa8:/etc# isql -v freeswitch</div><div class="">+-----------------------------<wbr class="">----------+</div><div class="">| Connected!                            |</div><div class="">|                                       |</div><div class="">| sql-statement                         |</div><div class="">| help [tablename]                      |</div><div class="">| quit                                  |</div><div class="">|                                       |</div><div class="">+-----------------------------<wbr class="">----------+</div><div class="">SQL> </div></div><div class=""><br class=""></div><div class="">Then in file switch.conf.xml I changed db connection configuration</div><div class=""><br class=""></div><div class=""><div class="">root@freeswitch-capa8:/usr/loc<wbr class="">al/freeswitch/conf/autoload_<wbr class="">configs# cat switch.conf.xml |grep core-db-dsn</div><div class="">    <param name="core-db-dsn" value="<a class="">pgsql://hostaddr=127.0.<wbr class="">0.1</a> dbname=freeswitch_db user=freeswitch_user password='XXX' options='-c client_min_messages=NOTICE'" /></div><div class="">    <!--<param name="core-db-dsn" value="freeswitch:freeswitch_u<wbr class="">ser:XXX"/>--></div></div><div class=""><br class=""></div><div class="">Last night SwK user at freenode channel told me that freeswitch on turning on, it creates tables at database (thanks SwK).</div><div class=""><br class=""></div><div class="">I spect that configuration of odbc is working but drops lot of errors (here you have some lines):</div><div class=""><br class=""></div><div class=""><div class="">2018-05-24 02:03:25 CEST [3099-338780] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x140bf90" as CREATE TABLE nat (</div><div class=""><span style="white-space:pre-wrap" class="">     </span>   sticky  INTEGER,</div><div class=""><span style="white-space:pre-wrap" class="">         </span>port<span style="white-space:pre-wrap" class=""> </span>INTEGER,</div><div class=""><span style="white-space:pre-wrap" class="">           </span>proto<span style="white-space:pre-wrap" class="">        </span>INTEGER,</div><div class=""><span style="white-space:pre-wrap" class="">   </span>   hostname VARCHAR(256)</div><div class=""><span style="white-space:pre-wrap" class=""> </span>);</div><div class=""><span style="white-space:pre-wrap" class=""> </span>;EXECUTE "_PLAN0x140bf90"</div><div class="">2018-05-24 02:03:25 CEST [3099-338781] freeswitch_user@freeswitch_db WARNING:  there is already a transaction in progress</div><div class="">2018-05-24 02:03:25 CEST [3099-338782] freeswitch_user@freeswitch_db ERROR:  relation "registrations" does not exist at character 41</div><div class="">2018-05-24 02:03:25 CEST [3099-338783] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x140bf90" as delete from registrations where reg_user='';EXECUTE "_PLAN0x140bf90"</div><div class="">2018-05-24 02:03:25 CEST [3099-338784] freeswitch_user@freeswitch_db WARNING:  there is already a transaction in progress</div><div class="">2018-05-24 02:03:25 CEST [3099-338785] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "DROP" at character 29</div><div class="">2018-05-24 02:03:25 CEST [3099-338786] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x140bf90" as DROP TABLE registrations;EXECUTE "_PLAN0x140bf90"</div><div class="">2018-05-24 02:03:25 CEST [3099-338787] freeswitch_user@freeswitch_db WARNING:  there is already a transaction in progress</div><div class="">2018-05-24 02:03:25 CEST [3099-338788] freeswitch_user@freeswitch_db ERROR:  syntax error at or near "CREATE" at character 29</div><div class="">2018-05-24 02:03:25 CEST [3099-338789] freeswitch_user@freeswitch_db STATEMENT:  PREPARE "_PLAN0x140bf90" as CREATE TABLE registrations (</div><div class=""><span style="white-space:pre-wrap" class="">  </span>   reg_user      VARCHAR(256),</div><div class=""><span style="white-space:pre-wrap" class="">    </span>   realm     VARCHAR(256),</div><div class=""><span style="white-space:pre-wrap" class="">        </span>   token     VARCHAR(256),</div><div class=""><span style="white-space:pre-wrap" class="">        </span>   url      TEXT,</div><div class=""><span style="white-space:pre-wrap" class=""> </span>   expires  INTEGER,</div><div class=""><span style="white-space:pre-wrap" class="">        </span>   network_ip VARCHAR(256),</div><div class=""><span style="white-space:pre-wrap" class="">      </span>   network_port VARCHAR(256),</div><div class=""><span style="white-space:pre-wrap" class="">    </span>   network_proto VARCHAR(256),</div><div class=""><span style="white-space:pre-wrap" class="">   </span>   hostname VARCHAR(256),</div><div class=""><span style="white-space:pre-wrap" class="">        </span>   metadata VARCHAR(256)</div><div class=""><span style="white-space:pre-wrap" class=""> </span>);</div><div class=""><span style="white-space:pre-wrap" class=""> </span>;EXECUTE "_PLAN0x140bf90"</div><div class="">2018-05-24 02:03:25 CEST [3099-338790] freeswitch_user@freeswitch_db WARNING:  there is already a transaction in progress</div><div class="">2018-05-24 02:03:25 CEST [3099-338791] freeswitch_user@freeswitch_db LOG:  unexpected EOF on client connection with an open transaction</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I tested with tables in psql database and without tables in psql database.</div><div class=""><span style="color:rgb(80,0,80);font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="color:rgb(80,0,80);font-size:12.8px" class="">freeswitch@freeswitch-capa8> version</span><br class=""></div><div class=""><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class="">FreeSWITCH Version 1.9.0+git~20180516T211208Z~</span><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class="">3c7<wbr class="">db639fd~64bit (git 3c7db63 2018-05-16 21:12:08Z 64bit)</span><br class=""></div><div class=""><br class=""></div><div class="">As I told in last mail, I'm working with last git version.</div><div class=""><br class=""></div><div class="">Then I have a last question, related to that (db), when it will work, all mods will save the information to pgsql or a mix some to sqlite and some to pgsql? I saw in other files the availibility to configure also db, like <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class="">/usr/local/freeswitch/con<wbr class="">f/sip_profiles/internal.xml</span></div><div class=""><br class=""></div><div class=""><div class="">root@freeswitch-capa8:/usr/loc<wbr class="">al/freeswitch/conf# cat /usr/local/freeswitch/conf/sip<wbr class="">_profiles/internal.xml |grep db</div><div class="">    <!-- Name of the db to use for this profile --></div><div class="">    <!--<param name="dbname" value="share_presence"/>--></div><div class="">    <!--<param name="odbc-dsn" value="dsn:user:pass"/>--></div><div class="">    <!--<param name="odbc-dsn" value="freeswitch:freeswitch_u<wbr class="">ser:XXX"/>--></div><div class="">    <!--    <param name="odbc-dsn" value="<a class="">pgsql://hostaddr=127.0.<wbr class="">0.1</a> dbname=freeswitch_db user=freeswitch_user password='XXX' options='-c client_min_messages=NOTICE' application_name='freeswitch'" /> --></div><div class="">    <!--all inbound reg will stored in the db using this domain --></div><div class="">    <param name="force-register-db-domain<wbr class="">" value="$${domain}"/></div></div><div class=""><br class=""></div><div class="">The config you see in the mail is the last configuration I defined. Yesterday I get lost with wich config work or wich one no...</div><div class=""><br class=""></div><div class="">I feel I'm almost at end of this installation! I'm doing a step by step manual in spanish to how to install last version of freeswitch, this will be public and if you want I could upload to wiki.</div><div class=""><br class=""></div><div class="">Thanks you much for your help :)</div><div class=""><br class=""></div><div class="">References: </div><div class=""><a href="https://freeswitch.org/confluence/display/FREESWITCH/PostgreSQL+in+the+core" target="_blank" class="">https://freeswitch.org/conflue<wbr class="">nce/display/FREESWITCH/Postgre<wbr class="">SQL+in+the+core</a></div><div class=""><a href="https://freeswitch.org/confluence/display/FREESWITCH/ODBC+DSN" target="_blank" class="">https://freeswitch.org/conflue<wbr class="">nce/display/FREESWITCH/ODBC+<wbr class="">DSN</a><br class=""></div><div class=""><a href="https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+Databases" target="_blank" class="">https://freeswitch.org/conflue<wbr class="">nce/display/FREESWITCH/FreeSWI<wbr class="">TCH+Databases</a><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="m_1464568345192727893gmail-m_3360575814196352002gmail_signature"><br class="">- Blackhold<br class=""><a href="http://blackhold.nusepas.com/" target="_blank" class="">http://blackhold.nusepas.com</a><br class="">@blackhold_<br class="">~> cal lluitar contra el fort per deixar de ser febles, i contra nosaltres mateixos quan siguem forts (Xirinacs)<br class=""><°((( ><</div></div>
<br class=""><div class="gmail_quote">2018-05-24 18:21 GMT+02:00 Michael Jerris <span dir="ltr" class=""><<a href="mailto:mike@jerris.com" target="_blank" class="">mike@jerris.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">what tables are ending up in the recreated sqlite db?  You need to set it for the modules that use sqlite too (like for mod_sofia).  we have a global var for this in default configs.<br class="">
<span class=""><br class="">
> On May 23, 2018, at 6:13 PM, Blackhold <<a href="mailto:blackholdmailer@gmail.com" target="_blank" class="">blackholdmailer@gmail.com</a>> wrote:<br class="">
> <br class="">
> Hi,<br class="">
> I have just installed freeswitch 1.9<br class="">
> <br class="">
> freeswitch@freeswitch-capa8> version<br class="">
> FreeSWITCH Version 1.9.0+git~20180516T211208Z~3c7<wbr class="">db639fd~64bit (git 3c7db63 2018-05-16 21:12:08Z 64bit)<br class="">
> <br class="">
> And I'm trying to freeswitch use postgresql instead sqlitedb.<br class="">
> <br class="">
> I have configured the file switch.conf.xml of /usr/local/freeswitch/conf/aut<wbr class="">oload_configs with uncomenting and configuring this line<br class="">
> <br class="">
>     <param name="core-db-dsn" value="<a class="">pgsql://hostaddr=127.0</a>.<wbr class="">0.1 dbname=freeswitch_db user=freeswitch_user password='****' options='-c client_min_messages=NOTICE'" /><br class="">
> <br class="">
> then I exported all sqlitedbs to sql and then imported to a database that I have created in postgresql<br class="">
> <br class="">
> I have run again /etc/init.d/freeswitch.sh start<br class="">
> <br class="">
> But seems it still is taking sqlitedb.<br class="">
> <br class="">
> I tried to move the sqlitedbs files to other side and turned on again freeswitch, but it creates sqlitedbs again.<br class="">
> <br class="">
> What I'm missing? what I'm doing wrong? what could I check?<br class="">
<br class="">
<br class="">
</span>______________________________<wbr class="">______________________________<wbr class="">_____________<br class="">
Professional FreeSWITCH Consulting Services:<br class="">
<a href="mailto:consulting@freeswitch.org" target="_blank" class="">consulting@freeswitch.org</a><br class="">
<a href="http://www.freeswitchsolutions.com/" rel="noreferrer" target="_blank" class="">http://www.freeswitchsolutions<wbr class="">.com</a><br class="">
<br class="">
Official FreeSWITCH Sites<br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class="">
<a href="http://confluence.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://confluence.freeswitch.o<wbr class="">rg</a><br class="">
<a href="http://www.cluecon.com/" rel="noreferrer" target="_blank" class="">http://www.cluecon.com</a><br class="">
<br class="">
FreeSWITCH-users mailing list<br class="">
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" class="">FreeSWITCH-users@lists.freeswi<wbr class="">tch.org</a><br class="">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/ma<wbr class="">ilman/listinfo/freeswitch-user<wbr class="">s</a><br class="">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.frees<wbr class="">witch.org/mailman/options/free<wbr class="">switch-users</a><br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a></blockquote></div><br class=""></div>
______________________________<wbr class="">______________________________<wbr class="">_____________<br class="">Professional FreeSWITCH Consulting Services:<br class=""><a href="mailto:consulting@freeswitch.org" target="_blank" class="">consulting@freeswitch.org</a><br class=""><a href="http://www.freeswitchsolutions.com/" target="_blank" class="">http://www.freeswitchsolutions<wbr class="">.com</a><br class=""><br class="">Official FreeSWITCH Sites<br class=""><a href="http://www.freeswitch.org/" target="_blank" class="">http://www.freeswitch.org</a><br class=""><a href="http://confluence.freeswitch.org/" target="_blank" class="">http://confluence.freeswitch.o<wbr class="">rg</a><br class=""><a href="http://www.cluecon.com/" target="_blank" class="">http://www.cluecon.com</a><br class=""><br class="">FreeSWITCH-users mailing list<br class=""><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" class="">FreeSWITCH-users@lists.freeswi<wbr class="">tch.org</a><br class=""><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank" class="">http://lists.freeswitch.org/ma<wbr class="">ilman/listinfo/freeswitch-user<wbr class="">s</a><br class="">UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" class="">http://lists.frees<wbr class="">witch.org/mailman/options/<wbr class="">freeswitch-users</a><br class=""><a href="http://www.freeswitch.org/" target="_blank" class="">http://www.freeswitch.org</a></div></blockquote></div><br class=""></div></div></div><br class="">______________________________<wbr class="">______________________________<wbr class="">_____________<br class="">
Professional FreeSWITCH Consulting Services:<br class="">
<a href="mailto:consulting@freeswitch.org" target="_blank" class="">consulting@freeswitch.org</a><br class="">
<a href="http://www.freeswitchsolutions.com/" rel="noreferrer" target="_blank" class="">http://www.freeswitchsolutions<wbr class="">.com</a><br class="">
<br class="">
Official FreeSWITCH Sites<br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class="">
<a href="http://confluence.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://confluence.freeswitch.o<wbr class="">rg</a><br class="">
<a href="http://www.cluecon.com/" rel="noreferrer" target="_blank" class="">http://www.cluecon.com</a><br class="">
<br class="">
FreeSWITCH-users mailing list<br class="">
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" class="">FreeSWITCH-users@lists.freeswi<wbr class="">tch.org</a><br class="">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/ma<wbr class="">ilman/listinfo/freeswitch-user<wbr class="">s</a><br class="">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.frees<wbr class="">witch.org/mailman/options/<wbr class="">freeswitch-users</a><br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class=""></blockquote></div><br class=""></div></div></div></div>
</blockquote></div><br class=""></div>
_________________________________________________________________________<br class="">Professional FreeSWITCH Consulting Services:<br class=""><a href="mailto:consulting@freeswitch.org" class="">consulting@freeswitch.org</a><br class="">http://www.freeswitchsolutions.com<br class=""><br class="">Official FreeSWITCH Sites<br class="">http://www.freeswitch.org<br class="">http://confluence.freeswitch.org<br class="">http://www.cluecon.com<br class=""><br class="">FreeSWITCH-users mailing list<br class="">FreeSWITCH-users@lists.freeswitch.org<br class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br class="">UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br class="">http://www.freeswitch.org</div></blockquote></div><br class=""></div></body></html>