<div dir="ltr">nope, it is not able to create stuff<div><br></div><div>now I also have enabled that in switch.conf.xml</div><div><br></div><div><div> <param name="auto-create-schemas" value="true"/></div><div> <param name="auto-clear-sql" value="true"/></div></div><div><br></div><div>tested with odbc and directly with psql and behaviour is the same.</div><div><br></div><div>for psql the procedure I have followed is</div><div><br></div><div><div>root@freeswitch-capa8:~# su - postgres</div><div><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">root@freeswitch-capa8:~#<span> </span></span>postgres@freeswitch-capa8:~$ createuser freeswitch_user</div></div><div><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">root@freeswitch-capa8:~#<span> </span></span>createdb -O freeswitch_user freeswitch_db<br></div><div><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">root@freeswitch-capa8:~#<span> </span></span>psql freeswitch_db<br></div><div>freeswitch_db=# ALTER USER freeswitch_user WITH PASSWORD 'XXX';<br></div><div>freeswitch_db=# GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO freeswitch_user;<br></div><div>freeswitch_db=# GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO freeswitch_user;<br></div><div><br></div><div>the most beatiful was with odbc + tables created... in the last mail... freeswitch turned on, in other ways freeswitch doesn't turns on.</div><div><br></div><div>logs doesn't talk about permissions....</div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><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-05-24 21:20 GMT+02:00 Michael Jerris <span dir="ltr"><<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">you shouldn't need to pre-import the tables, if the permissions are right, it should create the tables and indexes for you.<div><div class="h5"><div><br><div><br><blockquote type="cite"><div>On May 24, 2018, at 3:15 PM, Blackhold <<a href="mailto:blackholdmailer@gmail.com" target="_blank">blackholdmailer@gmail.com</a>> wrote:</div><br class="m_4393266532543739197Apple-interchange-newline"><div><div dir="ltr">I continue with tests<div><br></div><div>I think I know wich problem I had with errors</div><div><br></div><div>I have missed to grant privileges in psql:</div><div><br></div><div><div>GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO freeswitch_user;</div><div>GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO freeswitch_user;</div></div><div><br></div><div># with tables imported from sqlite it shows (freeswitch runs)</div><div><br></div><div><div>root@freeswitch-capa8:/var/<wbr>log/postgresql# tail -f postgresql-9.4-main.log </div><div><br></div><div>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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,<wbr>a10,hostname);EXECUTE "_PLAN0x123ff90"</div><div>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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>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);<wbr>EXECUTE "_PLAN0x123ff90"</div></div><div><br></div><div># with a clean database</div><div><br></div><div>start dropping last errors, and don't create any table in db. Freeswitch doesn't turns on.</div><div><br></div><div>each time I stop freeswitch when it don't runs, it keeps a process running that I have to kill manually</div><div><br></div><div><div>root@freeswitch-capa8:/var/<wbr>log/postgresql# ps aux |grep free</div><div>root 8706 39.6 0.7 141296 15244 ? S<l 21:08 1:13 /usr/local/freeswitch/bin/<wbr>freeswitch -nc</div></div><div><br></div><div><br></div><div># with granted permisions if I turn configuration to not use odbc, using psql directly</div><div><br></div><div>freeswitch turns on, there's no errors in psql log file and no table was created on db.</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_4393266532543739197gmail_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-05-24 20:31 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"># OK for location of ODBC files<div><br></div><div># output freeswitch using psql (I only edited switch.conf.xml file)</div><div><param name="core-db-dsn" value="<a>pgsql://hostaddr=127.0</a>.<wbr>0.1 dbname=freeswitch_db user=freeswitch_user password='XXX' options='-c client_min_messages=NOTICE'" /> (switch.conf.xml file)<br></div><div><br></div><div>I see no errors related on logs (nor freeswitch, nor psql -debug5-), obviously restarted psql to reload config.</div><div><br></div><div>in sofia.conf.xml file I found no option to configure it pointing to database</div><div>no other config file, except switch.conf.xml has configured database pointing</div><div><br></div><div>I tried to configure db.conf.xml file, with switch.conf.xml line but also do nothing</div><div><br></div><div># output freeswtich using odbc</div><div><param name="core-db-dsn" value="freeswitch:freeswitch_u<wbr>ser:XXX"/> (switch.conf.xml file)<br></div><div><br></div><div class="gmail_extra">these are the first lines of postgresql log file</div><div class="gmail_extra"><br></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';EX<wbr>ECUTE "_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';EX<wbr>ECUTE "_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';EX<wbr>ECUTE "_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><br></div><div>and now freeswitch isn't able to run.</div><div><br></div><div>If I enable odbc trace in odbcinst.ini</div><div><br></div><div><div>Trace=Yes</div><div>TraceFile=/var/log/odbctrace.l<wbr>og</div></div><div><br></div><div>Also there's no output....</div><div><br></div><div>In freeswitch log also there's nothing about what is happening :(</div><span><div><br></div><div><div class="m_4393266532543739197m_1464568345192727893gmail_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></span><div><div class="m_4393266532543739197h5"><div class="gmail_quote">2018-05-24 19:30 GMT+02:00 Michael Jerris <span dir="ltr"><<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>></span>:<br><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">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><div class="m_4393266532543739197m_1464568345192727893gmail-h5"><br><div><br><blockquote type="cite"><div>On May 24, 2018, at 1:11 PM, Blackhold <<a href="mailto:blackholdmailer@gmail.com" target="_blank">blackholdmailer@gmail.com</a>> wrote:</div><br class="m_4393266532543739197m_1464568345192727893gmail-m_3360575814196352002Apple-interchange-newline"><div><div dir="ltr">Hi,<div>The tables are:</div><div><br></div><div><div>ostgres@freeswitch-capa8:~/sql<wbr>$ psql freeswitch_db</div><div>freeswitch_db-# \dt</div><div><br></div><div> List of relations</div><div> Schema | Name | Type | Owner </div><div>--------+---------------------<wbr>----------------+-------+-----<wbr>-----</div><div> public | aliases | table | postgres</div><div> public | calls | table | postgres</div><div> public | channels | table | postgres</div><div> public | complete | table | postgres</div><div> public | db_data | table | postgres</div><div> public | fifo_bridge | table | postgres</div><div> public | fifo_callers | table | postgres</div><div> public | fifo_outbound | table | postgres</div><div> public | group_data | table | postgres</div><div> public | interfaces | table | postgres</div><div> public | json_store | table | postgres</div><div> public | limit_data | table | postgres</div><div> public | nat | table | postgres</div><div> public | recovery | table | postgres</div><div> public | registrations | table | postgres</div><div> public | sip_authentication | table | postgres</div><div> public | sip_dialogs | table | postgres</div><div> public | sip_presence | table | postgres</div><div> public | sip_registrations | table | postgres</div><div> public | sip_shared_appearance_dialogs | table | postgres</div><div> public | sip_shared_appearance_subscrip<wbr>tions | table | postgres</div><div> public | sip_subscriptions | table | postgres</div><div> public | tasks | table | postgres</div><div> public | voicemail_msgs | table | postgres</div><div> public | voicemail_prefs | table | postgres</div><div>(25 rows)</div></div><div><br></div><div>I continued testing and found that if I configure switch.conf.xml file like this:</div><div><br></div><div><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"><param name="core-db-dsn" value="<a>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"><wbr>0.1 dbname=freeswitch_db user=freeswitch_user password='****' options='-c client_min_messages=NOTICE'" /></span><br></div><div><br></div><div>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><br></div><div>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><br></div><div>Here I show the config of odbc files:</div><div><div>root@freeswitch-capa8:/etc# cat odbc.ini </div><div>[freeswitch]</div><div>; WARNING: The old psql odbc driver psqlodbc.so is now renamed psqlodbcw.so</div><div>; in version 08.x. Note that the library can also be installed under an other</div><div>; path than /usr/local/lib/ following your installation.</div><div>; Driver = /usr/lib64/odbc/psqlodbcw.so</div><div>; Driver = /usr/lib/x86_64-linux-gnu/odbc<wbr>/psqlodbca.so</div><div>Driver = /usr/lib/x86_64-linux-gnu/odbc<wbr>/psqlodbcw.so</div><div>Description=Connection to LDAP/POSTGRESQL</div><div>Servername=localhost </div><div>Port=5432 </div><div>Protocol=6.4</div><div>FetchBufferSize=99</div><div>Username=freeswitch_user</div><div>Password=XXX</div><div>Database=freeswitch_db</div><div>ReadOnly=no</div><div>Debug=0</div><div>CommLog=0</div></div><div><br></div><div><div>root@freeswitch-capa8:/etc# cat odbcinst.ini </div><div>[PostgreSQL]</div><div>Description = PostgreSQL driver for Linux & Win32</div><div>;Driver = /usr/lib64/odbc/psqlodbcw.so</div><div>Driver = /usr/lib/x86_64-linux-gnu/odbc<wbr>/psqlodbcw.so</div><div>Threading = 0</div><div>MaxLongVarcharSize=65536</div></div><div><br></div><div>And then connect to psql through odbc</div><div><br></div><div><div>root@freeswitch-capa8:/etc# isql -v freeswitch</div><div>+-----------------------------<wbr>----------+</div><div>| Connected! |</div><div>| |</div><div>| sql-statement |</div><div>| help [tablename] |</div><div>| quit |</div><div>| |</div><div>+-----------------------------<wbr>----------+</div><div>SQL> </div></div><div><br></div><div>Then in file switch.conf.xml I changed db connection configuration</div><div><br></div><div><div>root@freeswitch-capa8:/usr/loc<wbr>al/freeswitch/conf/autoload_co<wbr>nfigs# cat switch.conf.xml |grep core-db-dsn</div><div> <param name="core-db-dsn" value="<a>pgsql://hostaddr=127.0.<wbr>0.1</a> dbname=freeswitch_db user=freeswitch_user password='XXX' options='-c client_min_messages=NOTICE'" /></div><div> <!--<param name="core-db-dsn" value="freeswitch:freeswitch_u<wbr>ser:XXX"/>--></div></div><div><br></div><div>Last night SwK user at freenode channel told me that freeswitch on turning on, it creates tables at database (thanks SwK).</div><div><br></div><div>I spect that configuration of odbc is working but drops lot of errors (here you have some lines):</div><div><br></div><div><div>2018-05-24 02:03:25 CEST [3099-338780] freeswitch_user@freeswitch_db STATEMENT: PREPARE "_PLAN0x140bf90" as CREATE TABLE nat (</div><div><span style="white-space:pre-wrap"> </span> sticky INTEGER,</div><div><span style="white-space:pre-wrap"> </span>port<span style="white-space:pre-wrap"> </span>INTEGER,</div><div><span style="white-space:pre-wrap"> </span>proto<span style="white-space:pre-wrap"> </span>INTEGER,</div><div><span style="white-space:pre-wrap"> </span> hostname VARCHAR(256)</div><div><span style="white-space:pre-wrap"> </span>);</div><div><span style="white-space:pre-wrap"> </span>;EXECUTE "_PLAN0x140bf90"</div><div>2018-05-24 02:03:25 CEST [3099-338781] freeswitch_user@freeswitch_db WARNING: there is already a transaction in progress</div><div>2018-05-24 02:03:25 CEST [3099-338782] freeswitch_user@freeswitch_db ERROR: relation "registrations" does not exist at character 41</div><div>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>2018-05-24 02:03:25 CEST [3099-338784] freeswitch_user@freeswitch_db WARNING: there is already a transaction in progress</div><div>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>2018-05-24 02:03:25 CEST [3099-338786] freeswitch_user@freeswitch_db STATEMENT: PREPARE "_PLAN0x140bf90" as DROP TABLE registrations;EXECUTE "_PLAN0x140bf90"</div><div>2018-05-24 02:03:25 CEST [3099-338787] freeswitch_user@freeswitch_db WARNING: there is already a transaction in progress</div><div>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>2018-05-24 02:03:25 CEST [3099-338789] freeswitch_user@freeswitch_db STATEMENT: PREPARE "_PLAN0x140bf90" as CREATE TABLE registrations (</div><div><span style="white-space:pre-wrap"> </span> reg_user VARCHAR(256),</div><div><span style="white-space:pre-wrap"> </span> realm VARCHAR(256),</div><div><span style="white-space:pre-wrap"> </span> token VARCHAR(256),</div><div><span style="white-space:pre-wrap"> </span> url TEXT,</div><div><span style="white-space:pre-wrap"> </span> expires INTEGER,</div><div><span style="white-space:pre-wrap"> </span> network_ip VARCHAR(256),</div><div><span style="white-space:pre-wrap"> </span> network_port VARCHAR(256),</div><div><span style="white-space:pre-wrap"> </span> network_proto VARCHAR(256),</div><div><span style="white-space:pre-wrap"> </span> hostname VARCHAR(256),</div><div><span style="white-space:pre-wrap"> </span> metadata VARCHAR(256)</div><div><span style="white-space:pre-wrap"> </span>);</div><div><span style="white-space:pre-wrap"> </span>;EXECUTE "_PLAN0x140bf90"</div><div>2018-05-24 02:03:25 CEST [3099-338790] freeswitch_user@freeswitch_db WARNING: there is already a transaction in progress</div><div>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><br></div><div><br></div><div>I tested with tables in psql database and without tables in psql database.</div><div><span style="color:rgb(80,0,80);font-size:12.8px"><br></span></div><div><span style="color:rgb(80,0,80);font-size:12.8px">freeswitch@freeswitch-capa8> version</span><br></div><div><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">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">3c7<wbr>db639fd~64bit (git 3c7db63 2018-05-16 21:12:08Z 64bit)</span><br></div><div><br></div><div>As I told in last mail, I'm working with last git version.</div><div><br></div><div>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">/usr/local/freeswitch/con<wbr>f/sip_profiles/internal.xml</span></div><div><br></div><div><div>root@freeswitch-capa8:/usr/loc<wbr>al/freeswitch/conf# cat /usr/local/freeswitch/conf/sip<wbr>_profiles/internal.xml |grep db</div><div> <!-- Name of the db to use for this profile --></div><div> <!--<param name="dbname" value="share_presence"/>--></div><div> <!--<param name="odbc-dsn" value="dsn:user:pass"/>--></div><div> <!--<param name="odbc-dsn" value="freeswitch:freeswitch_u<wbr>ser:XXX"/>--></div><div> <!-- <param name="odbc-dsn" value="<a>pgsql://hostaddr=127.0.<wbr>0.1</a> dbname=freeswitch_db user=freeswitch_user password='XXX' options='-c client_min_messages=NOTICE' application_name='freeswitch'" /> --></div><div> <!--all inbound reg will stored in the db using this domain --></div><div> <param name="force-register-db-domain<wbr>" value="$${domain}"/></div></div><div><br></div><div>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><br></div><div>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><br></div><div>Thanks you much for your help :)</div><div><br></div><div>References: </div><div><a href="https://freeswitch.org/confluence/display/FREESWITCH/PostgreSQL+in+the+core" target="_blank">https://freeswitch.org/conflue<wbr>nce/display/FREESWITCH/Postgre<wbr>SQL+in+the+core</a></div><div><a href="https://freeswitch.org/confluence/display/FREESWITCH/ODBC+DSN" target="_blank">https://freeswitch.org/conflue<wbr>nce/display/FREESWITCH/ODBC+DS<wbr>N</a><br></div><div><a href="https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+Databases" target="_blank">https://freeswitch.org/conflue<wbr>nce/display/FREESWITCH/FreeSWI<wbr>TCH+Databases</a><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_4393266532543739197m_1464568345192727893gmail-m_3360575814196352002gmail_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-05-24 18:21 GMT+02:00 Michael Jerris <span dir="ltr"><<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>></span>:<br><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>
<span><br>
> On May 23, 2018, at 6:13 PM, Blackhold <<a href="mailto:blackholdmailer@gmail.com" target="_blank">blackholdmailer@gmail.com</a>> wrote:<br>
> <br>
> Hi,<br>
> I have just installed freeswitch 1.9<br>
> <br>
> freeswitch@freeswitch-capa8> version<br>
> FreeSWITCH Version 1.9.0+git~20180516T211208Z~3c7<wbr>db639fd~64bit (git 3c7db63 2018-05-16 21:12:08Z 64bit)<br>
> <br>
> And I'm trying to freeswitch use postgresql instead sqlitedb.<br>
> <br>
> I have configured the file switch.conf.xml of /usr/local/freeswitch/conf/aut<wbr>oload_configs with uncomenting and configuring this line<br>
> <br>
> <param name="core-db-dsn" value="<a>pgsql://hostaddr=127.0</a>.<wbr>0.1 dbname=freeswitch_db user=freeswitch_user password='****' options='-c client_min_messages=NOTICE'" /><br>
> <br>
> then I exported all sqlitedbs to sql and then imported to a database that I have created in postgresql<br>
> <br>
> I have run again /etc/init.d/freeswitch.sh start<br>
> <br>
> But seems it still is taking sqlitedb.<br>
> <br>
> I tried to move the sqlitedbs files to other side and turned on again freeswitch, but it creates sqlitedbs again.<br>
> <br>
> What I'm missing? what I'm doing wrong? what could I check?<br>
<br>
<br>
</span>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com/" rel="noreferrer" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org/" rel="noreferrer" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
<a href="http://www.cluecon.com/" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/free<wbr>switch-users</a><br>
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank">http://www.freeswitch.org</a></blockquote></div><br></div>
______________________________<wbr>______________________________<wbr>_____________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><a href="http://confluence.freeswitch.org/" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br><a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/free<wbr>switch-users</a><br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a></div></blockquote></div><br></div></div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com/" rel="noreferrer" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org/" rel="noreferrer" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
<a href="http://www.cluecon.com/" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/free<wbr>switch-users</a><br>
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>
______________________________<wbr>______________________________<wbr>_____________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.<wbr>org</a><br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div></blockquote></div><br></div></div></div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>