<div dir="ltr">Hi,<div>The tables are:</div><div><br></div><div><div>ostgres@freeswitch-capa8:~/sql$ psql freeswitch_db</div><div>freeswitch_db-# \dt</div><div><br></div><div>                        List of relations</div><div> Schema |                Name                 | Type  |  Owner   </div><div>--------+-------------------------------------+-------+----------</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_subscriptions | 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="pgsql://hostaddr=127.0.</span><wbr 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"><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">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/psqlodbca.so</div><div>Driver = /usr/lib/x86_64-linux-gnu/odbc/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/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>+---------------------------------------+</div><div>| Connected!                            |</div><div>|                                       |</div><div>| sql-statement                         |</div><div>| help [tablename]                      |</div><div>| quit                                  |</div><div>|                                       |</div><div>+---------------------------------------+</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/local/freeswitch/conf/autoload_configs# cat switch.conf.xml |grep core-db-dsn</div><div>    <param name="core-db-dsn" value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch_db user=freeswitch_user password='XXX' options='-c client_min_messages=NOTICE'" /></div><div>    <!--<param name="core-db-dsn" value="freeswitch:freeswitch_user: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">  </span>   sticky  INTEGER,</div><div><span style="white-space:pre">                </span>port<span style="white-space:pre"> </span>INTEGER,</div><div><span style="white-space:pre">              </span>proto<span style="white-space:pre">        </span>INTEGER,</div><div><span style="white-space:pre">      </span>   hostname VARCHAR(256)</div><div><span style="white-space:pre">    </span>);</div><div><span style="white-space:pre">    </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">    </span>   reg_user      VARCHAR(256),</div><div><span style="white-space:pre">   </span>   realm     VARCHAR(256),</div><div><span style="white-space:pre">       </span>   token     VARCHAR(256),</div><div><span style="white-space:pre">       </span>   url      TEXT,</div><div><span style="white-space:pre">        </span>   expires  INTEGER,</div><div><span style="white-space:pre">       </span>   network_ip VARCHAR(256),</div><div><span style="white-space:pre"> </span>   network_port VARCHAR(256),</div><div><span style="white-space:pre">       </span>   network_proto VARCHAR(256),</div><div><span style="white-space:pre">      </span>   hostname VARCHAR(256),</div><div><span style="white-space:pre">   </span>   metadata VARCHAR(256)</div><div><span style="white-space:pre">    </span>);</div><div><span style="white-space:pre">    </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><wbr 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"><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">3c7db639fd~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/conf/sip_profiles/internal.xml</span></div><div><br></div><div><div>root@freeswitch-capa8:/usr/local/freeswitch/conf# cat /usr/local/freeswitch/conf/sip_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_user:XXX"/>--></div><div>    <!--    <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'" /> --></div><div>    <!--all inbound reg will stored in the db using this domain --></div><div>    <param name="force-register-db-domain" 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">https://freeswitch.org/confluence/display/FREESWITCH/PostgreSQL+in+the+core</a></div><div><a href="https://freeswitch.org/confluence/display/FREESWITCH/ODBC+DSN">https://freeswitch.org/confluence/display/FREESWITCH/ODBC+DSN</a><br></div><div><a href="https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+Databases">https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+Databases</a><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 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:0 0 0 .8ex;border-left:1px #ccc solid;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 class=""><br>
> On May 23, 2018, at 6:13 PM, Blackhold <<a href="mailto:blackholdmailer@gmail.com">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~<wbr>3c7db639fd~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/<wbr>autoload_configs with uncomenting and configuring this line<br>
> <br>
>     <param name="core-db-dsn" value="pgsql://hostaddr=127.0.<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">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></blockquote></div><br></div>